From b496e24920141ca2e9c181f7604733b77c1a11fa Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core Date: Tue, 10 Dec 2024 10:36:10 +0000 Subject: [PATCH] Prepare for next release --- .release/ci.hcl | 2 +- GNUmakefile | 2 +- client/structs/structs.generated.go | 12731 -- nomad/structs/structs.generated.go | 273151 ------------------------- version/version.go | 4 +- 5 files changed, 4 insertions(+), 285886 deletions(-) delete mode 100644 client/structs/structs.generated.go delete mode 100644 nomad/structs/structs.generated.go diff --git a/.release/ci.hcl b/.release/ci.hcl index 5074b3e1f20..99610e492bd 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -7,7 +7,7 @@ project "nomad" { team = "nomad" slack { - notification_channel = "CUYKT2A73" + notification_channel = "C03B5EWFW01" } github { diff --git a/GNUmakefile b/GNUmakefile index bcd24e736ee..c73c695ab59 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -46,7 +46,7 @@ PROTO_COMPARE_TAG ?= v1.0.3$(if $(findstring ent,$(GO_TAGS)),+ent,) # or backport version, without the leading "v". main should have the latest # published release here, and release branches should point to the latest # published release in their X.Y release line. -LAST_RELEASE ?= 1.9.3 +LAST_RELEASE ?= 9.9.9999 default: help diff --git a/client/structs/structs.generated.go b/client/structs/structs.generated.go deleted file mode 100644 index ac666809b09..00000000000 --- a/client/structs/structs.generated.go +++ /dev/null @@ -1,12731 +0,0 @@ -//go:build codegen_generated -// +build codegen_generated - -// Code generated by codecgen - DO NOT EDIT. - -package structs - -import ( - "errors" - codec1978 "github.com/hashicorp/go-msgpack/v2/codec" - pkg1_hoststats "github.com/hashicorp/nomad/client/hoststats" - 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" - "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_hoststats.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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - 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_hoststats.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.HostStats != nil { - x.HostStats = nil - } - } else { - if x.HostStats == nil { - x.HostStats = new(pkg1_hoststats.HostStats) - } - - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.HostStats)); yyxt13 != nil { - z.DecExtension(x.HostStats, yyxt13) - } else { - z.DecFallback(x.HostStats, 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(18) - } else { - r.WriteMapStart(18) - } - 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 { - r.EncodeBool(bool(x.LogIncludeLocation)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LogIncludeLocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LogIncludeLocation`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.LogIncludeLocation)) - } - } - 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 yyxt31 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt31 != nil { - z.EncExtension(x.MaxQueryTime, yyxt31) - } 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 yyxt32 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt32 != nil { - z.EncExtension(x.MaxQueryTime, yyxt32) - } 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "LogIncludeLocation": - if r.TryDecodeAsNil() { - x.LogIncludeLocation = false - } else { - x.LogIncludeLocation = (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 yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.DecExtension(x.MaxQueryTime, yyxt14) - } 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj23 int - var yyb23 bool - var yyhl23 bool = l >= 0 - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogLevel = "" - } else { - x.LogLevel = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogJSON = false - } else { - x.LogJSON = (bool)(r.DecodeBool()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogIncludeLocation = false - } else { - x.LogIncludeLocation = (bool)(r.DecodeBool()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerID = "" - } else { - x.ServerID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil { - z.DecExtension(x.MaxQueryTime, yyxt34) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj23-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' - 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.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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ContentType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ContentType)) - } - } - } else { - 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(14) - } else { - r.WriteMapStart(14) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Files = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocFileInfo((*[]*AllocFileInfo)(&x.Files), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(14) - } else { - r.WriteMapStart(14) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Info != nil { - x.Info = nil - } - } else { - if x.Info == nil { - x.Info = new(AllocFileInfo) - } - - x.Info.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(19) - } else { - r.WriteMapStart(19) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj24 int - var yyb24 bool - var yyhl24 bool = l >= 0 - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Offset = 0 - } else { - x.Offset = (int64)(r.DecodeInt64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Origin = "" - } else { - x.Origin = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Limit = 0 - } else { - x.Limit = (int64)(r.DecodeInt64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Follow = false - } else { - x.Follow = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt36 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt36 != nil { - z.DecExtension(x.MaxQueryTime, yyxt36) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj24-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(19) - } else { - r.WriteMapStart(19) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj24 int - var yyb24 bool - var yyhl24 bool = l >= 0 - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogType = "" - } else { - x.LogType = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Offset = 0 - } else { - x.Offset = (int64)(r.DecodeInt64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Origin = "" - } else { - x.Origin = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Follow = false - } else { - x.Follow = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt36 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt36 != nil { - z.DecExtension(x.MaxQueryTime, yyxt36) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj24-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(18) - } else { - r.WriteMapStart(18) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.JobID)) - } - } - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Cmd), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Action))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Action)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Action\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Action`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Action))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Action)) - } - } - } - 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 yyxt31 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt31 != nil { - z.EncExtension(x.MaxQueryTime, yyxt31) - } 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 yyxt32 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt32 != nil { - z.EncExtension(x.MaxQueryTime, yyxt32) - } 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - 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 { - h.decSlicestring((*[]string)(&x.Cmd), d) - } - } - case "Action": - if r.TryDecodeAsNil() { - x.Action = "" - } else { - x.Action = (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 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj24 int - var yyb24 bool - var yyhl24 bool = l >= 0 - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tty = false - } else { - x.Tty = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cmd = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Cmd), d) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Action = "" - } else { - x.Action = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt36 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt36 != nil { - z.DecExtension(x.MaxQueryTime, yyxt36) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj24-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocChecksRequest) 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.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 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(codecSelferCcUTF8102, `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(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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.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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocChecksRequest) 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 *AllocChecksRequest) 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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocChecksRequest) 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.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 yyxt23 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt23 != nil { - z.DecExtension(x.MaxQueryTime, yyxt23) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocChecksResponse) 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(5) - } else { - r.WriteMapStart(5) - } - 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 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(codecSelferCcUTF8102, `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(codecSelferCcUTF8102, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Results == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstructs_CheckIDPtrtostructs_CheckQueryResult((map[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult)(x.Results), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Results\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Results`) - } - r.WriteMapElemValue() - if x.Results == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstructs_CheckIDPtrtostructs_CheckQueryResult((map[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult)(x.Results), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocChecksResponse) 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 *AllocChecksResponse) 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 "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 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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Results": - if r.TryDecodeAsNil() { - x.Results = nil - } else { - if false { - } else { - h.decMapstructs_CheckIDPtrtostructs_CheckQueryResult((*map[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult)(&x.Results), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocChecksResponse) 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.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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Results = nil - } else { - if false { - } else { - h.decMapstructs_CheckIDPtrtostructs_CheckQueryResult((*map[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult)(&x.Results), 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 *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(14) - } else { - r.WriteMapStart(14) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Stats != nil { - x.Stats = nil - } - } else { - if x.Stats == nil { - x.Stats = new(AllocResourceUsage) - } - - x.Stats.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(9) - } else { - r.WriteMapStart(9) - } - 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.MappedFile)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MappedFile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MappedFile`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MappedFile)) - } - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 "MappedFile": - if r.TryDecodeAsNil() { - x.MappedFile = 0 - } else { - x.MappedFile = (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 { - h.decSlicestring((*[]string)(&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 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.RSS = 0 - } else { - x.RSS = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cache = 0 - } else { - x.Cache = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Swap = 0 - } else { - x.Swap = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MappedFile = 0 - } else { - x.MappedFile = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Usage = 0 - } else { - x.Usage = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxUsage = 0 - } else { - x.MaxUsage = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KernelUsage = 0 - } else { - x.KernelUsage = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KernelMaxUsage = 0 - } else { - x.KernelMaxUsage = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Measured = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Measured), 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 *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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 *NodeRegistration) 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 false { - } else { - r.EncodeBool(bool(x.HasRegistered)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HasRegistered\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `HasRegistered`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.HasRegistered)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeRegistration) 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 *NodeRegistration) 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 "HasRegistered": - if r.TryDecodeAsNil() { - x.HasRegistered = false - } else { - x.HasRegistered = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeRegistration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - 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.HasRegistered = false - } else { - x.HasRegistered = (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 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) encSlicestring(v []string, 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyv1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(yyv1)) - } - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer102) decSlicestring(v *[]string, 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 = []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 codecSelfer102) encMapstructs_CheckIDPtrtostructs_CheckQueryResult(v map[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult, 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 yyxt2 := z.Extension(z.I2Rtid(yyk1)); yyxt2 != nil { - z.EncExtension(yyk1, yyxt2) - } 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) decMapstructs_CheckIDPtrtostructs_CheckQueryResult(v *map[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult, 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[pkg4_structs.CheckID]*pkg4_structs.CheckQueryResult, yyrl1) - *v = yyv1 - } - var yymk1 pkg4_structs.CheckID - var yymv1 *pkg4_structs.CheckQueryResult - 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 { - if false { - } else if yyxt3 := z.Extension(z.I2Rtid(yymk1)); yyxt3 != nil { - z.DecExtension(yymk1, yyxt3) - } else { - yymk1 = (pkg4_structs.CheckID)(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.CheckQueryResult) - } - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(yymv1)); yyxt5 != nil { - z.DecExtension(yymv1, yyxt5) - } 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 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 b7ff894b149..00000000000 --- a/nomad/structs/structs.generated.go +++ /dev/null @@ -1,273151 +0,0 @@ -//go:build codegen_generated -// +build codegen_generated - -// Code generated by codecgen - DO NOT EDIT. - -package structs - -import ( - "errors" - pkg1_jwt "github.com/go-jose/go-jose/v3/jwt" - pkg8_v2 "github.com/hashicorp/go-kms-wrapping/v2" - codec1978 "github.com/hashicorp/go-msgpack/v2/codec" - pkg7_v3 "github.com/hashicorp/go-set/v3" - pkg6_acl "github.com/hashicorp/nomad/acl" - pkg4_numalib "github.com/hashicorp/nomad/client/lib/numalib" - pkg5_hw "github.com/hashicorp/nomad/client/lib/numalib/hw" - pkg12_host "github.com/hashicorp/nomad/command/agent/host" - pkg11_pprof "github.com/hashicorp/nomad/command/agent/pprof" - pkg3_structs "github.com/hashicorp/nomad/plugins/shared/structs" - pkg10_raft "github.com/hashicorp/raft" - pkg2_serf "github.com/hashicorp/serf/serf" - pkg9_structpb "google.golang.org/protobuf/types/known/structpb" - "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 pkg1_jwt.Claims - var v1 pkg8_v2.BlobInfo - var v2 pkg7_v3.Set[string] - var v3 pkg6_acl.Policy - var v4 pkg4_numalib.Topology - var v5 pkg5_hw.SocketID - var v6 pkg12_host.HostData - var v7 pkg11_pprof.ReqType - var v8 pkg3_structs.Attribute - var v9 pkg10_raft.ServerID - var v10 pkg2_serf.MemberStatus - var v11 pkg9_structpb.Struct - var v12 net.IP - var v13 time.Duration - _, _, _, _, _, _, _, _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13 - } -} - -func (x *ACLTokenRoleLink) 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.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 *ACLTokenRoleLink) 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 *ACLTokenRoleLink) 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 "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 *ACLTokenRoleLink) 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.Name = "" - } else { - x.Name = (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 *ACLRole) 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.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.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.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRolePolicyLink(([]*ACLRolePolicyLink)(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.encSlicePtrtoACLRolePolicyLink(([]*ACLRolePolicyLink)(x.Policies), e) - } - } - } - 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 *ACLRole) 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 *ACLRole) 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 "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 "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRolePolicyLink((*[]*ACLRolePolicyLink)(&x.Policies), d) - } - } - 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 *ACLRole) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - 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.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRolePolicyLink((*[]*ACLRolePolicyLink)(&x.Policies), d) - } - } - 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 *ACLRolePolicyLink) 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.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 *ACLRolePolicyLink) 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 *ACLRolePolicyLink) 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()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLRolePolicyLink) 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.Name = "" - } else { - x.Name = (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 *ACLRoleListStub) 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.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.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.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRolePolicyLink(([]*ACLRolePolicyLink)(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.encSlicePtrtoACLRolePolicyLink(([]*ACLRolePolicyLink)(x.Policies), e) - } - } - } - 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 *ACLRoleListStub) 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 *ACLRoleListStub) 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 "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 "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRolePolicyLink((*[]*ACLRolePolicyLink)(&x.Policies), d) - } - } - 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 *ACLRoleListStub) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - 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.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRolePolicyLink((*[]*ACLRolePolicyLink)(&x.Policies), d) - } - } - 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 *ACLRolesUpsertRequest) 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.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRole(([]*ACLRole)(x.ACLRoles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRoles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRoles`) - } - r.WriteMapElemValue() - if x.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRole(([]*ACLRole)(x.ACLRoles), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowMissingPolicies)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowMissingPolicies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowMissingPolicies`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowMissingPolicies)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLRolesUpsertRequest) 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 *ACLRolesUpsertRequest) 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 "ACLRoles": - if r.TryDecodeAsNil() { - x.ACLRoles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRole((*[]*ACLRole)(&x.ACLRoles), d) - } - } - case "AllowMissingPolicies": - if r.TryDecodeAsNil() { - x.AllowMissingPolicies = false - } else { - x.AllowMissingPolicies = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLRolesUpsertRequest) 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.ACLRoles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRole((*[]*ACLRole)(&x.ACLRoles), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowMissingPolicies = false - } else { - x.AllowMissingPolicies = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLRolesUpsertResponse) 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.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRole(([]*ACLRole)(x.ACLRoles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRoles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRoles`) - } - r.WriteMapElemValue() - if x.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRole(([]*ACLRole)(x.ACLRoles), 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 *ACLRolesUpsertResponse) 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 *ACLRolesUpsertResponse) 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 "ACLRoles": - if r.TryDecodeAsNil() { - x.ACLRoles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRole((*[]*ACLRole)(&x.ACLRoles), 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 *ACLRolesUpsertResponse) 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.ACLRoles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRole((*[]*ACLRole)(&x.ACLRoles), 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 *ACLRolesDeleteByIDRequest) 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.ACLRoleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLRoleIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRoleIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRoleIDs`) - } - r.WriteMapElemValue() - if x.ACLRoleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLRoleIDs), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLRolesDeleteByIDRequest) 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 *ACLRolesDeleteByIDRequest) 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 "ACLRoleIDs": - if r.TryDecodeAsNil() { - x.ACLRoleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLRoleIDs), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLRolesDeleteByIDRequest) 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.ACLRoleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLRoleIDs), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLRolesDeleteByIDResponse) 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 *ACLRolesDeleteByIDResponse) 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 *ACLRolesDeleteByIDResponse) 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 *ACLRolesDeleteByIDResponse) 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 *ACLRolesListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLRolesListRequest) 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 *ACLRolesListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLRolesListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *ACLRolesListResponse) 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.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRoleListStub(([]*ACLRoleListStub)(x.ACLRoles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRoles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRoles`) - } - r.WriteMapElemValue() - if x.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLRoleListStub(([]*ACLRoleListStub)(x.ACLRoles), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLRolesListResponse) 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 *ACLRolesListResponse) 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 "ACLRoles": - if r.TryDecodeAsNil() { - x.ACLRoles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRoleListStub((*[]*ACLRoleListStub)(&x.ACLRoles), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLRolesListResponse) 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.ACLRoles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLRoleListStub((*[]*ACLRoleListStub)(&x.ACLRoles), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLRolesByIDRequest) 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 x.ACLRoleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLRoleIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRoleIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRoleIDs`) - } - r.WriteMapElemValue() - if x.ACLRoleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLRoleIDs), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLRolesByIDRequest) 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 *ACLRolesByIDRequest) 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 "ACLRoleIDs": - if r.TryDecodeAsNil() { - x.ACLRoleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLRoleIDs), 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLRolesByIDRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ACLRoleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLRoleIDs), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLRolesByIDResponse) 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.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLRole((map[string]*ACLRole)(x.ACLRoles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRoles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRoles`) - } - r.WriteMapElemValue() - if x.ACLRoles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLRole((map[string]*ACLRole)(x.ACLRoles), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLRolesByIDResponse) 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 *ACLRolesByIDResponse) 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 "ACLRoles": - if r.TryDecodeAsNil() { - x.ACLRoles = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLRole((*map[string]*ACLRole)(&x.ACLRoles), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLRolesByIDResponse) 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.ACLRoles = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLRole((*map[string]*ACLRole)(&x.ACLRoles), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLRoleByIDRequest) 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.RoleID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RoleID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RoleID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RoleID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RoleID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RoleID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLRoleByIDRequest) 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 *ACLRoleByIDRequest) 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 "RoleID": - if r.TryDecodeAsNil() { - x.RoleID = "" - } else { - x.RoleID = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLRoleByIDRequest) 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.RoleID = "" - } else { - x.RoleID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *ACLRoleByIDResponse) 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.ACLRole == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLRole == nil { - r.EncodeNil() - } else { - x.ACLRole.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRole\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRole`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLRole == nil { - r.EncodeNil() - } else { - x.ACLRole.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLRoleByIDResponse) 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 *ACLRoleByIDResponse) 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 "ACLRole": - if r.TryDecodeAsNil() { - if true && x.ACLRole != nil { - x.ACLRole = nil - } - } else { - if x.ACLRole == nil { - x.ACLRole = new(ACLRole) - } - - x.ACLRole.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLRoleByIDResponse) 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.ACLRole != nil { - x.ACLRole = nil - } - } else { - if x.ACLRole == nil { - x.ACLRole = new(ACLRole) - } - - x.ACLRole.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLRoleByNameRequest) 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.RoleName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RoleName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RoleName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RoleName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RoleName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RoleName)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLRoleByNameRequest) 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 *ACLRoleByNameRequest) 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 "RoleName": - if r.TryDecodeAsNil() { - x.RoleName = "" - } else { - x.RoleName = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLRoleByNameRequest) 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.RoleName = "" - } else { - x.RoleName = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *ACLRoleByNameResponse) 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.ACLRole == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLRole == nil { - r.EncodeNil() - } else { - x.ACLRole.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRole\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRole`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLRole == nil { - r.EncodeNil() - } else { - x.ACLRole.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLRoleByNameResponse) 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 *ACLRoleByNameResponse) 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 "ACLRole": - if r.TryDecodeAsNil() { - if true && x.ACLRole != nil { - x.ACLRole = nil - } - } else { - if x.ACLRole == nil { - x.ACLRole = new(ACLRole) - } - - x.ACLRole.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLRoleByNameResponse) 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.ACLRole != nil { - x.ACLRole = nil - } - } else { - if x.ACLRole == nil { - x.ACLRole = new(ACLRole) - } - - x.ACLRole.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLAuthMethod) 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 if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x) - } 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.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.TokenLocality))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TokenLocality)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TokenLocality\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TokenLocality`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TokenLocality))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TokenLocality)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TokenNameFormat))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TokenNameFormat)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TokenNameFormat\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TokenNameFormat`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TokenNameFormat))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TokenNameFormat)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxTokenTTL)); yyxt16 != nil { - z.EncExtension(x.MaxTokenTTL, yyxt16) - } else { - r.EncodeInt(int64(x.MaxTokenTTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxTokenTTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxTokenTTL`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxTokenTTL)); yyxt17 != nil { - z.EncExtension(x.MaxTokenTTL, yyxt17) - } else { - r.EncodeInt(int64(x.MaxTokenTTL)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Default)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Default\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Default`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Default)) - } - } - var yyn21 bool - if x.Config == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - x.Config.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Config\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Config`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.Config == nil { - r.EncodeNil() - } else { - x.Config.CodecEncodeSelf(e) - } - } - } - 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 yyxt28 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt28 != nil { - z.EncExtension(x.CreateTime, yyxt28) - } 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 yyxt29 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt29 != nil { - z.EncExtension(x.CreateTime, yyxt29) - } 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 if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ModifyTime) - } else if yyxt31 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt31 != nil { - z.EncExtension(x.ModifyTime, yyxt31) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ModifyTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ModifyTime) - } else { - z.EncFallback(x.ModifyTime) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyTime`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ModifyTime) - } else if yyxt32 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt32 != nil { - z.EncExtension(x.ModifyTime, yyxt32) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ModifyTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ModifyTime) - } else { - z.EncFallback(x.ModifyTime) - } - } - 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 *ACLAuthMethod) 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 if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x) - } 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 *ACLAuthMethod) 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 "TokenLocality": - if r.TryDecodeAsNil() { - x.TokenLocality = "" - } else { - x.TokenLocality = (string)(r.DecodeString()) - } - case "TokenNameFormat": - if r.TryDecodeAsNil() { - x.TokenNameFormat = "" - } else { - x.TokenNameFormat = (string)(r.DecodeString()) - } - case "MaxTokenTTL": - if r.TryDecodeAsNil() { - x.MaxTokenTTL = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxTokenTTL)); yyxt9 != nil { - z.DecExtension(x.MaxTokenTTL, yyxt9) - } else { - x.MaxTokenTTL = (time.Duration)(r.DecodeInt64()) - } - } - case "Default": - if r.TryDecodeAsNil() { - x.Default = false - } else { - x.Default = (bool)(r.DecodeBool()) - } - case "Config": - if r.TryDecodeAsNil() { - if true && x.Config != nil { - x.Config = nil - } - } else { - if x.Config == nil { - x.Config = new(ACLAuthMethodConfig) - } - - x.Config.CodecDecodeSelf(d) - } - 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 yyxt15 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt15 != nil { - z.DecExtension(x.CreateTime, yyxt15) - } 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 "ModifyTime": - if r.TryDecodeAsNil() { - x.ModifyTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ModifyTime = r.DecodeTime() - } else if yyxt17 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt17 != nil { - z.DecExtension(x.ModifyTime, yyxt17) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ModifyTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ModifyTime) - } else { - z.DecFallback(&x.ModifyTime, 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 *ACLAuthMethod) 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.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TokenLocality = "" - } else { - x.TokenLocality = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TokenNameFormat = "" - } else { - x.TokenNameFormat = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxTokenTTL = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxTokenTTL)); yyxt26 != nil { - z.DecExtension(x.MaxTokenTTL, yyxt26) - } else { - x.MaxTokenTTL = (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.Default = false - } else { - x.Default = (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.Config != nil { - x.Config = nil - } - } else { - if x.Config == nil { - x.Config = new(ACLAuthMethodConfig) - } - - x.Config.CodecDecodeSelf(d) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - 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 yyxt32 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt32 != nil { - z.DecExtension(x.CreateTime, yyxt32) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ModifyTime = r.DecodeTime() - } else if yyxt34 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt34 != nil { - z.DecExtension(x.ModifyTime, yyxt34) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ModifyTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ModifyTime) - } else { - z.DecFallback(&x.ModifyTime, false) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (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 *ACLAuthMethodConfig) 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 if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x) - } 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 x.JWTValidationPubKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.JWTValidationPubKeys), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JWTValidationPubKeys\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JWTValidationPubKeys`) - } - r.WriteMapElemValue() - if x.JWTValidationPubKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.JWTValidationPubKeys), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JWKSURL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JWKSURL)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JWKSURL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JWKSURL`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JWKSURL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JWKSURL)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OIDCDiscoveryURL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OIDCDiscoveryURL)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OIDCDiscoveryURL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OIDCDiscoveryURL`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OIDCDiscoveryURL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OIDCDiscoveryURL)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OIDCClientID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OIDCClientID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OIDCClientID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OIDCClientID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OIDCClientID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OIDCClientID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OIDCClientSecret))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OIDCClientSecret)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OIDCClientSecret\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OIDCClientSecret`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OIDCClientSecret))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OIDCClientSecret)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.OIDCDisableUserInfo)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OIDCDisableUserInfo\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OIDCDisableUserInfo`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.OIDCDisableUserInfo)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OIDCScopes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OIDCScopes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OIDCScopes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OIDCScopes`) - } - r.WriteMapElemValue() - if x.OIDCScopes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OIDCScopes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.BoundAudiences == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.BoundAudiences), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BoundAudiences\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BoundAudiences`) - } - r.WriteMapElemValue() - if x.BoundAudiences == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.BoundAudiences), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.BoundIssuer == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.BoundIssuer), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BoundIssuer\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BoundIssuer`) - } - r.WriteMapElemValue() - if x.BoundIssuer == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.BoundIssuer), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllowedRedirectURIs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.AllowedRedirectURIs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowedRedirectURIs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowedRedirectURIs`) - } - r.WriteMapElemValue() - if x.AllowedRedirectURIs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.AllowedRedirectURIs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DiscoveryCaPem == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DiscoveryCaPem), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiscoveryCaPem\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiscoveryCaPem`) - } - r.WriteMapElemValue() - if x.DiscoveryCaPem == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DiscoveryCaPem), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JWKSCACert))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JWKSCACert)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JWKSCACert\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JWKSCACert`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JWKSCACert))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JWKSCACert)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.SigningAlgs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.SigningAlgs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SigningAlgs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SigningAlgs`) - } - r.WriteMapElemValue() - if x.SigningAlgs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.SigningAlgs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt43 := z.Extension(z.I2Rtid(x.ExpirationLeeway)); yyxt43 != nil { - z.EncExtension(x.ExpirationLeeway, yyxt43) - } else { - r.EncodeInt(int64(x.ExpirationLeeway)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExpirationLeeway\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExpirationLeeway`) - } - r.WriteMapElemValue() - if false { - } else if yyxt44 := z.Extension(z.I2Rtid(x.ExpirationLeeway)); yyxt44 != nil { - z.EncExtension(x.ExpirationLeeway, yyxt44) - } else { - r.EncodeInt(int64(x.ExpirationLeeway)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt46 := z.Extension(z.I2Rtid(x.NotBeforeLeeway)); yyxt46 != nil { - z.EncExtension(x.NotBeforeLeeway, yyxt46) - } else { - r.EncodeInt(int64(x.NotBeforeLeeway)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NotBeforeLeeway\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NotBeforeLeeway`) - } - r.WriteMapElemValue() - if false { - } else if yyxt47 := z.Extension(z.I2Rtid(x.NotBeforeLeeway)); yyxt47 != nil { - z.EncExtension(x.NotBeforeLeeway, yyxt47) - } else { - r.EncodeInt(int64(x.NotBeforeLeeway)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt49 := z.Extension(z.I2Rtid(x.ClockSkewLeeway)); yyxt49 != nil { - z.EncExtension(x.ClockSkewLeeway, yyxt49) - } else { - r.EncodeInt(int64(x.ClockSkewLeeway)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClockSkewLeeway\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClockSkewLeeway`) - } - r.WriteMapElemValue() - if false { - } else if yyxt50 := z.Extension(z.I2Rtid(x.ClockSkewLeeway)); yyxt50 != nil { - z.EncExtension(x.ClockSkewLeeway, yyxt50) - } else { - r.EncodeInt(int64(x.ClockSkewLeeway)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ClaimMappings == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.ClaimMappings), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClaimMappings\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClaimMappings`) - } - r.WriteMapElemValue() - if x.ClaimMappings == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.ClaimMappings), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ListClaimMappings == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.ListClaimMappings), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ListClaimMappings\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ListClaimMappings`) - } - r.WriteMapElemValue() - if x.ListClaimMappings == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.ListClaimMappings), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLAuthMethodConfig) 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 if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x) - } 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 *ACLAuthMethodConfig) 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 "JWTValidationPubKeys": - if r.TryDecodeAsNil() { - x.JWTValidationPubKeys = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.JWTValidationPubKeys), d) - } - } - case "JWKSURL": - if r.TryDecodeAsNil() { - x.JWKSURL = "" - } else { - x.JWKSURL = (string)(r.DecodeString()) - } - case "OIDCDiscoveryURL": - if r.TryDecodeAsNil() { - x.OIDCDiscoveryURL = "" - } else { - x.OIDCDiscoveryURL = (string)(r.DecodeString()) - } - case "OIDCClientID": - if r.TryDecodeAsNil() { - x.OIDCClientID = "" - } else { - x.OIDCClientID = (string)(r.DecodeString()) - } - case "OIDCClientSecret": - if r.TryDecodeAsNil() { - x.OIDCClientSecret = "" - } else { - x.OIDCClientSecret = (string)(r.DecodeString()) - } - case "OIDCDisableUserInfo": - if r.TryDecodeAsNil() { - x.OIDCDisableUserInfo = false - } else { - x.OIDCDisableUserInfo = (bool)(r.DecodeBool()) - } - case "OIDCScopes": - if r.TryDecodeAsNil() { - x.OIDCScopes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OIDCScopes), d) - } - } - case "BoundAudiences": - if r.TryDecodeAsNil() { - x.BoundAudiences = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.BoundAudiences), d) - } - } - case "BoundIssuer": - if r.TryDecodeAsNil() { - x.BoundIssuer = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.BoundIssuer), d) - } - } - case "AllowedRedirectURIs": - if r.TryDecodeAsNil() { - x.AllowedRedirectURIs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllowedRedirectURIs), d) - } - } - case "DiscoveryCaPem": - if r.TryDecodeAsNil() { - x.DiscoveryCaPem = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DiscoveryCaPem), d) - } - } - case "JWKSCACert": - if r.TryDecodeAsNil() { - x.JWKSCACert = "" - } else { - x.JWKSCACert = (string)(r.DecodeString()) - } - case "SigningAlgs": - if r.TryDecodeAsNil() { - x.SigningAlgs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.SigningAlgs), d) - } - } - case "ExpirationLeeway": - if r.TryDecodeAsNil() { - x.ExpirationLeeway = 0 - } else { - if false { - } else if yyxt25 := z.Extension(z.I2Rtid(x.ExpirationLeeway)); yyxt25 != nil { - z.DecExtension(x.ExpirationLeeway, yyxt25) - } else { - x.ExpirationLeeway = (time.Duration)(r.DecodeInt64()) - } - } - case "NotBeforeLeeway": - if r.TryDecodeAsNil() { - x.NotBeforeLeeway = 0 - } else { - if false { - } else if yyxt27 := z.Extension(z.I2Rtid(x.NotBeforeLeeway)); yyxt27 != nil { - z.DecExtension(x.NotBeforeLeeway, yyxt27) - } else { - x.NotBeforeLeeway = (time.Duration)(r.DecodeInt64()) - } - } - case "ClockSkewLeeway": - if r.TryDecodeAsNil() { - x.ClockSkewLeeway = 0 - } else { - if false { - } else if yyxt29 := z.Extension(z.I2Rtid(x.ClockSkewLeeway)); yyxt29 != nil { - z.DecExtension(x.ClockSkewLeeway, yyxt29) - } else { - x.ClockSkewLeeway = (time.Duration)(r.DecodeInt64()) - } - } - case "ClaimMappings": - if r.TryDecodeAsNil() { - x.ClaimMappings = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.ClaimMappings), d) - } - } - case "ListClaimMappings": - if r.TryDecodeAsNil() { - x.ListClaimMappings = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.ListClaimMappings), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLAuthMethodConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj34 int - var yyb34 bool - var yyhl34 bool = l >= 0 - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JWTValidationPubKeys = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.JWTValidationPubKeys), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JWKSURL = "" - } else { - x.JWKSURL = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OIDCDiscoveryURL = "" - } else { - x.OIDCDiscoveryURL = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OIDCClientID = "" - } else { - x.OIDCClientID = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OIDCClientSecret = "" - } else { - x.OIDCClientSecret = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OIDCDisableUserInfo = false - } else { - x.OIDCDisableUserInfo = (bool)(r.DecodeBool()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OIDCScopes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OIDCScopes), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BoundAudiences = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.BoundAudiences), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BoundIssuer = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.BoundIssuer), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowedRedirectURIs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllowedRedirectURIs), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiscoveryCaPem = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DiscoveryCaPem), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JWKSCACert = "" - } else { - x.JWKSCACert = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SigningAlgs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.SigningAlgs), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExpirationLeeway = 0 - } else { - if false { - } else if yyxt56 := z.Extension(z.I2Rtid(x.ExpirationLeeway)); yyxt56 != nil { - z.DecExtension(x.ExpirationLeeway, yyxt56) - } else { - x.ExpirationLeeway = (time.Duration)(r.DecodeInt64()) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NotBeforeLeeway = 0 - } else { - if false { - } else if yyxt58 := z.Extension(z.I2Rtid(x.NotBeforeLeeway)); yyxt58 != nil { - z.DecExtension(x.NotBeforeLeeway, yyxt58) - } else { - x.NotBeforeLeeway = (time.Duration)(r.DecodeInt64()) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClockSkewLeeway = 0 - } else { - if false { - } else if yyxt60 := z.Extension(z.I2Rtid(x.ClockSkewLeeway)); yyxt60 != nil { - z.DecExtension(x.ClockSkewLeeway, yyxt60) - } else { - x.ClockSkewLeeway = (time.Duration)(r.DecodeInt64()) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClaimMappings = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.ClaimMappings), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ListClaimMappings = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.ListClaimMappings), d) - } - } - for { - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj34-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLAuthClaims) 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.Value == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Value), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Value\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Value`) - } - r.WriteMapElemValue() - if x.Value == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Value), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.List == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicestring((map[string][]string)(x.List), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"List\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `List`) - } - r.WriteMapElemValue() - if x.List == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicestring((map[string][]string)(x.List), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLAuthClaims) 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 *ACLAuthClaims) 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 = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Value), d) - } - } - case "List": - if r.TryDecodeAsNil() { - x.List = nil - } else { - if false { - } else { - h.decMapstringSlicestring((*map[string][]string)(&x.List), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLAuthClaims) 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.Value = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Value), d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.List = nil - } else { - if false { - } else { - h.decMapstringSlicestring((*map[string][]string)(&x.List), 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 *ACLAuthMethodStub) 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.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.EncodeBool(bool(x.Default)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Default\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Default`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Default)) - } - } - 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 *ACLAuthMethodStub) 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 *ACLAuthMethodStub) 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 "Default": - if r.TryDecodeAsNil() { - x.Default = false - } else { - x.Default = (bool)(r.DecodeBool()) - } - 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 *ACLAuthMethodStub) 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.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.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.Default = false - } else { - x.Default = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), 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()) - } - 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 *ACLAuthMethodListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLAuthMethodListRequest) 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 *ACLAuthMethodListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLAuthMethodListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *ACLAuthMethodListResponse) 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.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLAuthMethodStub(([]*ACLAuthMethodStub)(x.AuthMethods), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethods\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethods`) - } - r.WriteMapElemValue() - if x.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLAuthMethodStub(([]*ACLAuthMethodStub)(x.AuthMethods), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLAuthMethodListResponse) 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 *ACLAuthMethodListResponse) 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 "AuthMethods": - if r.TryDecodeAsNil() { - x.AuthMethods = nil - } else { - if false { - } else { - h.decSlicePtrtoACLAuthMethodStub((*[]*ACLAuthMethodStub)(&x.AuthMethods), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLAuthMethodListResponse) 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.AuthMethods = nil - } else { - if false { - } else { - h.decSlicePtrtoACLAuthMethodStub((*[]*ACLAuthMethodStub)(&x.AuthMethods), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLAuthMethodGetRequest) 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.MethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.MethodName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MethodName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MethodName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.MethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.MethodName)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLAuthMethodGetRequest) 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 *ACLAuthMethodGetRequest) 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 "MethodName": - if r.TryDecodeAsNil() { - x.MethodName = "" - } else { - x.MethodName = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLAuthMethodGetRequest) 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.MethodName = "" - } else { - x.MethodName = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *ACLAuthMethodGetResponse) 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.AuthMethod == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.AuthMethod == nil { - r.EncodeNil() - } else { - x.AuthMethod.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethod\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethod`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.AuthMethod == nil { - r.EncodeNil() - } else { - x.AuthMethod.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLAuthMethodGetResponse) 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 *ACLAuthMethodGetResponse) 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 "AuthMethod": - if r.TryDecodeAsNil() { - if true && x.AuthMethod != nil { - x.AuthMethod = nil - } - } else { - if x.AuthMethod == nil { - x.AuthMethod = new(ACLAuthMethod) - } - - x.AuthMethod.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLAuthMethodGetResponse) 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.AuthMethod != nil { - x.AuthMethod = nil - } - } else { - if x.AuthMethod == nil { - x.AuthMethod = new(ACLAuthMethod) - } - - x.AuthMethod.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLAuthMethodsGetRequest) 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 x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLAuthMethodsGetRequest) 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 *ACLAuthMethodsGetRequest) 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 { - h.decSlicestring((*[]string)(&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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLAuthMethodsGetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Names = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Names), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLAuthMethodsGetResponse) 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.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLAuthMethod((map[string]*ACLAuthMethod)(x.AuthMethods), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethods\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethods`) - } - r.WriteMapElemValue() - if x.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLAuthMethod((map[string]*ACLAuthMethod)(x.AuthMethods), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLAuthMethodsGetResponse) 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 *ACLAuthMethodsGetResponse) 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 "AuthMethods": - if r.TryDecodeAsNil() { - x.AuthMethods = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLAuthMethod((*map[string]*ACLAuthMethod)(&x.AuthMethods), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLAuthMethodsGetResponse) 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.AuthMethods = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLAuthMethod((*map[string]*ACLAuthMethod)(&x.AuthMethods), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLAuthMethodUpsertRequest) 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.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLAuthMethod(([]*ACLAuthMethod)(x.AuthMethods), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethods\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethods`) - } - r.WriteMapElemValue() - if x.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLAuthMethod(([]*ACLAuthMethod)(x.AuthMethods), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLAuthMethodUpsertRequest) 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 *ACLAuthMethodUpsertRequest) 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 "AuthMethods": - if r.TryDecodeAsNil() { - x.AuthMethods = nil - } else { - if false { - } else { - h.decSlicePtrtoACLAuthMethod((*[]*ACLAuthMethod)(&x.AuthMethods), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLAuthMethodUpsertRequest) 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.AuthMethods = nil - } else { - if false { - } else { - h.decSlicePtrtoACLAuthMethod((*[]*ACLAuthMethod)(&x.AuthMethods), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLAuthMethodUpsertResponse) 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.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLAuthMethod(([]*ACLAuthMethod)(x.AuthMethods), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethods\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethods`) - } - r.WriteMapElemValue() - if x.AuthMethods == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLAuthMethod(([]*ACLAuthMethod)(x.AuthMethods), 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 *ACLAuthMethodUpsertResponse) 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 *ACLAuthMethodUpsertResponse) 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 "AuthMethods": - if r.TryDecodeAsNil() { - x.AuthMethods = nil - } else { - if false { - } else { - h.decSlicePtrtoACLAuthMethod((*[]*ACLAuthMethod)(&x.AuthMethods), 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 *ACLAuthMethodUpsertResponse) 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.AuthMethods = nil - } else { - if false { - } else { - h.decSlicePtrtoACLAuthMethod((*[]*ACLAuthMethod)(&x.AuthMethods), 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 *ACLAuthMethodDeleteRequest) 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.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLAuthMethodDeleteRequest) 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 *ACLAuthMethodDeleteRequest) 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLAuthMethodDeleteRequest) 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.Names = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Names), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLAuthMethodDeleteResponse) 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 *ACLAuthMethodDeleteResponse) 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 *ACLAuthMethodDeleteResponse) 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 *ACLAuthMethodDeleteResponse) 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 *ACLWhoAmIResponse) 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.Identity == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Identity == nil { - r.EncodeNil() - } else { - x.Identity.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Identity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Identity`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Identity == nil { - r.EncodeNil() - } else { - x.Identity.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLWhoAmIResponse) 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 *ACLWhoAmIResponse) 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 "Identity": - if r.TryDecodeAsNil() { - if true && x.Identity != nil { - x.Identity = nil - } - } else { - if x.Identity == nil { - x.Identity = new(AuthenticatedIdentity) - } - - x.Identity.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLWhoAmIResponse) 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.Identity != nil { - x.Identity = nil - } - } else { - if x.Identity == nil { - x.Identity = new(AuthenticatedIdentity) - } - - x.Identity.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLBindingRule) 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.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.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.AuthMethod))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethod)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethod\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethod`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthMethod))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethod)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Selector))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Selector)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Selector\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Selector`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Selector))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Selector)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BindType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BindType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BindType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BindType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BindType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BindType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BindName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BindName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BindName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BindName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BindName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BindName)) - } - } - } - 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 if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ModifyTime) - } else if yyxt28 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt28 != nil { - z.EncExtension(x.ModifyTime, yyxt28) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ModifyTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ModifyTime) - } else { - z.EncFallback(x.ModifyTime) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyTime`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ModifyTime) - } else if yyxt29 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt29 != nil { - z.EncExtension(x.ModifyTime, yyxt29) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ModifyTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ModifyTime) - } else { - z.EncFallback(x.ModifyTime) - } - } - 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 *ACLBindingRule) 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 *ACLBindingRule) 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 "Description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - case "AuthMethod": - if r.TryDecodeAsNil() { - x.AuthMethod = "" - } else { - x.AuthMethod = (string)(r.DecodeString()) - } - case "Selector": - if r.TryDecodeAsNil() { - x.Selector = "" - } else { - x.Selector = (string)(r.DecodeString()) - } - case "BindType": - if r.TryDecodeAsNil() { - x.BindType = "" - } else { - x.BindType = (string)(r.DecodeString()) - } - case "BindName": - if r.TryDecodeAsNil() { - x.BindName = "" - } else { - x.BindName = (string)(r.DecodeString()) - } - 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 "ModifyTime": - if r.TryDecodeAsNil() { - x.ModifyTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ModifyTime = r.DecodeTime() - } else if yyxt15 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt15 != nil { - z.DecExtension(x.ModifyTime, yyxt15) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ModifyTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ModifyTime) - } else { - z.DecFallback(&x.ModifyTime, 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 *ACLBindingRule) 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.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.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AuthMethod = "" - } else { - x.AuthMethod = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Selector = "" - } else { - x.Selector = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BindType = "" - } else { - x.BindType = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BindName = "" - } else { - x.BindName = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - 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) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ModifyTime = r.DecodeTime() - } else if yyxt30 := z.Extension(z.I2Rtid(x.ModifyTime)); yyxt30 != nil { - z.DecExtension(x.ModifyTime, yyxt30) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ModifyTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ModifyTime) - } else { - z.DecFallback(&x.ModifyTime, false) - } - } - 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 *ACLBindingRuleListStub) 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.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.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.AuthMethod))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethod)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethod\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethod`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthMethod))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethod)) - } - } - } - 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 *ACLBindingRuleListStub) 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 *ACLBindingRuleListStub) 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 "Description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - case "AuthMethod": - if r.TryDecodeAsNil() { - x.AuthMethod = "" - } else { - x.AuthMethod = (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 *ACLBindingRuleListStub) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AuthMethod = "" - } else { - x.AuthMethod = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), 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()) - } - 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 *ACLBindingRulesUpsertRequest) 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.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLBindingRule(([]*ACLBindingRule)(x.ACLBindingRules), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRules\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRules`) - } - r.WriteMapElemValue() - if x.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLBindingRule(([]*ACLBindingRule)(x.ACLBindingRules), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowMissingAuthMethods)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowMissingAuthMethods\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowMissingAuthMethods`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowMissingAuthMethods)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLBindingRulesUpsertRequest) 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 *ACLBindingRulesUpsertRequest) 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 "ACLBindingRules": - if r.TryDecodeAsNil() { - x.ACLBindingRules = nil - } else { - if false { - } else { - h.decSlicePtrtoACLBindingRule((*[]*ACLBindingRule)(&x.ACLBindingRules), d) - } - } - case "AllowMissingAuthMethods": - if r.TryDecodeAsNil() { - x.AllowMissingAuthMethods = false - } else { - x.AllowMissingAuthMethods = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLBindingRulesUpsertRequest) 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.ACLBindingRules = nil - } else { - if false { - } else { - h.decSlicePtrtoACLBindingRule((*[]*ACLBindingRule)(&x.ACLBindingRules), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowMissingAuthMethods = false - } else { - x.AllowMissingAuthMethods = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLBindingRulesUpsertResponse) 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.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLBindingRule(([]*ACLBindingRule)(x.ACLBindingRules), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRules\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRules`) - } - r.WriteMapElemValue() - if x.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLBindingRule(([]*ACLBindingRule)(x.ACLBindingRules), 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 *ACLBindingRulesUpsertResponse) 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 *ACLBindingRulesUpsertResponse) 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 "ACLBindingRules": - if r.TryDecodeAsNil() { - x.ACLBindingRules = nil - } else { - if false { - } else { - h.decSlicePtrtoACLBindingRule((*[]*ACLBindingRule)(&x.ACLBindingRules), 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 *ACLBindingRulesUpsertResponse) 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.ACLBindingRules = nil - } else { - if false { - } else { - h.decSlicePtrtoACLBindingRule((*[]*ACLBindingRule)(&x.ACLBindingRules), 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 *ACLBindingRulesDeleteRequest) 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.ACLBindingRuleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLBindingRuleIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRuleIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRuleIDs`) - } - r.WriteMapElemValue() - if x.ACLBindingRuleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLBindingRuleIDs), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLBindingRulesDeleteRequest) 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 *ACLBindingRulesDeleteRequest) 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 "ACLBindingRuleIDs": - if r.TryDecodeAsNil() { - x.ACLBindingRuleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLBindingRuleIDs), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLBindingRulesDeleteRequest) 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.ACLBindingRuleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLBindingRuleIDs), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLBindingRulesDeleteResponse) 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 *ACLBindingRulesDeleteResponse) 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 *ACLBindingRulesDeleteResponse) 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 *ACLBindingRulesDeleteResponse) 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 *ACLBindingRulesListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLBindingRulesListRequest) 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 *ACLBindingRulesListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLBindingRulesListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *ACLBindingRulesListResponse) 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.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLBindingRuleListStub(([]*ACLBindingRuleListStub)(x.ACLBindingRules), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRules\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRules`) - } - r.WriteMapElemValue() - if x.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLBindingRuleListStub(([]*ACLBindingRuleListStub)(x.ACLBindingRules), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLBindingRulesListResponse) 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 *ACLBindingRulesListResponse) 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 "ACLBindingRules": - if r.TryDecodeAsNil() { - x.ACLBindingRules = nil - } else { - if false { - } else { - h.decSlicePtrtoACLBindingRuleListStub((*[]*ACLBindingRuleListStub)(&x.ACLBindingRules), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLBindingRulesListResponse) 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.ACLBindingRules = nil - } else { - if false { - } else { - h.decSlicePtrtoACLBindingRuleListStub((*[]*ACLBindingRuleListStub)(&x.ACLBindingRules), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLBindingRulesRequest) 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 x.ACLBindingRuleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLBindingRuleIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRuleIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRuleIDs`) - } - r.WriteMapElemValue() - if x.ACLBindingRuleIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ACLBindingRuleIDs), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLBindingRulesRequest) 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 *ACLBindingRulesRequest) 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 "ACLBindingRuleIDs": - if r.TryDecodeAsNil() { - x.ACLBindingRuleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLBindingRuleIDs), 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLBindingRulesRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ACLBindingRuleIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ACLBindingRuleIDs), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLBindingRulesResponse) 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.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLBindingRule((map[string]*ACLBindingRule)(x.ACLBindingRules), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRules\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRules`) - } - r.WriteMapElemValue() - if x.ACLBindingRules == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLBindingRule((map[string]*ACLBindingRule)(x.ACLBindingRules), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLBindingRulesResponse) 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 *ACLBindingRulesResponse) 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 "ACLBindingRules": - if r.TryDecodeAsNil() { - x.ACLBindingRules = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLBindingRule((*map[string]*ACLBindingRule)(&x.ACLBindingRules), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLBindingRulesResponse) 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.ACLBindingRules = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLBindingRule((*map[string]*ACLBindingRule)(&x.ACLBindingRules), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLBindingRuleRequest) 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.ACLBindingRuleID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ACLBindingRuleID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRuleID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRuleID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ACLBindingRuleID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ACLBindingRuleID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ACLBindingRuleRequest) 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 *ACLBindingRuleRequest) 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 "ACLBindingRuleID": - if r.TryDecodeAsNil() { - x.ACLBindingRuleID = "" - } else { - x.ACLBindingRuleID = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ACLBindingRuleRequest) 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.ACLBindingRuleID = "" - } else { - x.ACLBindingRuleID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *ACLBindingRuleResponse) 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.ACLBindingRule == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLBindingRule == nil { - r.EncodeNil() - } else { - x.ACLBindingRule.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRule`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLBindingRule == nil { - r.EncodeNil() - } else { - x.ACLBindingRule.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLBindingRuleResponse) 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 *ACLBindingRuleResponse) 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 "ACLBindingRule": - if r.TryDecodeAsNil() { - if true && x.ACLBindingRule != nil { - x.ACLBindingRule = nil - } - } else { - if x.ACLBindingRule == nil { - x.ACLBindingRule = new(ACLBindingRule) - } - - x.ACLBindingRule.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLBindingRuleResponse) 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.ACLBindingRule != nil { - x.ACLBindingRule = nil - } - } else { - if x.ACLBindingRule == nil { - x.ACLBindingRule = new(ACLBindingRule) - } - - x.ACLBindingRule.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ACLOIDCAuthURLRequest) 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.AuthMethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethodName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethodName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethodName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthMethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethodName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RedirectURI))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RedirectURI)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RedirectURI\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RedirectURI`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RedirectURI))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RedirectURI)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientNonce))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientNonce)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientNonce\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientNonce`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientNonce))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientNonce)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLOIDCAuthURLRequest) 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 *ACLOIDCAuthURLRequest) 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 "AuthMethodName": - if r.TryDecodeAsNil() { - x.AuthMethodName = "" - } else { - x.AuthMethodName = (string)(r.DecodeString()) - } - case "RedirectURI": - if r.TryDecodeAsNil() { - x.RedirectURI = "" - } else { - x.RedirectURI = (string)(r.DecodeString()) - } - case "ClientNonce": - if r.TryDecodeAsNil() { - x.ClientNonce = "" - } else { - x.ClientNonce = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLOIDCAuthURLRequest) 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.AuthMethodName = "" - } else { - x.AuthMethodName = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RedirectURI = "" - } else { - x.RedirectURI = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientNonce = "" - } else { - x.ClientNonce = (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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLOIDCAuthURLResponse) 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.AuthURL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthURL)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthURL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthURL`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthURL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthURL)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLOIDCAuthURLResponse) 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 *ACLOIDCAuthURLResponse) 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 "AuthURL": - if r.TryDecodeAsNil() { - x.AuthURL = "" - } else { - x.AuthURL = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLOIDCAuthURLResponse) 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.AuthURL = "" - } else { - x.AuthURL = (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 *ACLOIDCCompleteAuthRequest) 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.AuthMethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethodName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethodName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethodName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthMethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethodName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientNonce))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientNonce)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientNonce\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientNonce`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientNonce))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientNonce)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Code))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Code)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Code\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Code`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Code))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Code)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RedirectURI))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RedirectURI)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RedirectURI\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RedirectURI`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RedirectURI))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RedirectURI)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLOIDCCompleteAuthRequest) 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 *ACLOIDCCompleteAuthRequest) 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 "AuthMethodName": - if r.TryDecodeAsNil() { - x.AuthMethodName = "" - } else { - x.AuthMethodName = (string)(r.DecodeString()) - } - case "ClientNonce": - if r.TryDecodeAsNil() { - x.ClientNonce = "" - } else { - x.ClientNonce = (string)(r.DecodeString()) - } - case "State": - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State = (string)(r.DecodeString()) - } - case "Code": - if r.TryDecodeAsNil() { - x.Code = "" - } else { - x.Code = (string)(r.DecodeString()) - } - case "RedirectURI": - if r.TryDecodeAsNil() { - x.RedirectURI = "" - } else { - x.RedirectURI = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLOIDCCompleteAuthRequest) 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.AuthMethodName = "" - } else { - x.AuthMethodName = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientNonce = "" - } else { - x.ClientNonce = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Code = "" - } else { - x.Code = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RedirectURI = "" - } else { - x.RedirectURI = (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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLLoginResponse) 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.ACLToken == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLToken == nil { - r.EncodeNil() - } else { - x.ACLToken.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLToken`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLToken == nil { - r.EncodeNil() - } else { - x.ACLToken.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 *ACLLoginResponse) 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 *ACLLoginResponse) 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 "ACLToken": - if r.TryDecodeAsNil() { - if true && x.ACLToken != nil { - x.ACLToken = nil - } - } else { - if x.ACLToken == nil { - x.ACLToken = new(ACLToken) - } - - x.ACLToken.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 *ACLLoginResponse) 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.ACLToken != nil { - x.ACLToken = nil - } - } else { - if x.ACLToken == nil { - x.ACLToken = new(ACLToken) - } - - x.ACLToken.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 *ACLLoginRequest) 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.AuthMethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethodName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethodName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethodName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthMethodName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthMethodName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LoginToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LoginToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LoginToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LoginToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LoginToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LoginToken)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ACLLoginRequest) 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 *ACLLoginRequest) 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 "AuthMethodName": - if r.TryDecodeAsNil() { - x.AuthMethodName = "" - } else { - x.AuthMethodName = (string)(r.DecodeString()) - } - case "LoginToken": - if r.TryDecodeAsNil() { - x.LoginToken = "" - } else { - x.LoginToken = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ACLLoginRequest) 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.AuthMethodName = "" - } else { - x.AuthMethodName = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LoginToken = "" - } else { - x.LoginToken = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *Action) 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.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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Args), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Action) 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 *Action) 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 "Command": - if r.TryDecodeAsNil() { - x.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - case "Args": - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Action) 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.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), 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 *JobAction) 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.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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Args), e) - } - } - } - 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.TaskGroupName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroupName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroupName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroupName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroupName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroupName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobAction) 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 *JobAction) 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.Action.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Command": - if r.TryDecodeAsNil() { - x.Action.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - case "Args": - if r.TryDecodeAsNil() { - x.Action.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), d) - } - } - case "TaskName": - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - case "TaskGroupName": - if r.TryDecodeAsNil() { - x.TaskGroupName = "" - } else { - x.TaskGroupName = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobAction) 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.Action.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.Action.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Action.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroupName = "" - } else { - x.TaskGroupName = (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 *JobActionListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *JobActionListRequest) 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 *JobActionListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *JobActionListRequest) 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.JobID = "" - } else { - x.JobID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *JobActionListResponse) 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.Actions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobAction(([]*JobAction)(x.Actions), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Actions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Actions`) - } - r.WriteMapElemValue() - if x.Actions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobAction(([]*JobAction)(x.Actions), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobActionListResponse) 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 *JobActionListResponse) 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 "Actions": - if r.TryDecodeAsNil() { - x.Actions = nil - } else { - if false { - } else { - h.decSlicePtrtoJobAction((*[]*JobAction)(&x.Actions), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobActionListResponse) 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.Actions = nil - } else { - if false { - } else { - h.decSlicePtrtoJobAction((*[]*JobAction)(&x.Actions), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *AllocServiceRegistrationsRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *AllocServiceRegistrationsRequest) 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 *AllocServiceRegistrationsRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *AllocServiceRegistrationsRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *AllocServiceRegistrationsResponse) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(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.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(x.Services), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocServiceRegistrationsResponse) 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 *AllocServiceRegistrationsResponse) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocServiceRegistrationsResponse) 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.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *AllocInfo) 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.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Group\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Group`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } - 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.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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocInfo) 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 *AllocInfo) 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 "Group": - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - 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()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocInfo) 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.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - 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.Namespace = "" - } else { - x.Namespace = (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 *OperatorHealthReply) 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.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 { - r.EncodeInt(int64(x.FailureTolerance)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailureTolerance\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailureTolerance`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.FailureTolerance)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceServerHealth(([]ServerHealth)(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.encSliceServerHealth(([]ServerHealth)(x.Servers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Leader))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Leader)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Leader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Leader`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Leader))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Leader)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Voters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Voters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Voters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Voters`) - } - r.WriteMapElemValue() - if x.Voters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Voters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ReadReplicas == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ReadReplicas), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReadReplicas\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReadReplicas`) - } - r.WriteMapElemValue() - if x.ReadReplicas == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ReadReplicas), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.RedundancyZones == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringAutopilotZone((map[string]AutopilotZone)(x.RedundancyZones), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RedundancyZones\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RedundancyZones`) - } - r.WriteMapElemValue() - if x.RedundancyZones == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringAutopilotZone((map[string]AutopilotZone)(x.RedundancyZones), e) - } - } - } - var yyn24 bool - if x.Upgrade == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Upgrade == nil { - r.EncodeNil() - } else { - x.Upgrade.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Upgrade\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Upgrade`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Upgrade == nil { - r.EncodeNil() - } else { - x.Upgrade.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.OptimisticFailureTolerance)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OptimisticFailureTolerance\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OptimisticFailureTolerance`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.OptimisticFailureTolerance)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *OperatorHealthReply) 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 *OperatorHealthReply) 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() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - case "FailureTolerance": - if r.TryDecodeAsNil() { - x.FailureTolerance = 0 - } else { - x.FailureTolerance = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Servers": - if r.TryDecodeAsNil() { - x.Servers = nil - } else { - if false { - } else { - h.decSliceServerHealth((*[]ServerHealth)(&x.Servers), d) - } - } - case "Leader": - if r.TryDecodeAsNil() { - x.Leader = "" - } else { - x.Leader = (string)(r.DecodeString()) - } - case "Voters": - if r.TryDecodeAsNil() { - x.Voters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Voters), d) - } - } - case "ReadReplicas": - if r.TryDecodeAsNil() { - x.ReadReplicas = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ReadReplicas), d) - } - } - case "RedundancyZones": - if r.TryDecodeAsNil() { - x.RedundancyZones = nil - } else { - if false { - } else { - h.decMapstringAutopilotZone((*map[string]AutopilotZone)(&x.RedundancyZones), d) - } - } - case "Upgrade": - if r.TryDecodeAsNil() { - if true && x.Upgrade != nil { - x.Upgrade = nil - } - } else { - if x.Upgrade == nil { - x.Upgrade = new(AutopilotUpgrade) - } - - x.Upgrade.CodecDecodeSelf(d) - } - case "OptimisticFailureTolerance": - if r.TryDecodeAsNil() { - x.OptimisticFailureTolerance = 0 - } else { - x.OptimisticFailureTolerance = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *OperatorHealthReply) 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.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailureTolerance = 0 - } else { - x.FailureTolerance = (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.Servers = nil - } else { - if false { - } else { - h.decSliceServerHealth((*[]ServerHealth)(&x.Servers), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Leader = "" - } else { - x.Leader = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Voters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Voters), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadReplicas = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ReadReplicas), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RedundancyZones = nil - } else { - if false { - } else { - h.decMapstringAutopilotZone((*map[string]AutopilotZone)(&x.RedundancyZones), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Upgrade != nil { - x.Upgrade = nil - } - } else { - if x.Upgrade == nil { - x.Upgrade = new(AutopilotUpgrade) - } - - x.Upgrade.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OptimisticFailureTolerance = 0 - } else { - x.OptimisticFailureTolerance = (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 *ServerHealth) 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.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.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 yyxt13 := z.Extension(z.I2Rtid(x.SerfStatus)); yyxt13 != nil { - z.EncExtension(x.SerfStatus, yyxt13) - } else { - r.EncodeInt(int64(x.SerfStatus)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SerfStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SerfStatus`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.SerfStatus)); yyxt14 != nil { - z.EncExtension(x.SerfStatus, yyxt14) - } else { - r.EncodeInt(int64(x.SerfStatus)) - } - } - 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.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 yyxt22 := z.Extension(z.I2Rtid(x.LastContact)); yyxt22 != nil { - z.EncExtension(x.LastContact, yyxt22) - } 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 yyxt23 := z.Extension(z.I2Rtid(x.LastContact)); yyxt23 != nil { - z.EncExtension(x.LastContact, yyxt23) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.LastTerm)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastTerm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastTerm`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.LastTerm)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.LastIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.LastIndex)) - } - } - 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 { - 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().TimeNotBuiltin { - r.EncodeTime(x.StableSince) - } else if yyxt37 := z.Extension(z.I2Rtid(x.StableSince)); yyxt37 != nil { - z.EncExtension(x.StableSince, yyxt37) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.StableSince) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.StableSince) - } else { - z.EncFallback(x.StableSince) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StableSince\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StableSince`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.StableSince) - } else if yyxt38 := z.Extension(z.I2Rtid(x.StableSince)); yyxt38 != nil { - z.EncExtension(x.StableSince, yyxt38) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.StableSince) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.StableSince) - } else { - z.EncFallback(x.StableSince) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServerHealth) 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 *ServerHealth) 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 "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - case "SerfStatus": - if r.TryDecodeAsNil() { - x.SerfStatus = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.SerfStatus)); yyxt8 != nil { - z.DecExtension(x.SerfStatus, yyxt8) - } else { - x.SerfStatus = (pkg2_serf.MemberStatus)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - } - case "Version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - case "Leader": - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.LastContact = 0 - } else { - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "LastTerm": - if r.TryDecodeAsNil() { - x.LastTerm = 0 - } else { - x.LastTerm = (uint64)(r.DecodeUint64()) - } - case "LastIndex": - if r.TryDecodeAsNil() { - x.LastIndex = 0 - } else { - x.LastIndex = (uint64)(r.DecodeUint64()) - } - case "Healthy": - if r.TryDecodeAsNil() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - case "Voter": - if r.TryDecodeAsNil() { - x.Voter = false - } else { - x.Voter = (bool)(r.DecodeBool()) - } - case "StableSince": - if r.TryDecodeAsNil() { - x.StableSince = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StableSince = r.DecodeTime() - } else if yyxt18 := z.Extension(z.I2Rtid(x.StableSince)); yyxt18 != nil { - z.DecExtension(x.StableSince, yyxt18) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StableSince) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StableSince) - } else { - z.DecFallback(&x.StableSince, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServerHealth) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SerfStatus = 0 - } else { - if false { - } else if yyxt24 := z.Extension(z.I2Rtid(x.SerfStatus)); yyxt24 != nil { - z.DecExtension(x.SerfStatus, yyxt24) - } else { - x.SerfStatus = (pkg2_serf.MemberStatus)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastContact = 0 - } else { - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.LastContact)); yyxt28 != nil { - z.DecExtension(x.LastContact, yyxt28) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastTerm = 0 - } else { - x.LastTerm = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastIndex = 0 - } else { - x.LastIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Voter = false - } else { - x.Voter = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StableSince = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StableSince = r.DecodeTime() - } else if yyxt34 := z.Extension(z.I2Rtid(x.StableSince)); yyxt34 != nil { - z.DecExtension(x.StableSince, yyxt34) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StableSince) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StableSince) - } else { - z.DecFallback(&x.StableSince, false) - } - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *AutopilotZone) 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.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Servers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Voters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Voters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Voters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Voters`) - } - r.WriteMapElemValue() - if x.Voters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Voters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.FailureTolerance)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailureTolerance\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailureTolerance`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.FailureTolerance)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AutopilotZone) 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 *AutopilotZone) 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.decSlicestring((*[]string)(&x.Servers), d) - } - } - case "Voters": - if r.TryDecodeAsNil() { - x.Voters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Voters), d) - } - } - case "FailureTolerance": - if r.TryDecodeAsNil() { - x.FailureTolerance = 0 - } else { - x.FailureTolerance = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AutopilotZone) 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.Servers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Servers), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Voters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Voters), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailureTolerance = 0 - } else { - x.FailureTolerance = (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 *AutopilotUpgrade) 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.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.TargetVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TargetVersion)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TargetVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TargetVersion`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TargetVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TargetVersion)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TargetVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TargetVersionVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TargetVersionVoters`) - } - r.WriteMapElemValue() - if x.TargetVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TargetVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionNonVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TargetVersionNonVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TargetVersionNonVoters`) - } - r.WriteMapElemValue() - if x.TargetVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionNonVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TargetVersionReadReplicas == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionReadReplicas), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TargetVersionReadReplicas\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TargetVersionReadReplicas`) - } - r.WriteMapElemValue() - if x.TargetVersionReadReplicas == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionReadReplicas), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OtherVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OtherVersionVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OtherVersionVoters`) - } - r.WriteMapElemValue() - if x.OtherVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OtherVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionNonVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OtherVersionNonVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OtherVersionNonVoters`) - } - r.WriteMapElemValue() - if x.OtherVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionNonVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OtherVersionReadReplicas == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionReadReplicas), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OtherVersionReadReplicas\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OtherVersionReadReplicas`) - } - r.WriteMapElemValue() - if x.OtherVersionReadReplicas == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionReadReplicas), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.RedundancyZones == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringAutopilotZoneUpgradeVersions((map[string]AutopilotZoneUpgradeVersions)(x.RedundancyZones), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RedundancyZones\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RedundancyZones`) - } - r.WriteMapElemValue() - if x.RedundancyZones == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringAutopilotZoneUpgradeVersions((map[string]AutopilotZoneUpgradeVersions)(x.RedundancyZones), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AutopilotUpgrade) 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 *AutopilotUpgrade) 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 "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "TargetVersion": - if r.TryDecodeAsNil() { - x.TargetVersion = "" - } else { - x.TargetVersion = (string)(r.DecodeString()) - } - case "TargetVersionVoters": - if r.TryDecodeAsNil() { - x.TargetVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionVoters), d) - } - } - case "TargetVersionNonVoters": - if r.TryDecodeAsNil() { - x.TargetVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionNonVoters), d) - } - } - case "TargetVersionReadReplicas": - if r.TryDecodeAsNil() { - x.TargetVersionReadReplicas = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionReadReplicas), d) - } - } - case "OtherVersionVoters": - if r.TryDecodeAsNil() { - x.OtherVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionVoters), d) - } - } - case "OtherVersionNonVoters": - if r.TryDecodeAsNil() { - x.OtherVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionNonVoters), d) - } - } - case "OtherVersionReadReplicas": - if r.TryDecodeAsNil() { - x.OtherVersionReadReplicas = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionReadReplicas), d) - } - } - case "RedundancyZones": - if r.TryDecodeAsNil() { - x.RedundancyZones = nil - } else { - if false { - } else { - h.decMapstringAutopilotZoneUpgradeVersions((*map[string]AutopilotZoneUpgradeVersions)(&x.RedundancyZones), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AutopilotUpgrade) 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.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TargetVersion = "" - } else { - x.TargetVersion = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TargetVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionVoters), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TargetVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionNonVoters), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TargetVersionReadReplicas = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionReadReplicas), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OtherVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionVoters), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OtherVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionNonVoters), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OtherVersionReadReplicas = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionReadReplicas), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RedundancyZones = nil - } else { - if false { - } else { - h.decMapstringAutopilotZoneUpgradeVersions((*map[string]AutopilotZoneUpgradeVersions)(&x.RedundancyZones), d) - } - } - for { - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj20-1, "") - } - r.ReadArrayEnd() -} - -func (x *AutopilotZoneUpgradeVersions) 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.TargetVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TargetVersionVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TargetVersionVoters`) - } - r.WriteMapElemValue() - if x.TargetVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TargetVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionNonVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TargetVersionNonVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TargetVersionNonVoters`) - } - r.WriteMapElemValue() - if x.TargetVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.TargetVersionNonVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OtherVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OtherVersionVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OtherVersionVoters`) - } - r.WriteMapElemValue() - if x.OtherVersionVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OtherVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionNonVoters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OtherVersionNonVoters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OtherVersionNonVoters`) - } - r.WriteMapElemValue() - if x.OtherVersionNonVoters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.OtherVersionNonVoters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AutopilotZoneUpgradeVersions) 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 *AutopilotZoneUpgradeVersions) 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 "TargetVersionVoters": - if r.TryDecodeAsNil() { - x.TargetVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionVoters), d) - } - } - case "TargetVersionNonVoters": - if r.TryDecodeAsNil() { - x.TargetVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionNonVoters), d) - } - } - case "OtherVersionVoters": - if r.TryDecodeAsNil() { - x.OtherVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionVoters), d) - } - } - case "OtherVersionNonVoters": - if r.TryDecodeAsNil() { - x.OtherVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionNonVoters), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AutopilotZoneUpgradeVersions) 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.TargetVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionVoters), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TargetVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.TargetVersionNonVoters), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OtherVersionVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionVoters), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OtherVersionNonVoters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.OtherVersionNonVoters), 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 *RaftStats) 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.LastContact))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LastContact)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LastContact))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LastContact)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.LastTerm)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastTerm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastTerm`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.LastTerm)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.LastIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.LastIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RaftStats) 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 *RaftStats) 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 "LastContact": - if r.TryDecodeAsNil() { - x.LastContact = "" - } else { - x.LastContact = (string)(r.DecodeString()) - } - case "LastTerm": - if r.TryDecodeAsNil() { - x.LastTerm = 0 - } else { - x.LastTerm = (uint64)(r.DecodeUint64()) - } - case "LastIndex": - if r.TryDecodeAsNil() { - x.LastIndex = 0 - } else { - x.LastIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RaftStats) 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.LastContact = "" - } else { - x.LastContact = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastTerm = 0 - } else { - x.LastTerm = (uint64)(r.DecodeUint64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastIndex = 0 - } else { - x.LastIndex = (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 *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 CheckMode) 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 *CheckMode) 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 = (CheckMode)(r.DecodeString()) - } -} - -func (x CheckID) 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 *CheckID) 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 = (CheckID)(r.DecodeString()) - } -} - -func (x *CheckQueryResult) 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() - x.ID.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - x.ID.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Mode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Mode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Mode`) - } - r.WriteMapElemValue() - x.Mode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Status.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - x.Status.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.StatusCode)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusCode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusCode`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.StatusCode)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Output))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Output)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Output\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Output`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Output))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Output)) - } - } - } - 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(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Group\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Group`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } - 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.Service))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Service)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Service\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Service`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Service))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Service)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Check))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Check)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Check\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Check`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Check))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Check)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CheckQueryResult) 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 *CheckQueryResult) 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.CodecDecodeSelf(d) - } - case "Mode": - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode.CodecDecodeSelf(d) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status.CodecDecodeSelf(d) - } - case "StatusCode": - if r.TryDecodeAsNil() { - x.StatusCode = 0 - } else { - x.StatusCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Output": - if r.TryDecodeAsNil() { - x.Output = "" - } else { - x.Output = (string)(r.DecodeString()) - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - case "Group": - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - case "Service": - if r.TryDecodeAsNil() { - x.Service = "" - } else { - x.Service = (string)(r.DecodeString()) - } - case "Check": - if r.TryDecodeAsNil() { - x.Check = "" - } else { - x.Check = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CheckQueryResult) 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.ID = "" - } else { - x.ID.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusCode = 0 - } else { - x.StatusCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Output = "" - } else { - x.Output = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Service = "" - } else { - x.Service = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Check = "" - } else { - x.Check = (string)(r.DecodeString()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x CheckStatus) 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 *CheckStatus) 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 = (CheckStatus)(r.DecodeString()) - } -} - -func (x *CNIConfig) 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.Args == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Args), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CNIConfig) 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 *CNIConfig) 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 "Args": - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Args), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CNIConfig) 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.Args = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Args), 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 *ConsulConfigEntries) 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.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cluster\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cluster`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Partition))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Partition)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Partition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Partition`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Partition))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Partition)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Ingress == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoConsulIngressConfigEntry((map[string]*ConsulIngressConfigEntry)(x.Ingress), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Ingress\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Ingress`) - } - r.WriteMapElemValue() - if x.Ingress == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoConsulIngressConfigEntry((map[string]*ConsulIngressConfigEntry)(x.Ingress), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Terminating == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoConsulTerminatingConfigEntry((map[string]*ConsulTerminatingConfigEntry)(x.Terminating), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Terminating\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Terminating`) - } - r.WriteMapElemValue() - if x.Terminating == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoConsulTerminatingConfigEntry((map[string]*ConsulTerminatingConfigEntry)(x.Terminating), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulConfigEntries) 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 *ConsulConfigEntries) 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 "Cluster": - if r.TryDecodeAsNil() { - x.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - case "Partition": - if r.TryDecodeAsNil() { - x.Partition = "" - } else { - x.Partition = (string)(r.DecodeString()) - } - case "Ingress": - if r.TryDecodeAsNil() { - x.Ingress = nil - } else { - if false { - } else { - h.decMapstringPtrtoConsulIngressConfigEntry((*map[string]*ConsulIngressConfigEntry)(&x.Ingress), d) - } - } - case "Terminating": - if r.TryDecodeAsNil() { - x.Terminating = nil - } else { - if false { - } else { - h.decMapstringPtrtoConsulTerminatingConfigEntry((*map[string]*ConsulTerminatingConfigEntry)(&x.Terminating), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulConfigEntries) 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.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Partition = "" - } else { - x.Partition = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Ingress = nil - } else { - if false { - } else { - h.decMapstringPtrtoConsulIngressConfigEntry((*map[string]*ConsulIngressConfigEntry)(&x.Ingress), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Terminating = nil - } else { - if false { - } else { - h.decMapstringPtrtoConsulTerminatingConfigEntry((*map[string]*ConsulTerminatingConfigEntry)(&x.Terminating), 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 *ConsulTransparentProxy) 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.UID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.UID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.UID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.UID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.OutboundPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OutboundPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OutboundPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.OutboundPort)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ExcludeInboundPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExcludeInboundPorts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExcludeInboundPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExcludeInboundPorts`) - } - r.WriteMapElemValue() - if x.ExcludeInboundPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExcludeInboundPorts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ExcludeOutboundPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ExcludeOutboundPorts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExcludeOutboundPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExcludeOutboundPorts`) - } - r.WriteMapElemValue() - if x.ExcludeOutboundPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ExcludeOutboundPorts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ExcludeOutboundCIDRs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExcludeOutboundCIDRs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExcludeOutboundCIDRs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExcludeOutboundCIDRs`) - } - r.WriteMapElemValue() - if x.ExcludeOutboundCIDRs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExcludeOutboundCIDRs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ExcludeUIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExcludeUIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExcludeUIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExcludeUIDs`) - } - r.WriteMapElemValue() - if x.ExcludeUIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExcludeUIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.NoDNS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NoDNS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NoDNS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.NoDNS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulTransparentProxy) 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 *ConsulTransparentProxy) 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 "UID": - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = (string)(r.DecodeString()) - } - case "OutboundPort": - if r.TryDecodeAsNil() { - x.OutboundPort = 0 - } else { - x.OutboundPort = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - case "ExcludeInboundPorts": - if r.TryDecodeAsNil() { - x.ExcludeInboundPorts = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExcludeInboundPorts), d) - } - } - case "ExcludeOutboundPorts": - if r.TryDecodeAsNil() { - x.ExcludeOutboundPorts = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ExcludeOutboundPorts), d) - } - } - case "ExcludeOutboundCIDRs": - if r.TryDecodeAsNil() { - x.ExcludeOutboundCIDRs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExcludeOutboundCIDRs), d) - } - } - case "ExcludeUIDs": - if r.TryDecodeAsNil() { - x.ExcludeUIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExcludeUIDs), d) - } - } - case "NoDNS": - if r.TryDecodeAsNil() { - x.NoDNS = false - } else { - x.NoDNS = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulTransparentProxy) 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.UID = "" - } else { - x.UID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OutboundPort = 0 - } else { - x.OutboundPort = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExcludeInboundPorts = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExcludeInboundPorts), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExcludeOutboundPorts = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ExcludeOutboundPorts), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExcludeOutboundCIDRs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExcludeOutboundCIDRs), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExcludeUIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExcludeUIDs), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NoDNS = false - } else { - x.NoDNS = (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 *Consul) 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.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.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cluster\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cluster`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Partition))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Partition)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Partition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Partition`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Partition))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Partition)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Consul) 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 *Consul) 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 "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Cluster": - if r.TryDecodeAsNil() { - x.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - case "Partition": - if r.TryDecodeAsNil() { - x.Partition = "" - } else { - x.Partition = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Consul) 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.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Partition = "" - } else { - x.Partition = (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 *ConsulUsage) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Services), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KV)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KV\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KV`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KV)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulUsage) 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 *ConsulUsage) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Services), d) - } - } - case "KV": - if r.TryDecodeAsNil() { - x.KV = false - } else { - x.KV = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulUsage) 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.Services = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Services), d) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KV = false - } else { - x.KV = (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 CSIPluginType) 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 *CSIPluginType) 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 = (CSIPluginType)(r.DecodeString()) - } -} - -func (x *TaskCSIPluginConfig) 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() - 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.MountDir))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.MountDir)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MountDir\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MountDir`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.MountDir))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.MountDir)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StagePublishBaseDir))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StagePublishBaseDir)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StagePublishBaseDir\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StagePublishBaseDir`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StagePublishBaseDir))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StagePublishBaseDir)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.HealthTimeout)); yyxt16 != nil { - z.EncExtension(x.HealthTimeout, yyxt16) - } else { - r.EncodeInt(int64(x.HealthTimeout)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthTimeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthTimeout`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.HealthTimeout)); yyxt17 != nil { - z.EncExtension(x.HealthTimeout, yyxt17) - } else { - r.EncodeInt(int64(x.HealthTimeout)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskCSIPluginConfig) 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 *TaskCSIPluginConfig) 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 "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - case "MountDir": - if r.TryDecodeAsNil() { - x.MountDir = "" - } else { - x.MountDir = (string)(r.DecodeString()) - } - case "StagePublishBaseDir": - if r.TryDecodeAsNil() { - x.StagePublishBaseDir = "" - } else { - x.StagePublishBaseDir = (string)(r.DecodeString()) - } - case "HealthTimeout": - if r.TryDecodeAsNil() { - x.HealthTimeout = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.HealthTimeout)); yyxt9 != nil { - z.DecExtension(x.HealthTimeout, yyxt9) - } else { - x.HealthTimeout = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskCSIPluginConfig) 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.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.MountDir = "" - } else { - x.MountDir = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StagePublishBaseDir = "" - } else { - x.StagePublishBaseDir = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthTimeout = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.HealthTimeout)); yyxt16 != nil { - z.DecExtension(x.HealthTimeout, yyxt16) - } else { - x.HealthTimeout = (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 *CSIVolumeCapability) 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() - x.AttachmentMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AttachmentMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AttachmentMode`) - } - r.WriteMapElemValue() - x.AttachmentMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AccessMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessMode`) - } - r.WriteMapElemValue() - x.AccessMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeCapability) 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 *CSIVolumeCapability) 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 "AttachmentMode": - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - case "AccessMode": - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeCapability) 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.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.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 CSIVolumeAttachmentMode) 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 *CSIVolumeAttachmentMode) 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 = (CSIVolumeAttachmentMode)(r.DecodeString()) - } -} - -func (x CSIVolumeAccessMode) 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 *CSIVolumeAccessMode) 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 = (CSIVolumeAccessMode)(r.DecodeString()) - } -} - -func (x *CSIMountOptions) 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.FSType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FSType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FSType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FSType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FSType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FSType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.MountFlags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.MountFlags), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MountFlags\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MountFlags`) - } - r.WriteMapElemValue() - if x.MountFlags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.MountFlags), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIMountOptions) 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 *CSIMountOptions) 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 "FSType": - if r.TryDecodeAsNil() { - x.FSType = "" - } else { - x.FSType = (string)(r.DecodeString()) - } - case "MountFlags": - if r.TryDecodeAsNil() { - x.MountFlags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.MountFlags), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIMountOptions) 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.FSType = "" - } else { - x.FSType = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MountFlags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.MountFlags), 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 CSISecrets) 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.encCSISecrets((CSISecrets)(x), e) - } - } -} - -func (x *CSISecrets) 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.decCSISecrets((*CSISecrets)(x), d) - } -} - -func (x *CSIVolumeClaim) 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.AllocationID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocationID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocationID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocationID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocationID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocationID)) - } - } - } - 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.ExternalNodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalNodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExternalNodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExternalNodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ExternalNodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalNodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Mode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Mode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Mode`) - } - r.WriteMapElemValue() - x.Mode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AccessMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessMode`) - } - r.WriteMapElemValue() - x.AccessMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AttachmentMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AttachmentMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AttachmentMode`) - } - r.WriteMapElemValue() - x.AttachmentMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.State.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"State\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `State`) - } - r.WriteMapElemValue() - x.State.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeClaim) 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 *CSIVolumeClaim) 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 "AllocationID": - if r.TryDecodeAsNil() { - x.AllocationID = "" - } else { - x.AllocationID = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "ExternalNodeID": - if r.TryDecodeAsNil() { - x.ExternalNodeID = "" - } else { - x.ExternalNodeID = (string)(r.DecodeString()) - } - case "Mode": - if r.TryDecodeAsNil() { - x.Mode = 0 - } else { - x.Mode.CodecDecodeSelf(d) - } - case "AccessMode": - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - case "AttachmentMode": - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - case "State": - if r.TryDecodeAsNil() { - x.State = 0 - } else { - x.State.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeClaim) 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.AllocationID = "" - } else { - x.AllocationID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExternalNodeID = "" - } else { - x.ExternalNodeID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Mode = 0 - } else { - x.Mode.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.State = 0 - } else { - x.State.CodecDecodeSelf(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 CSIVolumeClaimState) 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.EncodeInt(int64(x)) - } -} - -func (x *CSIVolumeClaimState) 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 = (CSIVolumeClaimState)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } -} - -func (x *CSIVolume) 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(37) - } else { - r.WriteMapStart(37) - } - 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.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.ExternalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExternalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExternalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ExternalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalID)) - } - } - } - 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)) - } - } - } - var yyn15 bool - if x.RequestedTopologies == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RequestedTopologies == nil { - r.EncodeNil() - } else { - x.RequestedTopologies.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestedTopologies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestedTopologies`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.RequestedTopologies == nil { - r.EncodeNil() - } else { - x.RequestedTopologies.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Topologies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Topologies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Topologies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Topologies`) - } - r.WriteMapElemValue() - if x.Topologies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Topologies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AccessMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessMode`) - } - r.WriteMapElemValue() - x.AccessMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AttachmentMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AttachmentMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AttachmentMode`) - } - r.WriteMapElemValue() - x.AttachmentMode.CodecEncodeSelf(e) - } - var yyn27 bool - if x.MountOptions == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MountOptions == nil { - r.EncodeNil() - } else { - x.MountOptions.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MountOptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MountOptions`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.MountOptions == nil { - r.EncodeNil() - } else { - x.MountOptions.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Secrets\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Secrets`) - } - r.WriteMapElemValue() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Parameters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Parameters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Parameters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Parameters`) - } - r.WriteMapElemValue() - if x.Parameters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Parameters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Context == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Context), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Context\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Context`) - } - r.WriteMapElemValue() - if x.Context == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Context), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Capacity)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Capacity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Capacity`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Capacity)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMin)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestedCapacityMin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestedCapacityMin`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMin)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMax)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestedCapacityMax\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestedCapacityMax`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMax)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.RequestedCapabilities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolumeCapability(([]*CSIVolumeCapability)(x.RequestedCapabilities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestedCapabilities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestedCapabilities`) - } - r.WriteMapElemValue() - if x.RequestedCapabilities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolumeCapability(([]*CSIVolumeCapability)(x.RequestedCapabilities), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CloneID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CloneID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CloneID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CloneID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CloneID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CloneID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SnapshotID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SnapshotID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SnapshotID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SnapshotID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SnapshotID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SnapshotID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ReadAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocation((map[string]*Allocation)(x.ReadAllocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReadAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReadAllocs`) - } - r.WriteMapElemValue() - if x.ReadAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocation((map[string]*Allocation)(x.ReadAllocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.WriteAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocation((map[string]*Allocation)(x.WriteAllocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WriteAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WriteAllocs`) - } - r.WriteMapElemValue() - if x.WriteAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocation((map[string]*Allocation)(x.WriteAllocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ReadClaims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIVolumeClaim((map[string]*CSIVolumeClaim)(x.ReadClaims), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReadClaims\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReadClaims`) - } - r.WriteMapElemValue() - if x.ReadClaims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIVolumeClaim((map[string]*CSIVolumeClaim)(x.ReadClaims), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.WriteClaims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIVolumeClaim((map[string]*CSIVolumeClaim)(x.WriteClaims), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WriteClaims\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WriteClaims`) - } - r.WriteMapElemValue() - if x.WriteClaims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIVolumeClaim((map[string]*CSIVolumeClaim)(x.WriteClaims), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PastClaims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIVolumeClaim((map[string]*CSIVolumeClaim)(x.PastClaims), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PastClaims\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PastClaims`) - } - r.WriteMapElemValue() - if x.PastClaims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIVolumeClaim((map[string]*CSIVolumeClaim)(x.PastClaims), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Schedulable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Schedulable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Schedulable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Schedulable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ProviderVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ProviderVersion)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProviderVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProviderVersion`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ProviderVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ProviderVersion)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllerRequired\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllerRequired`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ResourceExhausted) - } else if yyxt100 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt100 != nil { - z.EncExtension(x.ResourceExhausted, yyxt100) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ResourceExhausted) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ResourceExhausted) - } else { - z.EncFallback(x.ResourceExhausted) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResourceExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ResourceExhausted`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ResourceExhausted) - } else if yyxt101 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt101 != nil { - z.EncExtension(x.ResourceExhausted, yyxt101) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ResourceExhausted) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ResourceExhausted) - } else { - z.EncFallback(x.ResourceExhausted) - } - } - 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 *CSIVolume) 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 *CSIVolume) 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 "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "ExternalID": - if r.TryDecodeAsNil() { - x.ExternalID = "" - } else { - x.ExternalID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "RequestedTopologies": - if r.TryDecodeAsNil() { - if true && x.RequestedTopologies != nil { - x.RequestedTopologies = nil - } - } else { - if x.RequestedTopologies == nil { - x.RequestedTopologies = new(CSITopologyRequest) - } - - x.RequestedTopologies.CodecDecodeSelf(d) - } - case "Topologies": - if r.TryDecodeAsNil() { - x.Topologies = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Topologies), d) - } - } - case "AccessMode": - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - case "AttachmentMode": - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - case "MountOptions": - if r.TryDecodeAsNil() { - if true && x.MountOptions != nil { - x.MountOptions = nil - } - } else { - if x.MountOptions == nil { - x.MountOptions = new(CSIMountOptions) - } - - x.MountOptions.CodecDecodeSelf(d) - } - case "Secrets": - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(d) - } - case "Parameters": - if r.TryDecodeAsNil() { - x.Parameters = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Parameters), d) - } - } - case "Context": - if r.TryDecodeAsNil() { - x.Context = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Context), d) - } - } - case "Capacity": - if r.TryDecodeAsNil() { - x.Capacity = 0 - } else { - x.Capacity = (int64)(r.DecodeInt64()) - } - case "RequestedCapacityMin": - if r.TryDecodeAsNil() { - x.RequestedCapacityMin = 0 - } else { - x.RequestedCapacityMin = (int64)(r.DecodeInt64()) - } - case "RequestedCapacityMax": - if r.TryDecodeAsNil() { - x.RequestedCapacityMax = 0 - } else { - x.RequestedCapacityMax = (int64)(r.DecodeInt64()) - } - case "RequestedCapabilities": - if r.TryDecodeAsNil() { - x.RequestedCapabilities = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolumeCapability((*[]*CSIVolumeCapability)(&x.RequestedCapabilities), d) - } - } - case "CloneID": - if r.TryDecodeAsNil() { - x.CloneID = "" - } else { - x.CloneID = (string)(r.DecodeString()) - } - case "SnapshotID": - if r.TryDecodeAsNil() { - x.SnapshotID = "" - } else { - x.SnapshotID = (string)(r.DecodeString()) - } - case "ReadAllocs": - if r.TryDecodeAsNil() { - x.ReadAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocation((*map[string]*Allocation)(&x.ReadAllocs), d) - } - } - case "WriteAllocs": - if r.TryDecodeAsNil() { - x.WriteAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocation((*map[string]*Allocation)(&x.WriteAllocs), d) - } - } - case "ReadClaims": - if r.TryDecodeAsNil() { - x.ReadClaims = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIVolumeClaim((*map[string]*CSIVolumeClaim)(&x.ReadClaims), d) - } - } - case "WriteClaims": - if r.TryDecodeAsNil() { - x.WriteClaims = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIVolumeClaim((*map[string]*CSIVolumeClaim)(&x.WriteClaims), d) - } - } - case "PastClaims": - if r.TryDecodeAsNil() { - x.PastClaims = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIVolumeClaim((*map[string]*CSIVolumeClaim)(&x.PastClaims), d) - } - } - case "Schedulable": - if r.TryDecodeAsNil() { - x.Schedulable = false - } else { - x.Schedulable = (bool)(r.DecodeBool()) - } - case "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - case "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "ProviderVersion": - if r.TryDecodeAsNil() { - x.ProviderVersion = "" - } else { - x.ProviderVersion = (string)(r.DecodeString()) - } - case "ControllerRequired": - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - case "ControllersHealthy": - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ControllersExpected": - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesHealthy": - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesExpected": - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ResourceExhausted": - if r.TryDecodeAsNil() { - x.ResourceExhausted = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ResourceExhausted = r.DecodeTime() - } else if yyxt46 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt46 != nil { - z.DecExtension(x.ResourceExhausted, yyxt46) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ResourceExhausted) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ResourceExhausted) - } else { - z.DecFallback(&x.ResourceExhausted, 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()) - } - 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 *CSIVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj51 int - var yyb51 bool - var yyhl51 bool = l >= 0 - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExternalID = "" - } else { - x.ExternalID = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RequestedTopologies != nil { - x.RequestedTopologies = nil - } - } else { - if x.RequestedTopologies == nil { - x.RequestedTopologies = new(CSITopologyRequest) - } - - x.RequestedTopologies.CodecDecodeSelf(d) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Topologies = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Topologies), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.MountOptions != nil { - x.MountOptions = nil - } - } else { - if x.MountOptions == nil { - x.MountOptions = new(CSIMountOptions) - } - - x.MountOptions.CodecDecodeSelf(d) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(d) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Parameters = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Parameters), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Context = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Context), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Capacity = 0 - } else { - x.Capacity = (int64)(r.DecodeInt64()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequestedCapacityMin = 0 - } else { - x.RequestedCapacityMin = (int64)(r.DecodeInt64()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequestedCapacityMax = 0 - } else { - x.RequestedCapacityMax = (int64)(r.DecodeInt64()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequestedCapabilities = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolumeCapability((*[]*CSIVolumeCapability)(&x.RequestedCapabilities), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CloneID = "" - } else { - x.CloneID = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SnapshotID = "" - } else { - x.SnapshotID = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocation((*map[string]*Allocation)(&x.ReadAllocs), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocation((*map[string]*Allocation)(&x.WriteAllocs), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadClaims = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIVolumeClaim((*map[string]*CSIVolumeClaim)(&x.ReadClaims), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteClaims = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIVolumeClaim((*map[string]*CSIVolumeClaim)(&x.WriteClaims), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PastClaims = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIVolumeClaim((*map[string]*CSIVolumeClaim)(&x.PastClaims), d) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Schedulable = false - } else { - x.Schedulable = (bool)(r.DecodeBool()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProviderVersion = "" - } else { - x.ProviderVersion = (string)(r.DecodeString()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ResourceExhausted = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ResourceExhausted = r.DecodeTime() - } else if yyxt94 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt94 != nil { - z.DecExtension(x.ResourceExhausted, yyxt94) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ResourceExhausted) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ResourceExhausted) - } else { - z.DecFallback(&x.ResourceExhausted, false) - } - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj51++ - if yyhl51 { - yyb51 = yyj51 > l - } else { - yyb51 = r.CheckBreak() - } - if yyb51 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj51-1, "") - } - r.ReadArrayEnd() -} - -func (x *CSIVolListStub) 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(22) - } else { - r.WriteMapStart(22) - } - 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.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.ExternalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExternalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExternalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ExternalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Topologies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Topologies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Topologies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Topologies`) - } - r.WriteMapElemValue() - if x.Topologies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Topologies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AccessMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessMode`) - } - r.WriteMapElemValue() - x.AccessMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AttachmentMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AttachmentMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AttachmentMode`) - } - r.WriteMapElemValue() - x.AttachmentMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CurrentReaders)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CurrentReaders\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CurrentReaders`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CurrentReaders)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CurrentWriters)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CurrentWriters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CurrentWriters`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CurrentWriters)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Schedulable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Schedulable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Schedulable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Schedulable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllerRequired\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllerRequired`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ResourceExhausted) - } else if yyxt55 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt55 != nil { - z.EncExtension(x.ResourceExhausted, yyxt55) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ResourceExhausted) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ResourceExhausted) - } else { - z.EncFallback(x.ResourceExhausted) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResourceExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ResourceExhausted`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ResourceExhausted) - } else if yyxt56 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt56 != nil { - z.EncExtension(x.ResourceExhausted, yyxt56) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ResourceExhausted) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ResourceExhausted) - } else { - z.EncFallback(x.ResourceExhausted) - } - } - 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 *CSIVolListStub) 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 *CSIVolListStub) 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 "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "ExternalID": - if r.TryDecodeAsNil() { - x.ExternalID = "" - } else { - x.ExternalID = (string)(r.DecodeString()) - } - case "Topologies": - if r.TryDecodeAsNil() { - x.Topologies = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Topologies), d) - } - } - case "AccessMode": - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - case "AttachmentMode": - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - case "CurrentReaders": - if r.TryDecodeAsNil() { - x.CurrentReaders = 0 - } else { - x.CurrentReaders = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "CurrentWriters": - if r.TryDecodeAsNil() { - x.CurrentWriters = 0 - } else { - x.CurrentWriters = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Schedulable": - if r.TryDecodeAsNil() { - x.Schedulable = false - } else { - x.Schedulable = (bool)(r.DecodeBool()) - } - case "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - case "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "ControllerRequired": - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - case "ControllersHealthy": - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ControllersExpected": - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesHealthy": - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesExpected": - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ResourceExhausted": - if r.TryDecodeAsNil() { - x.ResourceExhausted = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ResourceExhausted = r.DecodeTime() - } else if yyxt23 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt23 != nil { - z.DecExtension(x.ResourceExhausted, yyxt23) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ResourceExhausted) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ResourceExhausted) - } else { - z.DecFallback(&x.ResourceExhausted, 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()) - } - 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 *CSIVolListStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj28 int - var yyb28 bool - var yyhl28 bool = l >= 0 - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExternalID = "" - } else { - x.ExternalID = (string)(r.DecodeString()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Topologies = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Topologies), d) - } - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CurrentReaders = 0 - } else { - x.CurrentReaders = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CurrentWriters = 0 - } else { - x.CurrentWriters = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Schedulable = false - } else { - x.Schedulable = (bool)(r.DecodeBool()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ResourceExhausted = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ResourceExhausted = r.DecodeTime() - } else if yyxt48 := z.Extension(z.I2Rtid(x.ResourceExhausted)); yyxt48 != nil { - z.DecExtension(x.ResourceExhausted, yyxt48) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ResourceExhausted) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ResourceExhausted) - } else { - z.DecFallback(&x.ResourceExhausted, false) - } - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj28++ - if yyhl28 { - yyb28 = yyj28 > l - } else { - yyb28 = r.CheckBreak() - } - if yyb28 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj28-1, "") - } - r.ReadArrayEnd() -} - -func (x *CSIVolumeRegisterRequest) 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.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolume(([]*CSIVolume)(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.encSlicePtrtoCSIVolume(([]*CSIVolume)(x.Volumes), 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(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeRegisterRequest) 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 *CSIVolumeRegisterRequest) 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 "Volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolume((*[]*CSIVolume)(&x.Volumes), d) - } - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeRegisterRequest) 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.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolume((*[]*CSIVolume)(&x.Volumes), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeRegisterResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeRegisterResponse) 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 *CSIVolumeRegisterResponse) 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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeRegisterResponse) 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeDeregisterRequest) 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.VolumeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.VolumeIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeIDs`) - } - r.WriteMapElemValue() - if x.VolumeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.VolumeIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Force)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Force\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Force`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Force)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeDeregisterRequest) 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 *CSIVolumeDeregisterRequest) 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 "VolumeIDs": - if r.TryDecodeAsNil() { - x.VolumeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.VolumeIDs), d) - } - } - case "Force": - if r.TryDecodeAsNil() { - x.Force = false - } else { - x.Force = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeDeregisterRequest) 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.VolumeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.VolumeIDs), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Force = false - } else { - x.Force = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeDeregisterResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeDeregisterResponse) 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 *CSIVolumeDeregisterResponse) 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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeDeregisterResponse) 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeCreateRequest) 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.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolume(([]*CSIVolume)(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.encSlicePtrtoCSIVolume(([]*CSIVolume)(x.Volumes), 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(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeCreateRequest) 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 *CSIVolumeCreateRequest) 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 "Volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolume((*[]*CSIVolume)(&x.Volumes), d) - } - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeCreateRequest) 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.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolume((*[]*CSIVolume)(&x.Volumes), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeCreateResponse) 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.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolume(([]*CSIVolume)(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.encSlicePtrtoCSIVolume(([]*CSIVolume)(x.Volumes), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeCreateResponse) 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 *CSIVolumeCreateResponse) 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 "Volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolume((*[]*CSIVolume)(&x.Volumes), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeCreateResponse) 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.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolume((*[]*CSIVolume)(&x.Volumes), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeDeleteRequest) 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.VolumeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.VolumeIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeIDs`) - } - r.WriteMapElemValue() - if x.VolumeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.VolumeIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Secrets\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Secrets`) - } - r.WriteMapElemValue() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeDeleteRequest) 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 *CSIVolumeDeleteRequest) 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 "VolumeIDs": - if r.TryDecodeAsNil() { - x.VolumeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.VolumeIDs), d) - } - } - case "Secrets": - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeDeleteRequest) 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.VolumeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.VolumeIDs), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeDeleteResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeDeleteResponse) 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 *CSIVolumeDeleteResponse) 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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeDeleteResponse) 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeExpandRequest) 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.VolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMin)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestedCapacityMin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestedCapacityMin`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMin)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMax)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestedCapacityMax\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestedCapacityMax`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RequestedCapacityMax)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Secrets\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Secrets`) - } - r.WriteMapElemValue() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeExpandRequest) 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 *CSIVolumeExpandRequest) 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 "VolumeID": - if r.TryDecodeAsNil() { - x.VolumeID = "" - } else { - x.VolumeID = (string)(r.DecodeString()) - } - case "RequestedCapacityMin": - if r.TryDecodeAsNil() { - x.RequestedCapacityMin = 0 - } else { - x.RequestedCapacityMin = (int64)(r.DecodeInt64()) - } - case "RequestedCapacityMax": - if r.TryDecodeAsNil() { - x.RequestedCapacityMax = 0 - } else { - x.RequestedCapacityMax = (int64)(r.DecodeInt64()) - } - case "Secrets": - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeExpandRequest) 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.VolumeID = "" - } else { - x.VolumeID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequestedCapacityMin = 0 - } else { - x.RequestedCapacityMin = (int64)(r.DecodeInt64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequestedCapacityMax = 0 - } else { - x.RequestedCapacityMax = (int64)(r.DecodeInt64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeExpandResponse) 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.EncodeInt(int64(x.CapacityBytes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CapacityBytes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CapacityBytes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CapacityBytes)) - } - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeExpandResponse) 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 *CSIVolumeExpandResponse) 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 "CapacityBytes": - if r.TryDecodeAsNil() { - x.CapacityBytes = 0 - } else { - x.CapacityBytes = (int64)(r.DecodeInt64()) - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeExpandResponse) 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.CapacityBytes = 0 - } else { - x.CapacityBytes = (int64)(r.DecodeInt64()) - } - 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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 CSIVolumeClaimMode) 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.EncodeInt(int64(x)) - } -} - -func (x *CSIVolumeClaimMode) 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 = (CSIVolumeClaimMode)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } -} - -func (x *CSIVolumeClaimBatchRequest) 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.Claims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceCSIVolumeClaimRequest(([]CSIVolumeClaimRequest)(x.Claims), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Claims\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Claims`) - } - r.WriteMapElemValue() - if x.Claims == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceCSIVolumeClaimRequest(([]CSIVolumeClaimRequest)(x.Claims), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeClaimBatchRequest) 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 *CSIVolumeClaimBatchRequest) 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 "Claims": - if r.TryDecodeAsNil() { - x.Claims = nil - } else { - if false { - } else { - h.decSliceCSIVolumeClaimRequest((*[]CSIVolumeClaimRequest)(&x.Claims), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeClaimBatchRequest) 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.Claims = nil - } else { - if false { - } else { - h.decSliceCSIVolumeClaimRequest((*[]CSIVolumeClaimRequest)(&x.Claims), 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 *CSIVolumeClaimRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocationID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocationID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocationID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocationID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocationID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocationID)) - } - } - } - 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.ExternalNodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalNodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExternalNodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExternalNodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ExternalNodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalNodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Claim.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Claim\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Claim`) - } - r.WriteMapElemValue() - x.Claim.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AccessMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessMode`) - } - r.WriteMapElemValue() - x.AccessMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AttachmentMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AttachmentMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AttachmentMode`) - } - r.WriteMapElemValue() - x.AttachmentMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.State.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"State\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `State`) - } - r.WriteMapElemValue() - x.State.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(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeClaimRequest) 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 *CSIVolumeClaimRequest) 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 "VolumeID": - if r.TryDecodeAsNil() { - x.VolumeID = "" - } else { - x.VolumeID = (string)(r.DecodeString()) - } - case "AllocationID": - if r.TryDecodeAsNil() { - x.AllocationID = "" - } else { - x.AllocationID = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "ExternalNodeID": - if r.TryDecodeAsNil() { - x.ExternalNodeID = "" - } else { - x.ExternalNodeID = (string)(r.DecodeString()) - } - case "Claim": - if r.TryDecodeAsNil() { - x.Claim = 0 - } else { - x.Claim.CodecDecodeSelf(d) - } - case "AccessMode": - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - case "AttachmentMode": - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - case "State": - if r.TryDecodeAsNil() { - x.State = 0 - } else { - x.State.CodecDecodeSelf(d) - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeClaimRequest) 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.VolumeID = "" - } else { - x.VolumeID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocationID = "" - } else { - x.AllocationID = (string)(r.DecodeString()) - } - 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.ExternalNodeID = "" - } else { - x.ExternalNodeID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Claim = 0 - } else { - x.Claim.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.State = 0 - } else { - x.State.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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.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.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.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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 *CSIVolumeClaimResponse) 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.PublishContext == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.PublishContext), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublishContext\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublishContext`) - } - r.WriteMapElemValue() - if x.PublishContext == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.PublishContext), e) - } - } - } - var yyn6 bool - if x.Volume == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Volume == nil { - r.EncodeNil() - } else { - x.Volume.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Volume\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Volume`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Volume == nil { - r.EncodeNil() - } else { - x.Volume.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeClaimResponse) 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 *CSIVolumeClaimResponse) 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 "PublishContext": - if r.TryDecodeAsNil() { - x.PublishContext = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.PublishContext), d) - } - } - case "Volume": - if r.TryDecodeAsNil() { - if true && x.Volume != nil { - x.Volume = nil - } - } else { - if x.Volume == nil { - x.Volume = new(CSIVolume) - } - - x.Volume.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeClaimResponse) 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.PublishContext = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.PublishContext), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Volume != nil { - x.Volume = nil - } - } else { - if x.Volume == nil { - x.Volume = new(CSIVolume) - } - - x.Volume.CodecDecodeSelf(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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeListRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSIVolumeListRequest) 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 *CSIVolumeListRequest) 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 "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSIVolumeListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *CSIVolumeListResponse) 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.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolListStub(([]*CSIVolListStub)(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.encSlicePtrtoCSIVolListStub(([]*CSIVolListStub)(x.Volumes), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeListResponse) 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 *CSIVolumeListResponse) 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 "Volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolListStub((*[]*CSIVolListStub)(&x.Volumes), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeListResponse) 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.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolListStub((*[]*CSIVolListStub)(&x.Volumes), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeExternalListRequest) 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.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSIVolumeExternalListRequest) 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 *CSIVolumeExternalListRequest) 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 "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSIVolumeExternalListRequest) 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.PluginID = "" - } else { - x.PluginID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *CSIVolumeExternalListResponse) 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.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIVolumeExternalStub(([]*CSIVolumeExternalStub)(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.encSlicePtrtoCSIVolumeExternalStub(([]*CSIVolumeExternalStub)(x.Volumes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 *CSIVolumeExternalListResponse) 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 *CSIVolumeExternalListResponse) 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 "Volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolumeExternalStub((*[]*CSIVolumeExternalStub)(&x.Volumes), d) - } - } - case "NextToken": - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (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 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 *CSIVolumeExternalListResponse) 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.Volumes = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIVolumeExternalStub((*[]*CSIVolumeExternalStub)(&x.Volumes), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 *CSIVolumeExternalStub) 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.ExternalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExternalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExternalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ExternalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CapacityBytes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CapacityBytes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CapacityBytes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CapacityBytes)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.VolumeContext == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.VolumeContext), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeContext\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeContext`) - } - r.WriteMapElemValue() - if x.VolumeContext == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.VolumeContext), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CloneID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CloneID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CloneID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CloneID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CloneID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CloneID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SnapshotID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SnapshotID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SnapshotID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SnapshotID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SnapshotID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SnapshotID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PublishedExternalNodeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.PublishedExternalNodeIDs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublishedExternalNodeIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublishedExternalNodeIDs`) - } - r.WriteMapElemValue() - if x.PublishedExternalNodeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.PublishedExternalNodeIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.IsAbnormal)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IsAbnormal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IsAbnormal`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IsAbnormal)) - } - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeExternalStub) 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 *CSIVolumeExternalStub) 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 "ExternalID": - if r.TryDecodeAsNil() { - x.ExternalID = "" - } else { - x.ExternalID = (string)(r.DecodeString()) - } - case "CapacityBytes": - if r.TryDecodeAsNil() { - x.CapacityBytes = 0 - } else { - x.CapacityBytes = (int64)(r.DecodeInt64()) - } - case "VolumeContext": - if r.TryDecodeAsNil() { - x.VolumeContext = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.VolumeContext), d) - } - } - case "CloneID": - if r.TryDecodeAsNil() { - x.CloneID = "" - } else { - x.CloneID = (string)(r.DecodeString()) - } - case "SnapshotID": - if r.TryDecodeAsNil() { - x.SnapshotID = "" - } else { - x.SnapshotID = (string)(r.DecodeString()) - } - case "PublishedExternalNodeIDs": - if r.TryDecodeAsNil() { - x.PublishedExternalNodeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.PublishedExternalNodeIDs), d) - } - } - case "IsAbnormal": - if r.TryDecodeAsNil() { - x.IsAbnormal = false - } else { - x.IsAbnormal = (bool)(r.DecodeBool()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeExternalStub) 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.ExternalID = "" - } else { - x.ExternalID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CapacityBytes = 0 - } else { - x.CapacityBytes = (int64)(r.DecodeInt64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VolumeContext = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.VolumeContext), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CloneID = "" - } else { - x.CloneID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SnapshotID = "" - } else { - x.SnapshotID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PublishedExternalNodeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.PublishedExternalNodeIDs), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IsAbnormal = false - } else { - x.IsAbnormal = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *CSIVolumeGetRequest) 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.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSIVolumeGetRequest) 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 *CSIVolumeGetRequest) 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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSIVolumeGetRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *CSIVolumeGetResponse) 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.Volume == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Volume == nil { - r.EncodeNil() - } else { - x.Volume.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Volume\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Volume`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Volume == nil { - r.EncodeNil() - } else { - x.Volume.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeGetResponse) 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 *CSIVolumeGetResponse) 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() { - if true && x.Volume != nil { - x.Volume = nil - } - } else { - if x.Volume == nil { - x.Volume = new(CSIVolume) - } - - x.Volume.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeGetResponse) 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.Volume != nil { - x.Volume = nil - } - } else { - if x.Volume == nil { - x.Volume = new(CSIVolume) - } - - x.Volume.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIVolumeUnpublishRequest) 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.VolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeID)) - } - } - } - var yyn6 bool - if x.Claim == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Claim == nil { - r.EncodeNil() - } else { - x.Claim.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Claim\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Claim`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Claim == nil { - r.EncodeNil() - } else { - x.Claim.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSIVolumeUnpublishRequest) 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 *CSIVolumeUnpublishRequest) 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 "VolumeID": - if r.TryDecodeAsNil() { - x.VolumeID = "" - } else { - x.VolumeID = (string)(r.DecodeString()) - } - case "Claim": - if r.TryDecodeAsNil() { - if true && x.Claim != nil { - x.Claim = nil - } - } else { - if x.Claim == nil { - x.Claim = new(CSIVolumeClaim) - } - - x.Claim.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeUnpublishRequest) 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.VolumeID = "" - } else { - x.VolumeID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Claim != nil { - x.Claim = nil - } - } else { - if x.Claim == nil { - x.Claim = new(CSIVolumeClaim) - } - - x.Claim.CodecDecodeSelf(d) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSIVolumeUnpublishResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIVolumeUnpublishResponse) 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 *CSIVolumeUnpublishResponse) 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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIVolumeUnpublishResponse) 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSISnapshot) 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.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.ExternalSourceVolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalSourceVolumeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExternalSourceVolumeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExternalSourceVolumeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ExternalSourceVolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ExternalSourceVolumeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.SizeBytes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SizeBytes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SizeBytes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.SizeBytes)) - } - } - 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.EncodeBool(bool(x.IsReady)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IsReady\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IsReady`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IsReady)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SourceVolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SourceVolumeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SourceVolumeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SourceVolumeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SourceVolumeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SourceVolumeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - 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.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Secrets\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Secrets`) - } - r.WriteMapElemValue() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Parameters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Parameters), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Parameters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Parameters`) - } - r.WriteMapElemValue() - if x.Parameters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Parameters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSISnapshot) 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 *CSISnapshot) 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 "ExternalSourceVolumeID": - if r.TryDecodeAsNil() { - x.ExternalSourceVolumeID = "" - } else { - x.ExternalSourceVolumeID = (string)(r.DecodeString()) - } - case "SizeBytes": - if r.TryDecodeAsNil() { - x.SizeBytes = 0 - } else { - x.SizeBytes = (int64)(r.DecodeInt64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "IsReady": - if r.TryDecodeAsNil() { - x.IsReady = false - } else { - x.IsReady = (bool)(r.DecodeBool()) - } - case "SourceVolumeID": - if r.TryDecodeAsNil() { - x.SourceVolumeID = "" - } else { - x.SourceVolumeID = (string)(r.DecodeString()) - } - case "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Secrets": - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(d) - } - case "Parameters": - if r.TryDecodeAsNil() { - x.Parameters = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Parameters), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSISnapshot) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExternalSourceVolumeID = "" - } else { - x.ExternalSourceVolumeID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SizeBytes = 0 - } else { - x.SizeBytes = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IsReady = false - } else { - x.IsReady = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SourceVolumeID = "" - } else { - x.SourceVolumeID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Parameters = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Parameters), 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 *CSISnapshotCreateRequest) 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.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Snapshots\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Snapshots`) - } - r.WriteMapElemValue() - if x.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSISnapshotCreateRequest) 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 *CSISnapshotCreateRequest) 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 "Snapshots": - if r.TryDecodeAsNil() { - x.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSISnapshotCreateRequest) 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.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSISnapshotCreateResponse) 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.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Snapshots\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Snapshots`) - } - r.WriteMapElemValue() - if x.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSISnapshotCreateResponse) 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 *CSISnapshotCreateResponse) 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 "Snapshots": - if r.TryDecodeAsNil() { - x.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSISnapshotCreateResponse) 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.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSISnapshotDeleteRequest) 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.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Snapshots\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Snapshots`) - } - r.WriteMapElemValue() - if x.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *CSISnapshotDeleteRequest) 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 *CSISnapshotDeleteRequest) 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 "Snapshots": - if r.TryDecodeAsNil() { - x.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSISnapshotDeleteRequest) 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.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *CSISnapshotDeleteResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSISnapshotDeleteResponse) 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 *CSISnapshotDeleteResponse) 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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSISnapshotDeleteResponse) 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSISnapshotListRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Secrets\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Secrets`) - } - r.WriteMapElemValue() - if x.Secrets == nil { - r.EncodeNil() - } else { - x.Secrets.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSISnapshotListRequest) 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 *CSISnapshotListRequest) 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 "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - case "Secrets": - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSISnapshotListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Secrets = nil - } else { - x.Secrets.CodecDecodeSelf(d) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *CSISnapshotListResponse) 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.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Snapshots\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Snapshots`) - } - r.WriteMapElemValue() - if x.Snapshots == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSISnapshot(([]*CSISnapshot)(x.Snapshots), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 *CSISnapshotListResponse) 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 *CSISnapshotListResponse) 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 "Snapshots": - if r.TryDecodeAsNil() { - x.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), d) - } - } - case "NextToken": - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (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 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 *CSISnapshotListResponse) 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.Snapshots = nil - } else { - if false { - } else { - h.decSlicePtrtoCSISnapshot((*[]*CSISnapshot)(&x.Snapshots), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 *CSIPlugin) 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(17) - } else { - r.WriteMapStart(17) - } - 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.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - 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.ControllerRequired)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllerRequired\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllerRequired`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Controllers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.Controllers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Controllers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Controllers`) - } - r.WriteMapElemValue() - if x.Controllers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.Controllers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Nodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(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.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.Nodes), e) - } - } - } - 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 x.ControllerJobs == nil { - r.EncodeNil() - } else { - x.ControllerJobs.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllerJobs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllerJobs`) - } - r.WriteMapElemValue() - if x.ControllerJobs == nil { - r.EncodeNil() - } else { - x.ControllerJobs.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeJobs == nil { - r.EncodeNil() - } else { - x.NodeJobs.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeJobs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeJobs`) - } - r.WriteMapElemValue() - if x.NodeJobs == nil { - r.EncodeNil() - } else { - x.NodeJobs.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } - 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 *CSIPlugin) 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 *CSIPlugin) 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 "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "Version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - case "ControllerRequired": - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - case "Controllers": - if r.TryDecodeAsNil() { - x.Controllers = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.Controllers), d) - } - } - case "Nodes": - if r.TryDecodeAsNil() { - x.Nodes = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.Nodes), d) - } - } - case "Allocations": - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - case "ControllerJobs": - if r.TryDecodeAsNil() { - x.ControllerJobs = nil - } else { - x.ControllerJobs.CodecDecodeSelf(d) - } - case "NodeJobs": - if r.TryDecodeAsNil() { - x.NodeJobs = nil - } else { - x.NodeJobs.CodecDecodeSelf(d) - } - case "ControllersHealthy": - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ControllersExpected": - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesHealthy": - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesExpected": - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 *CSIPlugin) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj24 int - var yyb24 bool - var yyhl24 bool = l >= 0 - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Controllers = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.Controllers), d) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Nodes = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.Nodes), d) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllerJobs = nil - } else { - x.ControllerJobs.CodecDecodeSelf(d) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeJobs = nil - } else { - x.NodeJobs.CodecDecodeSelf(d) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj24-1, "") - } - r.ReadArrayEnd() -} - -func (x CSIControllerCapability) 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 *CSIControllerCapability) 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 = (CSIControllerCapability)(z.C.UintV(r.DecodeUint64(), 8)) - } -} - -func (x CSINodeCapability) 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 *CSINodeCapability) 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 = (CSINodeCapability)(z.C.UintV(r.DecodeUint64(), 8)) - } -} - -func (x *JobDescription) 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.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 { - r.EncodeInt(int64(x.Expected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Expected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Expected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Expected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDescription) 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 *JobDescription) 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 "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 "Expected": - if r.TryDecodeAsNil() { - x.Expected = 0 - } else { - x.Expected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDescription) 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.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Expected = 0 - } else { - x.Expected = (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 JobNamespacedDescriptions) 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.encJobNamespacedDescriptions((JobNamespacedDescriptions)(x), e) - } - } -} - -func (x *JobNamespacedDescriptions) 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.decJobNamespacedDescriptions((*JobNamespacedDescriptions)(x), d) - } -} - -func (x JobDescriptions) 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.encJobDescriptions((JobDescriptions)(x), e) - } - } -} - -func (x *JobDescriptions) 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.decJobDescriptions((*JobDescriptions)(x), d) - } -} - -func (x *CSIPluginListStub) 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.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.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllerRequired\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllerRequired`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ControllerRequired)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllersExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllersExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ControllersExpected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesHealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesHealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesHealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesExpected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesExpected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesExpected)) - } - } - 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 *CSIPluginListStub) 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 *CSIPluginListStub) 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 "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "ControllerRequired": - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - case "ControllersHealthy": - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ControllersExpected": - if r.TryDecodeAsNil() { - x.ControllersExpected = 0 - } else { - x.ControllersExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesHealthy": - if r.TryDecodeAsNil() { - x.NodesHealthy = 0 - } else { - x.NodesHealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesExpected": - if r.TryDecodeAsNil() { - x.NodesExpected = 0 - } else { - x.NodesExpected = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 *CSIPluginListStub) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllerRequired = false - } else { - x.ControllerRequired = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ControllersHealthy = 0 - } else { - x.ControllersHealthy = (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.ControllersExpected = 0 - } else { - x.ControllersExpected = (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.NodesHealthy = 0 - } else { - x.NodesHealthy = (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.NodesExpected = 0 - } else { - x.NodesExpected = (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.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 *CSIPluginListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSIPluginListRequest) 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 *CSIPluginListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSIPluginListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *CSIPluginListResponse) 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.Plugins == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIPluginListStub(([]*CSIPluginListStub)(x.Plugins), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Plugins\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Plugins`) - } - r.WriteMapElemValue() - if x.Plugins == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSIPluginListStub(([]*CSIPluginListStub)(x.Plugins), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIPluginListResponse) 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 *CSIPluginListResponse) 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 "Plugins": - if r.TryDecodeAsNil() { - x.Plugins = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIPluginListStub((*[]*CSIPluginListStub)(&x.Plugins), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIPluginListResponse) 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.Plugins = nil - } else { - if false { - } else { - h.decSlicePtrtoCSIPluginListStub((*[]*CSIPluginListStub)(&x.Plugins), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIPluginGetRequest) 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.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSIPluginGetRequest) 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 *CSIPluginGetRequest) 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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSIPluginGetRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *CSIPluginGetResponse) 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.Plugin == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Plugin == nil { - r.EncodeNil() - } else { - x.Plugin.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Plugin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Plugin`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Plugin == nil { - r.EncodeNil() - } else { - x.Plugin.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIPluginGetResponse) 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 *CSIPluginGetResponse) 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 "Plugin": - if r.TryDecodeAsNil() { - if true && x.Plugin != nil { - x.Plugin = nil - } - } else { - if x.Plugin == nil { - x.Plugin = new(CSIPlugin) - } - - x.Plugin.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIPluginGetResponse) 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.Plugin != nil { - x.Plugin = nil - } - } else { - if x.Plugin == nil { - x.Plugin = new(CSIPlugin) - } - - x.Plugin.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *CSIPluginDeleteRequest) 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.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *CSIPluginDeleteRequest) 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 *CSIPluginDeleteRequest) 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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *CSIPluginDeleteRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *CSIPluginDeleteResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIPluginDeleteResponse) 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 *CSIPluginDeleteResponse) 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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIPluginDeleteResponse) 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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 { - h.encMapstringint((map[string]int)(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.encMapstringint((map[string]int)(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 { - h.decMapstringint((*map[string]int)(&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 { - h.decMapstringint((*map[string]int)(&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 { - h.encMapstringuint64((map[string]uint64)(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.encMapstringuint64((map[string]uint64)(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 { - h.decMapstringuint64((*map[string]uint64)(&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 { - h.decMapstringuint64((*map[string]uint64)(&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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 *nomadJsonEncodingExtensions) 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 *nomadJsonEncodingExtensions) 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 *nomadJsonEncodingExtensions) 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 *nomadJsonEncodingExtensions) 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 *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(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.EvalIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "EvalIDs": - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EvalIDs), d) - } - } - case "Filter": - if r.TryDecodeAsNil() { - x.Filter = "" - } else { - x.Filter = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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.EvalIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EvalIDs), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Filter = "" - } else { - x.Filter = (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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *EvalDeleteResponse) 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.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)) - } - } - 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 *EvalDeleteResponse) 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 *EvalDeleteResponse) 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 "Count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 *EvalDeleteResponse) 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.Count = 0 - } else { - x.Count = (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.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 *EventStreamRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Topics == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapTopicSlicestring((map[Topic][]string)(x.Topics), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Topics\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Topics`) - } - r.WriteMapElemValue() - if x.Topics == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapTopicSlicestring((map[Topic][]string)(x.Topics), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Index)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *EventStreamRequest) 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 *EventStreamRequest) 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 "Topics": - if r.TryDecodeAsNil() { - x.Topics = nil - } else { - if false { - } else { - h.decMapTopicSlicestring((*map[Topic][]string)(&x.Topics), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *EventStreamRequest) 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.Topics = nil - } else { - if false { - } else { - h.decMapTopicSlicestring((*map[Topic][]string)(&x.Topics), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (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.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 yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *EventStreamWrapper) 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.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(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Error == nil { - r.EncodeNil() - } else { - x.Error.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.Event == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Event == nil { - r.EncodeNil() - } else { - x.Event.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Event\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Event`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Event == nil { - r.EncodeNil() - } else { - x.Event.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EventStreamWrapper) 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 *EventStreamWrapper) 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() { - if true && x.Error != nil { - x.Error = nil - } - } else { - if x.Error == nil { - x.Error = new(RpcError) - } - - x.Error.CodecDecodeSelf(d) - } - case "Event": - if r.TryDecodeAsNil() { - if true && x.Event != nil { - x.Event = nil - } - } else { - if x.Event == nil { - x.Event = new(EventJson) - } - - x.Event.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EventStreamWrapper) 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.Error != nil { - x.Error = nil - } - } else { - if x.Error == nil { - x.Error = new(RpcError) - } - - x.Error.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Event != nil { - x.Event = nil - } - } else { - if x.Event == nil { - x.Event = new(EventJson) - } - - x.Event.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 Topic) 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 *Topic) 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 = (Topic)(r.DecodeString()) - } -} - -func (x *Event) 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() - x.Topic.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Topic\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Topic`) - } - r.WriteMapElemValue() - x.Topic.CodecEncodeSelf(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 { - 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.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.FilterKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.FilterKeys), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FilterKeys\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FilterKeys`) - } - r.WriteMapElemValue() - if x.FilterKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.FilterKeys), 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 x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(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 { - z.EncFallback(x.Payload) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Event) 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 *Event) 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 "Topic": - if r.TryDecodeAsNil() { - x.Topic = "" - } else { - x.Topic.CodecDecodeSelf(d) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Key": - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "FilterKeys": - if r.TryDecodeAsNil() { - x.FilterKeys = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.FilterKeys), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "Payload": - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - z.DecFallback(&x.Payload, true) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Event) 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.Topic = "" - } else { - x.Topic.CodecDecodeSelf(d) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = (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.FilterKeys = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.FilterKeys), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - 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 { - z.DecFallback(&x.Payload, true) - } - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *Events) 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.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 x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceEvent(([]Event)(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.encSliceEvent(([]Event)(x.Events), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Events) 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 *Events) 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 "Events": - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSliceEvent((*[]Event)(&x.Events), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Events) 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.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSliceEvent((*[]Event)(&x.Events), 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 *EventJson) 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.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Data)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Data\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Data`) - } - r.WriteMapElemValue() - if x.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Data)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EventJson) 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 *EventJson) 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 "Data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - if false { - } else { - x.Data = r.DecodeBytes(([]byte)(x.Data), false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EventJson) 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.Data = nil - } else { - if false { - } else { - x.Data = r.DecodeBytes(([]byte)(x.Data), false) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobEvent) 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) - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobEvent) 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 *JobEvent) 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) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobEvent) 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() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvaluationEvent) 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) - } - var yyn3 bool - if x.Evaluation == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Evaluation == nil { - r.EncodeNil() - } else { - x.Evaluation.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evaluation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evaluation`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Evaluation == nil { - r.EncodeNil() - } else { - x.Evaluation.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvaluationEvent) 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 *EvaluationEvent) 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 "Evaluation": - if r.TryDecodeAsNil() { - if true && x.Evaluation != nil { - x.Evaluation = nil - } - } else { - if x.Evaluation == nil { - x.Evaluation = new(Evaluation) - } - - x.Evaluation.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvaluationEvent) 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() { - if true && x.Evaluation != nil { - x.Evaluation = nil - } - } else { - if x.Evaluation == nil { - x.Evaluation = new(Evaluation) - } - - x.Evaluation.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocationEvent) 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) - } - var yyn3 bool - if x.Allocation == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Allocation == nil { - r.EncodeNil() - } else { - x.Allocation.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocation`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Allocation == nil { - r.EncodeNil() - } else { - x.Allocation.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocationEvent) 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 *AllocationEvent) 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 "Allocation": - if r.TryDecodeAsNil() { - if true && x.Allocation != nil { - x.Allocation = nil - } - } else { - if x.Allocation == nil { - x.Allocation = new(Allocation) - } - - x.Allocation.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocationEvent) 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() { - if true && x.Allocation != nil { - x.Allocation = nil - } - } else { - if x.Allocation == nil { - x.Allocation = new(Allocation) - } - - x.Allocation.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentEvent) 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) - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentEvent) 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 *DeploymentEvent) 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) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentEvent) 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() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeStreamEvent) 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) - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeStreamEvent) 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 *NodeStreamEvent) 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) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeStreamEvent) 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() { - if true && x.Node != nil { - x.Node = nil - } - } else { - if x.Node == nil { - x.Node = new(Node) - } - - x.Node.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodePoolEvent) 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) - } - var yyn3 bool - if x.NodePool == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodePool == nil { - r.EncodeNil() - } else { - x.NodePool.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.NodePool == nil { - r.EncodeNil() - } else { - x.NodePool.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodePoolEvent) 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 *NodePoolEvent) 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 "NodePool": - if r.TryDecodeAsNil() { - if true && x.NodePool != nil { - x.NodePool = nil - } - } else { - if x.NodePool == nil { - x.NodePool = new(NodePool) - } - - x.NodePool.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodePoolEvent) 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() { - if true && x.NodePool != nil { - x.NodePool = nil - } - } else { - if x.NodePool == nil { - x.NodePool = new(NodePool) - } - - x.NodePool.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenEvent) 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) - } - var yyn3 bool - if x.ACLToken == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLToken == nil { - r.EncodeNil() - } else { - x.ACLToken.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLToken`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLToken == nil { - r.EncodeNil() - } else { - x.ACLToken.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenEvent) 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 *ACLTokenEvent) 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 "ACLToken": - if r.TryDecodeAsNil() { - if true && x.ACLToken != nil { - x.ACLToken = nil - } - } else { - if x.ACLToken == nil { - x.ACLToken = new(ACLToken) - } - - x.ACLToken.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenEvent) 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() { - if true && x.ACLToken != nil { - x.ACLToken = nil - } - } else { - if x.ACLToken == nil { - x.ACLToken = new(ACLToken) - } - - x.ACLToken.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *ServiceRegistrationStreamEvent) 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) - } - var yyn3 bool - if x.Service == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Service == nil { - r.EncodeNil() - } else { - x.Service.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Service\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Service`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Service == nil { - r.EncodeNil() - } else { - x.Service.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceRegistrationStreamEvent) 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 *ServiceRegistrationStreamEvent) 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 "Service": - if r.TryDecodeAsNil() { - if true && x.Service != nil { - x.Service = nil - } - } else { - if x.Service == nil { - x.Service = new(ServiceRegistration) - } - - x.Service.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceRegistrationStreamEvent) 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() { - if true && x.Service != nil { - x.Service = nil - } - } else { - if x.Service == nil { - x.Service = new(ServiceRegistration) - } - - x.Service.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicyEvent) 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) - } - var yyn3 bool - if x.ACLPolicy == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLPolicy == nil { - r.EncodeNil() - } else { - x.ACLPolicy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLPolicy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLPolicy`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLPolicy == nil { - r.EncodeNil() - } else { - x.ACLPolicy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicyEvent) 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 *ACLPolicyEvent) 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 "ACLPolicy": - if r.TryDecodeAsNil() { - if true && x.ACLPolicy != nil { - x.ACLPolicy = nil - } - } else { - if x.ACLPolicy == nil { - x.ACLPolicy = new(ACLPolicy) - } - - x.ACLPolicy.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicyEvent) 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() { - if true && x.ACLPolicy != nil { - x.ACLPolicy = nil - } - } else { - if x.ACLPolicy == nil { - x.ACLPolicy = new(ACLPolicy) - } - - x.ACLPolicy.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLRoleStreamEvent) 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) - } - var yyn3 bool - if x.ACLRole == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLRole == nil { - r.EncodeNil() - } else { - x.ACLRole.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLRole\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLRole`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLRole == nil { - r.EncodeNil() - } else { - x.ACLRole.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLRoleStreamEvent) 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 *ACLRoleStreamEvent) 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 "ACLRole": - if r.TryDecodeAsNil() { - if true && x.ACLRole != nil { - x.ACLRole = nil - } - } else { - if x.ACLRole == nil { - x.ACLRole = new(ACLRole) - } - - x.ACLRole.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLRoleStreamEvent) 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() { - if true && x.ACLRole != nil { - x.ACLRole = nil - } - } else { - if x.ACLRole == nil { - x.ACLRole = new(ACLRole) - } - - x.ACLRole.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLAuthMethodEvent) 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) - } - var yyn3 bool - if x.AuthMethod == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.AuthMethod == nil { - r.EncodeNil() - } else { - x.AuthMethod.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthMethod\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthMethod`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.AuthMethod == nil { - r.EncodeNil() - } else { - x.AuthMethod.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLAuthMethodEvent) 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 *ACLAuthMethodEvent) 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 "AuthMethod": - if r.TryDecodeAsNil() { - if true && x.AuthMethod != nil { - x.AuthMethod = nil - } - } else { - if x.AuthMethod == nil { - x.AuthMethod = new(ACLAuthMethod) - } - - x.AuthMethod.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLAuthMethodEvent) 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() { - if true && x.AuthMethod != nil { - x.AuthMethod = nil - } - } else { - if x.AuthMethod == nil { - x.AuthMethod = new(ACLAuthMethod) - } - - x.AuthMethod.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLBindingRuleEvent) 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) - } - var yyn3 bool - if x.ACLBindingRule == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLBindingRule == nil { - r.EncodeNil() - } else { - x.ACLBindingRule.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLBindingRule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLBindingRule`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLBindingRule == nil { - r.EncodeNil() - } else { - x.ACLBindingRule.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLBindingRuleEvent) 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 *ACLBindingRuleEvent) 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 "ACLBindingRule": - if r.TryDecodeAsNil() { - if true && x.ACLBindingRule != nil { - x.ACLBindingRule = nil - } - } else { - if x.ACLBindingRule == nil { - x.ACLBindingRule = new(ACLBindingRule) - } - - x.ACLBindingRule.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLBindingRuleEvent) 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() { - if true && x.ACLBindingRule != nil { - x.ACLBindingRule = nil - } - } else { - if x.ACLBindingRule == nil { - x.ACLBindingRule = new(ACLBindingRule) - } - - x.ACLBindingRule.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x TerminalByNodeByName) 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.encTerminalByNodeByName((TerminalByNodeByName)(x), e) - } - } -} - -func (x *TerminalByNodeByName) 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.decTerminalByNodeByName((*TerminalByNodeByName)(x), d) - } -} - -func (x *DisconnectStrategy) 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.LostAfter)); yyxt4 != nil { - z.EncExtension(x.LostAfter, yyxt4) - } else { - r.EncodeInt(int64(x.LostAfter)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LostAfter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LostAfter`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.LostAfter)); yyxt5 != nil { - z.EncExtension(x.LostAfter, yyxt5) - } else { - r.EncodeInt(int64(x.LostAfter)) - } - } - var yyn6 bool - if x.StopOnClientAfter == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.StopOnClientAfter == nil { - r.EncodeNil() - } else { - yy7 := *x.StopOnClientAfter - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(yy7)); yyxt8 != nil { - z.EncExtension(yy7, yyxt8) - } else { - r.EncodeInt(int64(yy7)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StopOnClientAfter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StopOnClientAfter`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.StopOnClientAfter == nil { - r.EncodeNil() - } else { - yy9 := *x.StopOnClientAfter - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(yy9)); yyxt10 != nil { - z.EncExtension(yy9, yyxt10) - } else { - r.EncodeInt(int64(yy9)) - } - } - } - } - var yyn11 bool - if x.Replace == nil { - yyn11 = true - goto LABEL11 - } - LABEL11: - if yyr2 || yy2arr2 { - if yyn11 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Replace == nil { - r.EncodeNil() - } else { - yy12 := *x.Replace - if false { - } else { - r.EncodeBool(bool(yy12)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Replace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Replace`) - } - r.WriteMapElemValue() - if yyn11 { - r.EncodeNil() - } else { - if x.Replace == nil { - r.EncodeNil() - } else { - yy14 := *x.Replace - if false { - } else { - r.EncodeBool(bool(yy14)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Reconcile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Reconcile)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reconcile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reconcile`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Reconcile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Reconcile)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DisconnectStrategy) 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 *DisconnectStrategy) 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 "LostAfter": - if r.TryDecodeAsNil() { - x.LostAfter = 0 - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.LostAfter)); yyxt5 != nil { - z.DecExtension(x.LostAfter, yyxt5) - } else { - x.LostAfter = (time.Duration)(r.DecodeInt64()) - } - } - case "StopOnClientAfter": - if r.TryDecodeAsNil() { - if true && x.StopOnClientAfter != nil { - x.StopOnClientAfter = nil - } - } else { - if x.StopOnClientAfter == nil { - x.StopOnClientAfter = new(time.Duration) - } - - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.StopOnClientAfter)); yyxt7 != nil { - z.DecExtension(x.StopOnClientAfter, yyxt7) - } else { - *x.StopOnClientAfter = (time.Duration)(r.DecodeInt64()) - } - } - case "Replace": - if r.TryDecodeAsNil() { - if true && x.Replace != nil { - x.Replace = nil - } - } else { - if x.Replace == nil { - x.Replace = new(bool) - } - - if false { - } else { - *x.Replace = (bool)(r.DecodeBool()) - } - } - case "Reconcile": - if r.TryDecodeAsNil() { - x.Reconcile = "" - } else { - x.Reconcile = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DisconnectStrategy) 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.LostAfter = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LostAfter)); yyxt13 != nil { - z.DecExtension(x.LostAfter, yyxt13) - } else { - x.LostAfter = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.StopOnClientAfter != nil { - x.StopOnClientAfter = nil - } - } else { - if x.StopOnClientAfter == nil { - x.StopOnClientAfter = new(time.Duration) - } - - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.StopOnClientAfter)); yyxt15 != nil { - z.DecExtension(x.StopOnClientAfter, yyxt15) - } else { - *x.StopOnClientAfter = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Replace != nil { - x.Replace = nil - } - } else { - if x.Replace == nil { - x.Replace = new(bool) - } - - if false { - } else { - *x.Replace = (bool)(r.DecodeBool()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Reconcile = "" - } else { - x.Reconcile = (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 *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(7) - } else { - r.WriteMapStart(7) - } - 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 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "SubmitTime": - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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.SubmitTime = 0 - } else { - x.SubmitTime = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 "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 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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *JobStatusesRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Jobs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceNamespacedID(([]NamespacedID)(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.encSliceNamespacedID(([]NamespacedID)(x.Jobs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.IncludeChildren)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IncludeChildren\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IncludeChildren`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IncludeChildren)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *JobStatusesRequest) 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 *JobStatusesRequest) 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.decSliceNamespacedID((*[]NamespacedID)(&x.Jobs), d) - } - } - case "IncludeChildren": - if r.TryDecodeAsNil() { - x.IncludeChildren = false - } else { - x.IncludeChildren = (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 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *JobStatusesRequest) 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.Jobs = nil - } else { - if false { - } else { - h.decSliceNamespacedID((*[]NamespacedID)(&x.Jobs), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IncludeChildren = false - } else { - x.IncludeChildren = (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 yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *JobStatusesResponse) 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.Jobs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceJobStatusesJob(([]JobStatusesJob)(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.encSliceJobStatusesJob(([]JobStatusesJob)(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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStatusesResponse) 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 *JobStatusesResponse) 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.decSliceJobStatusesJob((*[]JobStatusesJob)(&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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStatusesResponse) 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.Jobs = nil - } else { - if false { - } else { - h.decSliceJobStatusesJob((*[]JobStatusesJob)(&x.Jobs), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *JobStatusesJob) 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.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.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.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Datacenters), e) - } - } - } - 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.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.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 x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceJobStatusesAlloc(([]JobStatusesAlloc)(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.encSliceJobStatusesAlloc(([]JobStatusesAlloc)(x.Allocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.GroupCountSum)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GroupCountSum\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GroupCountSum`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.GroupCountSum)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ChildStatuses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ChildStatuses), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ChildStatuses\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ChildStatuses`) - } - r.WriteMapElemValue() - if x.ChildStatuses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ChildStatuses), e) - } - } - } - 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)) - } - } - } - var yyn45 bool - if x.LatestDeployment == nil { - yyn45 = true - goto LABEL45 - } - LABEL45: - if yyr2 || yy2arr2 { - if yyn45 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.LatestDeployment == nil { - r.EncodeNil() - } else { - x.LatestDeployment.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LatestDeployment\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LatestDeployment`) - } - r.WriteMapElemValue() - if yyn45 { - r.EncodeNil() - } else { - if x.LatestDeployment == nil { - r.EncodeNil() - } else { - x.LatestDeployment.CodecEncodeSelf(e) - } - } - } - 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 { - r.EncodeBool(bool(x.IsPack)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IsPack\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IsPack`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IsPack)) - } - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStatusesJob) 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 *JobStatusesJob) 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.NamespacedID.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.NamespacedID.Namespace = "" - } else { - x.Namespace = (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 "NodePool": - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - case "Datacenters": - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - case "Priority": - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSliceJobStatusesAlloc((*[]JobStatusesAlloc)(&x.Allocs), d) - } - } - case "GroupCountSum": - if r.TryDecodeAsNil() { - x.GroupCountSum = 0 - } else { - x.GroupCountSum = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ChildStatuses": - if r.TryDecodeAsNil() { - x.ChildStatuses = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ChildStatuses), d) - } - } - case "ParentID": - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - case "LatestDeployment": - if r.TryDecodeAsNil() { - if true && x.LatestDeployment != nil { - x.LatestDeployment = nil - } - } else { - if x.LatestDeployment == nil { - x.LatestDeployment = new(JobStatusesLatestDeployment) - } - - x.LatestDeployment.CodecDecodeSelf(d) - } - case "Stop": - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - case "IsPack": - if r.TryDecodeAsNil() { - x.IsPack = false - } else { - x.IsPack = (bool)(r.DecodeBool()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStatusesJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj25 int - var yyb25 bool - var yyhl25 bool = l >= 0 - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NamespacedID.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NamespacedID.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSliceJobStatusesAlloc((*[]JobStatusesAlloc)(&x.Allocs), d) - } - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GroupCountSum = 0 - } else { - x.GroupCountSum = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChildStatuses = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ChildStatuses), d) - } - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.LatestDeployment != nil { - x.LatestDeployment = nil - } - } else { - if x.LatestDeployment == nil { - x.LatestDeployment = new(JobStatusesLatestDeployment) - } - - x.LatestDeployment.CodecDecodeSelf(d) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IsPack = false - } else { - x.IsPack = (bool)(r.DecodeBool()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - for { - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj25-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobStatusesAlloc) 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.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.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Group\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Group`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } - 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.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() - yy16 := &x.DeploymentStatus - yy16.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentStatus`) - } - r.WriteMapElemValue() - yy18 := &x.DeploymentStatus - yy18.CodecEncodeSelf(e) - } - 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.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)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.HasPausedTask)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HasPausedTask\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HasPausedTask`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.HasPausedTask)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStatusesAlloc) 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 *JobStatusesAlloc) 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 "Group": - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - case "ClientStatus": - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "DeploymentStatus": - if r.TryDecodeAsNil() { - x.DeploymentStatus = JobStatusesDeployment{} - } else { - x.DeploymentStatus.CodecDecodeSelf(d) - } - case "JobVersion": - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - case "FollowupEvalID": - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - case "HasPausedTask": - if r.TryDecodeAsNil() { - x.HasPausedTask = false - } else { - x.HasPausedTask = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStatusesAlloc) 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 { - 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.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - 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.DeploymentStatus = JobStatusesDeployment{} - } else { - x.DeploymentStatus.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HasPausedTask = false - } else { - x.HasPausedTask = (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 *JobStatusesDeployment) 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.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)) - } - } - var yyn6 bool - if x.Healthy == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Healthy == nil { - r.EncodeNil() - } else { - yy7 := *x.Healthy - if false { - } else { - r.EncodeBool(bool(yy7)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Healthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Healthy`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Healthy == nil { - r.EncodeNil() - } else { - yy9 := *x.Healthy - if false { - } else { - r.EncodeBool(bool(yy9)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStatusesDeployment) 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 *JobStatusesDeployment) 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 "Canary": - if r.TryDecodeAsNil() { - x.Canary = false - } else { - x.Canary = (bool)(r.DecodeBool()) - } - 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()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStatusesDeployment) 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.Canary = false - } else { - x.Canary = (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.Healthy != nil { - x.Healthy = nil - } - } else { - if x.Healthy == nil { - x.Healthy = new(bool) - } - - if false { - } else { - *x.Healthy = (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 *JobStatusesLatestDeployment) 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.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.IsActive)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IsActive\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IsActive`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IsActive)) - } - } - 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.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.AllAutoPromote)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllAutoPromote\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllAutoPromote`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllAutoPromote)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.RequiresPromotion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequiresPromotion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequiresPromotion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.RequiresPromotion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStatusesLatestDeployment) 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 *JobStatusesLatestDeployment) 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 "IsActive": - if r.TryDecodeAsNil() { - x.IsActive = false - } else { - x.IsActive = (bool)(r.DecodeBool()) - } - case "JobVersion": - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - 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 "AllAutoPromote": - if r.TryDecodeAsNil() { - x.AllAutoPromote = false - } else { - x.AllAutoPromote = (bool)(r.DecodeBool()) - } - case "RequiresPromotion": - if r.TryDecodeAsNil() { - x.RequiresPromotion = false - } else { - x.RequiresPromotion = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStatusesLatestDeployment) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IsActive = false - } else { - x.IsActive = (bool)(r.DecodeBool()) - } - 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.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllAutoPromote = false - } else { - x.AllAutoPromote = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequiresPromotion = false - } else { - x.RequiresPromotion = (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 *JobServiceRegistrationsRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *JobServiceRegistrationsRequest) 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 *JobServiceRegistrationsRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *JobServiceRegistrationsRequest) 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.JobID = "" - } else { - x.JobID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *JobServiceRegistrationsResponse) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(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.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(x.Services), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobServiceRegistrationsResponse) 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 *JobServiceRegistrationsResponse) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobServiceRegistrationsResponse) 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.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NativeServiceDiscoveryUsage) 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.Basic == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Basic == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.Basic)); yyxt4 != nil { - z.EncExtension(x.Basic, yyxt4) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Basic) - } else { - z.EncFallback(x.Basic) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Basic\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Basic`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Basic == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Basic)); yyxt5 != nil { - z.EncExtension(x.Basic, yyxt5) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Basic) - } else { - z.EncFallback(x.Basic) - } - } - } - } - var yyn6 bool - if x.Checks == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Checks == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Checks)); yyxt7 != nil { - z.EncExtension(x.Checks, yyxt7) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Checks) - } else { - z.EncFallback(x.Checks) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Checks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Checks`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Checks == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Checks)); yyxt8 != nil { - z.EncExtension(x.Checks, yyxt8) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Checks) - } else { - z.EncFallback(x.Checks) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NativeServiceDiscoveryUsage) 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 *NativeServiceDiscoveryUsage) 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 "Basic": - if r.TryDecodeAsNil() { - if true && x.Basic != nil { - x.Basic = nil - } - } else { - if x.Basic == nil { - x.Basic = new(pkg7_v3.Set[string]) - } - - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Basic)); yyxt5 != nil { - z.DecExtension(x.Basic, yyxt5) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.Basic) - } else { - z.DecFallback(x.Basic, false) - } - } - case "Checks": - if r.TryDecodeAsNil() { - if true && x.Checks != nil { - x.Checks = nil - } - } else { - if x.Checks == nil { - x.Checks = new(pkg7_v3.Set[string]) - } - - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Checks)); yyxt7 != nil { - z.DecExtension(x.Checks, yyxt7) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.Checks) - } else { - z.DecFallback(x.Checks, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NativeServiceDiscoveryUsage) 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() { - if true && x.Basic != nil { - x.Basic = nil - } - } else { - if x.Basic == nil { - x.Basic = new(pkg7_v3.Set[string]) - } - - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Basic)); yyxt10 != nil { - z.DecExtension(x.Basic, yyxt10) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.Basic) - } else { - z.DecFallback(x.Basic, false) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Checks != nil { - x.Checks = nil - } - } else { - if x.Checks == nil { - x.Checks = new(pkg7_v3.Set[string]) - } - - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.Checks)); yyxt12 != nil { - z.DecExtension(x.Checks, yyxt12) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.Checks) - } else { - z.DecFallback(x.Checks, false) - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *UnwrappedRootKey) 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.Meta == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - x.Meta.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Meta == nil { - r.EncodeNil() - } else { - x.Meta.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Key == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Key)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Key\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Key`) - } - r.WriteMapElemValue() - if x.Key == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Key)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.RSAKey == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.RSAKey)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RSAKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RSAKey`) - } - r.WriteMapElemValue() - if x.RSAKey == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.RSAKey)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *UnwrappedRootKey) 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 *UnwrappedRootKey) 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 "Meta": - if r.TryDecodeAsNil() { - if true && x.Meta != nil { - x.Meta = nil - } - } else { - if x.Meta == nil { - x.Meta = new(RootKeyMeta) - } - - x.Meta.CodecDecodeSelf(d) - } - case "Key": - if r.TryDecodeAsNil() { - x.Key = nil - } else { - if false { - } else { - x.Key = r.DecodeBytes(([]byte)(x.Key), false) - } - } - case "RSAKey": - if r.TryDecodeAsNil() { - x.RSAKey = nil - } else { - if false { - } else { - x.RSAKey = r.DecodeBytes(([]byte)(x.RSAKey), false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *UnwrappedRootKey) 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.Meta != nil { - x.Meta = nil - } - } else { - if x.Meta == nil { - x.Meta = new(RootKeyMeta) - } - - x.Meta.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Key = nil - } else { - if false { - } else { - x.Key = r.DecodeBytes(([]byte)(x.Key), false) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RSAKey = nil - } else { - if false { - } else { - x.RSAKey = r.DecodeBytes(([]byte)(x.RSAKey), false) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *RootKey) 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.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Algorithm.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Algorithm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Algorithm`) - } - r.WriteMapElemValue() - x.Algorithm.CodecEncodeSelf(e) - } - 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.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() - x.State.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"State\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `State`) - } - r.WriteMapElemValue() - x.State.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PublishTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublishTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublishTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PublishTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.WrappedKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWrappedKey(([]*WrappedKey)(x.WrappedKeys), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WrappedKeys\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WrappedKeys`) - } - r.WriteMapElemValue() - if x.WrappedKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWrappedKey(([]*WrappedKey)(x.WrappedKeys), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RootKey) 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 *RootKey) 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 "KeyID": - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - case "Algorithm": - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm.CodecDecodeSelf(d) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (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 "State": - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State.CodecDecodeSelf(d) - } - case "PublishTime": - if r.TryDecodeAsNil() { - x.PublishTime = 0 - } else { - x.PublishTime = (int64)(r.DecodeInt64()) - } - case "WrappedKeys": - if r.TryDecodeAsNil() { - x.WrappedKeys = nil - } else { - if false { - } else { - h.decSlicePtrtoWrappedKey((*[]*WrappedKey)(&x.WrappedKeys), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RootKey) 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.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm.CodecDecodeSelf(d) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - 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()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State.CodecDecodeSelf(d) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PublishTime = 0 - } else { - x.PublishTime = (int64)(r.DecodeInt64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WrappedKeys = nil - } else { - if false { - } else { - h.decSlicePtrtoWrappedKey((*[]*WrappedKey)(&x.WrappedKeys), 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 *WrappedKey) 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.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ProviderID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ProviderID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProviderID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProviderID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ProviderID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ProviderID)) - } - } - } - var yyn9 bool - if x.WrappedDataEncryptionKey == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.WrappedDataEncryptionKey == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.WrappedDataEncryptionKey)); yyxt10 != nil { - z.EncExtension(x.WrappedDataEncryptionKey, yyxt10) - } else { - z.EncFallback(x.WrappedDataEncryptionKey) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WrappedDataEncryptionKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WrappedDataEncryptionKey`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.WrappedDataEncryptionKey == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.WrappedDataEncryptionKey)); yyxt11 != nil { - z.EncExtension(x.WrappedDataEncryptionKey, yyxt11) - } else { - z.EncFallback(x.WrappedDataEncryptionKey) - } - } - } - } - var yyn12 bool - if x.WrappedRSAKey == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.WrappedRSAKey == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.WrappedRSAKey)); yyxt13 != nil { - z.EncExtension(x.WrappedRSAKey, yyxt13) - } else { - z.EncFallback(x.WrappedRSAKey) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WrappedRSAKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WrappedRSAKey`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.WrappedRSAKey == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.WrappedRSAKey)); yyxt14 != nil { - z.EncExtension(x.WrappedRSAKey, yyxt14) - } else { - z.EncFallback(x.WrappedRSAKey) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.KeyEncryptionKey == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.KeyEncryptionKey)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyEncryptionKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyEncryptionKey`) - } - r.WriteMapElemValue() - if x.KeyEncryptionKey == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.KeyEncryptionKey)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WrappedKey) 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 *WrappedKey) 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 "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "ProviderID": - if r.TryDecodeAsNil() { - x.ProviderID = "" - } else { - x.ProviderID = (string)(r.DecodeString()) - } - case "WrappedDataEncryptionKey": - if r.TryDecodeAsNil() { - if true && x.WrappedDataEncryptionKey != nil { - x.WrappedDataEncryptionKey = nil - } - } else { - if x.WrappedDataEncryptionKey == nil { - x.WrappedDataEncryptionKey = new(pkg8_v2.BlobInfo) - } - - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.WrappedDataEncryptionKey)); yyxt7 != nil { - z.DecExtension(x.WrappedDataEncryptionKey, yyxt7) - } else { - z.DecFallback(x.WrappedDataEncryptionKey, false) - } - } - case "WrappedRSAKey": - if r.TryDecodeAsNil() { - if true && x.WrappedRSAKey != nil { - x.WrappedRSAKey = nil - } - } else { - if x.WrappedRSAKey == nil { - x.WrappedRSAKey = new(pkg8_v2.BlobInfo) - } - - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.WrappedRSAKey)); yyxt9 != nil { - z.DecExtension(x.WrappedRSAKey, yyxt9) - } else { - z.DecFallback(x.WrappedRSAKey, false) - } - } - case "KeyEncryptionKey": - if r.TryDecodeAsNil() { - x.KeyEncryptionKey = nil - } else { - if false { - } else { - x.KeyEncryptionKey = r.DecodeBytes(([]byte)(x.KeyEncryptionKey), false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WrappedKey) 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.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProviderID = "" - } else { - x.ProviderID = (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.WrappedDataEncryptionKey != nil { - x.WrappedDataEncryptionKey = nil - } - } else { - if x.WrappedDataEncryptionKey == nil { - x.WrappedDataEncryptionKey = new(pkg8_v2.BlobInfo) - } - - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.WrappedDataEncryptionKey)); yyxt16 != nil { - z.DecExtension(x.WrappedDataEncryptionKey, yyxt16) - } else { - z.DecFallback(x.WrappedDataEncryptionKey, false) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.WrappedRSAKey != nil { - x.WrappedRSAKey = nil - } - } else { - if x.WrappedRSAKey == nil { - x.WrappedRSAKey = new(pkg8_v2.BlobInfo) - } - - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.WrappedRSAKey)); yyxt18 != nil { - z.DecExtension(x.WrappedRSAKey, yyxt18) - } else { - z.DecFallback(x.WrappedRSAKey, false) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KeyEncryptionKey = nil - } else { - if false { - } else { - x.KeyEncryptionKey = r.DecodeBytes(([]byte)(x.KeyEncryptionKey), false) - } - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *RootKeyMeta) 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.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Algorithm.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Algorithm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Algorithm`) - } - r.WriteMapElemValue() - x.Algorithm.CodecEncodeSelf(e) - } - 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.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() - x.State.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"State\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `State`) - } - r.WriteMapElemValue() - x.State.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PublishTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublishTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublishTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PublishTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RootKeyMeta) 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 *RootKeyMeta) 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 "KeyID": - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - case "Algorithm": - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm.CodecDecodeSelf(d) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (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 "State": - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State.CodecDecodeSelf(d) - } - case "PublishTime": - if r.TryDecodeAsNil() { - x.PublishTime = 0 - } else { - x.PublishTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RootKeyMeta) 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.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PublishTime = 0 - } else { - x.PublishTime = (int64)(r.DecodeInt64()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x KEKProviderName) 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 *KEKProviderName) 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 = (KEKProviderName)(r.DecodeString()) - } -} - -func (x *KEKProviderConfig) 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.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - 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.EncodeBool(bool(x.Active)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Active\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Active`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Active)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Config), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ExtraKeysHCL == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExtraKeysHCL), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExtraKeysHCL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExtraKeysHCL`) - } - r.WriteMapElemValue() - if x.ExtraKeysHCL == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.ExtraKeysHCL), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KEKProviderConfig) 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 *KEKProviderConfig) 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 "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Active": - if r.TryDecodeAsNil() { - x.Active = false - } else { - x.Active = (bool)(r.DecodeBool()) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Config), d) - } - } - case "ExtraKeysHCL": - if r.TryDecodeAsNil() { - x.ExtraKeysHCL = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExtraKeysHCL), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KEKProviderConfig) 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.Provider = "" - } else { - x.Provider = (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.Active = false - } else { - x.Active = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Config), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExtraKeysHCL = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.ExtraKeysHCL), 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 RootKeyState) 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 *RootKeyState) 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 = (RootKeyState)(r.DecodeString()) - } -} - -func (x EncryptionAlgorithm) 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 *EncryptionAlgorithm) 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 = (EncryptionAlgorithm)(r.DecodeString()) - } -} - -func (x *KeyringRotateRootKeyRequest) 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() - x.Algorithm.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Algorithm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Algorithm`) - } - r.WriteMapElemValue() - x.Algorithm.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Full)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Full\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Full`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Full)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PublishTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublishTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublishTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PublishTime)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *KeyringRotateRootKeyRequest) 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 *KeyringRotateRootKeyRequest) 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 "Algorithm": - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm.CodecDecodeSelf(d) - } - case "Full": - if r.TryDecodeAsNil() { - x.Full = false - } else { - x.Full = (bool)(r.DecodeBool()) - } - case "PublishTime": - if r.TryDecodeAsNil() { - x.PublishTime = 0 - } else { - x.PublishTime = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringRotateRootKeyRequest) 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.Algorithm = "" - } else { - x.Algorithm.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Full = false - } else { - x.Full = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PublishTime = 0 - } else { - x.PublishTime = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringRotateRootKeyResponse) 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.Key == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Key == nil { - r.EncodeNil() - } else { - x.Key.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Key\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Key`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Key == nil { - r.EncodeNil() - } else { - x.Key.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 *KeyringRotateRootKeyResponse) 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 *KeyringRotateRootKeyResponse) 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() { - if true && x.Key != nil { - x.Key = nil - } - } else { - if x.Key == nil { - x.Key = new(RootKeyMeta) - } - - x.Key.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 *KeyringRotateRootKeyResponse) 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.Key != nil { - x.Key = nil - } - } else { - if x.Key == nil { - x.Key = new(RootKeyMeta) - } - - x.Key.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 *KeyringListRootKeyMetaRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *KeyringListRootKeyMetaRequest) 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 *KeyringListRootKeyMetaRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *KeyringListRootKeyMetaRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *KeyringListRootKeyMetaResponse) 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.Keys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoRootKeyMeta(([]*RootKeyMeta)(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 { - h.encSlicePtrtoRootKeyMeta(([]*RootKeyMeta)(x.Keys), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringListRootKeyMetaResponse) 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 *KeyringListRootKeyMetaResponse) 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 "Keys": - if r.TryDecodeAsNil() { - x.Keys = nil - } else { - if false { - } else { - h.decSlicePtrtoRootKeyMeta((*[]*RootKeyMeta)(&x.Keys), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringListRootKeyMetaResponse) 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.Keys = nil - } else { - if false { - } else { - h.decSlicePtrtoRootKeyMeta((*[]*RootKeyMeta)(&x.Keys), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *KeyringUpdateRootKeyRequest) 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.RootKey == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RootKey == nil { - r.EncodeNil() - } else { - x.RootKey.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RootKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RootKey`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.RootKey == nil { - r.EncodeNil() - } else { - x.RootKey.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Rekey)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Rekey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Rekey`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Rekey)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *KeyringUpdateRootKeyRequest) 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 *KeyringUpdateRootKeyRequest) 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 "RootKey": - if r.TryDecodeAsNil() { - if true && x.RootKey != nil { - x.RootKey = nil - } - } else { - if x.RootKey == nil { - x.RootKey = new(UnwrappedRootKey) - } - - x.RootKey.CodecDecodeSelf(d) - } - case "Rekey": - if r.TryDecodeAsNil() { - x.Rekey = false - } else { - x.Rekey = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringUpdateRootKeyRequest) 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.RootKey != nil { - x.RootKey = nil - } - } else { - if x.RootKey == nil { - x.RootKey = new(UnwrappedRootKey) - } - - x.RootKey.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Rekey = false - } else { - x.Rekey = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringUpdateRootKeyResponse) 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 *KeyringUpdateRootKeyResponse) 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 *KeyringUpdateRootKeyResponse) 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 *KeyringUpdateRootKeyResponse) 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 *KeyringUpsertWrappedRootKeyRequest) 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.WrappedRootKeys == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.WrappedRootKeys == nil { - r.EncodeNil() - } else { - x.WrappedRootKeys.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WrappedRootKeys\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WrappedRootKeys`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.WrappedRootKeys == nil { - r.EncodeNil() - } else { - x.WrappedRootKeys.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Rekey)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Rekey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Rekey`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Rekey)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *KeyringUpsertWrappedRootKeyRequest) 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 *KeyringUpsertWrappedRootKeyRequest) 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 "WrappedRootKeys": - if r.TryDecodeAsNil() { - if true && x.WrappedRootKeys != nil { - x.WrappedRootKeys = nil - } - } else { - if x.WrappedRootKeys == nil { - x.WrappedRootKeys = new(RootKey) - } - - x.WrappedRootKeys.CodecDecodeSelf(d) - } - case "Rekey": - if r.TryDecodeAsNil() { - x.Rekey = false - } else { - x.Rekey = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringUpsertWrappedRootKeyRequest) 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.WrappedRootKeys != nil { - x.WrappedRootKeys = nil - } - } else { - if x.WrappedRootKeys == nil { - x.WrappedRootKeys = new(RootKey) - } - - x.WrappedRootKeys.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Rekey = false - } else { - x.Rekey = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringGetRootKeyRequest) 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.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *KeyringGetRootKeyRequest) 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 *KeyringGetRootKeyRequest) 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 "KeyID": - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *KeyringGetRootKeyRequest) 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.KeyID = "" - } else { - x.KeyID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *KeyringGetRootKeyResponse) 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.Key == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Key == nil { - r.EncodeNil() - } else { - x.Key.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Key\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Key`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Key == nil { - r.EncodeNil() - } else { - x.Key.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringGetRootKeyResponse) 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 *KeyringGetRootKeyResponse) 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() { - if true && x.Key != nil { - x.Key = nil - } - } else { - if x.Key == nil { - x.Key = new(UnwrappedRootKey) - } - - x.Key.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringGetRootKeyResponse) 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.Key != nil { - x.Key = nil - } - } else { - if x.Key == nil { - x.Key = new(UnwrappedRootKey) - } - - x.Key.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *KeyringUpdateRootKeyMetaRequest) 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.RootKeyMeta == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RootKeyMeta == nil { - r.EncodeNil() - } else { - x.RootKeyMeta.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RootKeyMeta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RootKeyMeta`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.RootKeyMeta == nil { - r.EncodeNil() - } else { - x.RootKeyMeta.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Rekey)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Rekey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Rekey`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Rekey)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *KeyringUpdateRootKeyMetaRequest) 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 *KeyringUpdateRootKeyMetaRequest) 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 "RootKeyMeta": - if r.TryDecodeAsNil() { - if true && x.RootKeyMeta != nil { - x.RootKeyMeta = nil - } - } else { - if x.RootKeyMeta == nil { - x.RootKeyMeta = new(RootKeyMeta) - } - - x.RootKeyMeta.CodecDecodeSelf(d) - } - case "Rekey": - if r.TryDecodeAsNil() { - x.Rekey = false - } else { - x.Rekey = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringUpdateRootKeyMetaRequest) 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.RootKeyMeta != nil { - x.RootKeyMeta = nil - } - } else { - if x.RootKeyMeta == nil { - x.RootKeyMeta = new(RootKeyMeta) - } - - x.RootKeyMeta.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Rekey = false - } else { - x.Rekey = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringUpdateRootKeyMetaResponse) 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 *KeyringUpdateRootKeyMetaResponse) 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 *KeyringUpdateRootKeyMetaResponse) 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 *KeyringUpdateRootKeyMetaResponse) 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 *KeyringDeleteRootKeyRequest) 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.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *KeyringDeleteRootKeyRequest) 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 *KeyringDeleteRootKeyRequest) 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 "KeyID": - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringDeleteRootKeyRequest) 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.KeyID = "" - } else { - x.KeyID = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *KeyringDeleteRootKeyResponse) 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 *KeyringDeleteRootKeyResponse) 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 *KeyringDeleteRootKeyResponse) 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 *KeyringDeleteRootKeyResponse) 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 *KeyringListPublicResponse) 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.PublicKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoKeyringPublicKey(([]*KeyringPublicKey)(x.PublicKeys), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublicKeys\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublicKeys`) - } - r.WriteMapElemValue() - if x.PublicKeys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoKeyringPublicKey(([]*KeyringPublicKey)(x.PublicKeys), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.RotationThreshold)); yyxt7 != nil { - z.EncExtension(x.RotationThreshold, yyxt7) - } else { - r.EncodeInt(int64(x.RotationThreshold)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RotationThreshold\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RotationThreshold`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.RotationThreshold)); yyxt8 != nil { - z.EncExtension(x.RotationThreshold, yyxt8) - } else { - r.EncodeInt(int64(x.RotationThreshold)) - } - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringListPublicResponse) 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 *KeyringListPublicResponse) 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 "PublicKeys": - if r.TryDecodeAsNil() { - x.PublicKeys = nil - } else { - if false { - } else { - h.decSlicePtrtoKeyringPublicKey((*[]*KeyringPublicKey)(&x.PublicKeys), d) - } - } - case "RotationThreshold": - if r.TryDecodeAsNil() { - x.RotationThreshold = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.RotationThreshold)); yyxt7 != nil { - z.DecExtension(x.RotationThreshold, yyxt7) - } else { - x.RotationThreshold = (time.Duration)(r.DecodeInt64()) - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringListPublicResponse) 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.PublicKeys = nil - } else { - if false { - } else { - h.decSlicePtrtoKeyringPublicKey((*[]*KeyringPublicKey)(&x.PublicKeys), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RotationThreshold = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.RotationThreshold)); yyxt17 != nil { - z.DecExtension(x.RotationThreshold, yyxt17) - } else { - x.RotationThreshold = (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.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *KeyringPublicKey) 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.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PublicKey == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.PublicKey)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PublicKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PublicKey`) - } - r.WriteMapElemValue() - if x.PublicKey == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.PublicKey)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Algorithm))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Algorithm)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Algorithm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Algorithm`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Algorithm))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Algorithm)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Use))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Use)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Use\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Use`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Use))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Use)) - } - } - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringPublicKey) 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 *KeyringPublicKey) 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 "KeyID": - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - case "PublicKey": - if r.TryDecodeAsNil() { - x.PublicKey = nil - } else { - if false { - } else { - x.PublicKey = r.DecodeBytes(([]byte)(x.PublicKey), false) - } - } - case "Algorithm": - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm = (string)(r.DecodeString()) - } - case "Use": - if r.TryDecodeAsNil() { - x.Use = "" - } else { - x.Use = (string)(r.DecodeString()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringPublicKey) 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.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PublicKey = nil - } else { - if false { - } else { - x.PublicKey = r.DecodeBytes(([]byte)(x.PublicKey), false) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Algorithm = "" - } else { - x.Algorithm = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Use = "" - } else { - x.Use = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(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 *KeyringGetConfigResponse) 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) - } - var yyn3 bool - if x.OIDCDiscovery == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.OIDCDiscovery == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.OIDCDiscovery)); yyxt4 != nil { - z.EncExtension(x.OIDCDiscovery, yyxt4) - } else { - z.EncFallback(x.OIDCDiscovery) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OIDCDiscovery\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OIDCDiscovery`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.OIDCDiscovery == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.OIDCDiscovery)); yyxt5 != nil { - z.EncExtension(x.OIDCDiscovery, yyxt5) - } else { - z.EncFallback(x.OIDCDiscovery) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringGetConfigResponse) 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 *KeyringGetConfigResponse) 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 "OIDCDiscovery": - if r.TryDecodeAsNil() { - if true && x.OIDCDiscovery != nil { - x.OIDCDiscovery = nil - } - } else { - if x.OIDCDiscovery == nil { - x.OIDCDiscovery = new(OIDCDiscoveryConfig) - } - - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.OIDCDiscovery)); yyxt5 != nil { - z.DecExtension(x.OIDCDiscovery, yyxt5) - } else { - z.DecFallback(x.OIDCDiscovery, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringGetConfigResponse) 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.OIDCDiscovery != nil { - x.OIDCDiscovery = nil - } - } else { - if x.OIDCDiscovery == nil { - x.OIDCDiscovery = new(OIDCDiscoveryConfig) - } - - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.OIDCDiscovery)); yyxt8 != nil { - z.DecExtension(x.OIDCDiscovery, yyxt8) - } else { - z.DecFallback(x.OIDCDiscovery, false) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *NamespaceVaultConfiguration) 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.Default))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Default)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Default\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Default`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Default))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Default)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allowed == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Allowed), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allowed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allowed`) - } - r.WriteMapElemValue() - if x.Allowed == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Allowed), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Denied == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Denied), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Denied\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Denied`) - } - r.WriteMapElemValue() - if x.Denied == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Denied), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespaceVaultConfiguration) 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 *NamespaceVaultConfiguration) 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 "Default": - if r.TryDecodeAsNil() { - x.Default = "" - } else { - x.Default = (string)(r.DecodeString()) - } - case "Allowed": - if r.TryDecodeAsNil() { - x.Allowed = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allowed), d) - } - } - case "Denied": - if r.TryDecodeAsNil() { - x.Denied = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Denied), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespaceVaultConfiguration) 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.Default = "" - } else { - x.Default = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allowed = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allowed), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Denied = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Denied), 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 *NamespaceConsulConfiguration) 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.Default))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Default)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Default\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Default`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Default))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Default)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allowed == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Allowed), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allowed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allowed`) - } - r.WriteMapElemValue() - if x.Allowed == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Allowed), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Denied == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Denied), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Denied\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Denied`) - } - r.WriteMapElemValue() - if x.Denied == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Denied), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespaceConsulConfiguration) 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 *NamespaceConsulConfiguration) 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 "Default": - if r.TryDecodeAsNil() { - x.Default = "" - } else { - x.Default = (string)(r.DecodeString()) - } - case "Allowed": - if r.TryDecodeAsNil() { - x.Allowed = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allowed), d) - } - } - case "Denied": - if r.TryDecodeAsNil() { - x.Denied = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Denied), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespaceConsulConfiguration) 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.Default = "" - } else { - x.Default = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allowed = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allowed), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Denied = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Denied), 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 *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(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaskNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNetworkResource(([]*NetworkResource)(x.TaskNetworks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskNetworks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskNetworks`) - } - r.WriteMapElemValue() - if x.TaskNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNetworkResource(([]*NetworkResource)(x.TaskNetworks), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.GroupNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeNetworkResource(([]*NodeNetworkResource)(x.GroupNetworks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GroupNetworks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GroupNetworks`) - } - r.WriteMapElemValue() - if x.GroupNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeNetworkResource(([]*NodeNetworkResource)(x.GroupNetworks), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.HostNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSliceNodeNetworkAddress((map[string][]NodeNetworkAddress)(x.HostNetworks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostNetworks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HostNetworks`) - } - r.WriteMapElemValue() - if x.HostNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSliceNodeNetworkAddress((map[string][]NodeNetworkAddress)(x.HostNetworks), 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.AvailBandwidth == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(x.AvailBandwidth), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UsedBandwidth == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(x.UsedBandwidth), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MinDynamicPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinDynamicPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinDynamicPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MinDynamicPort)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MaxDynamicPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxDynamicPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxDynamicPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxDynamicPort)) - } - } - 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 "TaskNetworks": - if r.TryDecodeAsNil() { - x.TaskNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNetworkResource((*[]*NetworkResource)(&x.TaskNetworks), d) - } - } - case "GroupNetworks": - if r.TryDecodeAsNil() { - x.GroupNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeNetworkResource((*[]*NodeNetworkResource)(&x.GroupNetworks), d) - } - } - case "HostNetworks": - if r.TryDecodeAsNil() { - x.HostNetworks = nil - } else { - if false { - } else { - h.decMapstringSliceNodeNetworkAddress((*map[string][]NodeNetworkAddress)(&x.HostNetworks), d) - } - } - case "UsedPorts": - if r.TryDecodeAsNil() { - x.UsedPorts = nil - } else { - if false { - } else { - h.decMapstringBitmap((*map[string]Bitmap)(&x.UsedPorts), d) - } - } - case "AvailBandwidth": - if r.TryDecodeAsNil() { - x.AvailBandwidth = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.AvailBandwidth), d) - } - } - case "UsedBandwidth": - if r.TryDecodeAsNil() { - x.UsedBandwidth = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.UsedBandwidth), d) - } - } - case "MinDynamicPort": - if r.TryDecodeAsNil() { - x.MinDynamicPort = 0 - } else { - x.MinDynamicPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "MaxDynamicPort": - if r.TryDecodeAsNil() { - x.MaxDynamicPort = 0 - } else { - x.MaxDynamicPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 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.TaskNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNetworkResource((*[]*NetworkResource)(&x.TaskNetworks), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GroupNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeNetworkResource((*[]*NodeNetworkResource)(&x.GroupNetworks), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostNetworks = nil - } else { - if false { - } else { - h.decMapstringSliceNodeNetworkAddress((*map[string][]NodeNetworkAddress)(&x.HostNetworks), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UsedPorts = nil - } else { - if false { - } else { - h.decMapstringBitmap((*map[string]Bitmap)(&x.UsedPorts), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AvailBandwidth = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.AvailBandwidth), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UsedBandwidth = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.UsedBandwidth), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MinDynamicPort = 0 - } else { - x.MinDynamicPort = (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.MaxDynamicPort = 0 - } else { - x.MaxDynamicPort = (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 *ClientHostNetworkConfig) 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.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.Interface))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Interface)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Interface\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Interface`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Interface))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Interface)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReservedPorts))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReservedPorts)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedPorts`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReservedPorts))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReservedPorts)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ClientHostNetworkConfig) 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 *ClientHostNetworkConfig) 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 "CIDR": - if r.TryDecodeAsNil() { - x.CIDR = "" - } else { - x.CIDR = (string)(r.DecodeString()) - } - case "Interface": - if r.TryDecodeAsNil() { - x.Interface = "" - } else { - x.Interface = (string)(r.DecodeString()) - } - case "ReservedPorts": - if r.TryDecodeAsNil() { - x.ReservedPorts = "" - } else { - x.ReservedPorts = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ClientHostNetworkConfig) 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.CIDR = "" - } else { - x.CIDR = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Interface = "" - } else { - x.Interface = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedPorts = "" - } else { - x.ReservedPorts = (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 *CSITopology) 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.Segments == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Segments), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Segments\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Segments`) - } - r.WriteMapElemValue() - if x.Segments == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Segments), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSITopology) 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 *CSITopology) 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 "Segments": - if r.TryDecodeAsNil() { - x.Segments = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Segments), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSITopology) 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.Segments = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Segments), 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 *CSITopologyRequest) 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.Required == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Required), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Required\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Required`) - } - r.WriteMapElemValue() - if x.Required == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Required), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Preferred == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Preferred), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Preferred\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Preferred`) - } - r.WriteMapElemValue() - if x.Preferred == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoCSITopology(([]*CSITopology)(x.Preferred), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSITopologyRequest) 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 *CSITopologyRequest) 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 "Required": - if r.TryDecodeAsNil() { - x.Required = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Required), d) - } - } - case "Preferred": - if r.TryDecodeAsNil() { - x.Preferred = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Preferred), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSITopologyRequest) 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.Required = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Required), d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Preferred = nil - } else { - if false { - } else { - h.decSlicePtrtoCSITopology((*[]*CSITopology)(&x.Preferred), 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 *CSINodeInfo) 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.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.EncodeInt(int64(x.MaxVolumes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxVolumes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxVolumes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxVolumes)) - } - } - var yyn9 bool - if x.AccessibleTopology == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.AccessibleTopology == nil { - r.EncodeNil() - } else { - x.AccessibleTopology.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessibleTopology\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessibleTopology`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.AccessibleTopology == nil { - r.EncodeNil() - } else { - x.AccessibleTopology.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.RequiresNodeStageVolume)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequiresNodeStageVolume\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequiresNodeStageVolume`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.RequiresNodeStageVolume)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsStats)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsStats\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsStats`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsStats)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsExpand)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsExpand\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsExpand`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsExpand)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsCondition)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsCondition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsCondition`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsCondition)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSINodeInfo) 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 *CSINodeInfo) 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 "MaxVolumes": - if r.TryDecodeAsNil() { - x.MaxVolumes = 0 - } else { - x.MaxVolumes = (int64)(r.DecodeInt64()) - } - case "AccessibleTopology": - if r.TryDecodeAsNil() { - if true && x.AccessibleTopology != nil { - x.AccessibleTopology = nil - } - } else { - if x.AccessibleTopology == nil { - x.AccessibleTopology = new(CSITopology) - } - - x.AccessibleTopology.CodecDecodeSelf(d) - } - case "RequiresNodeStageVolume": - if r.TryDecodeAsNil() { - x.RequiresNodeStageVolume = false - } else { - x.RequiresNodeStageVolume = (bool)(r.DecodeBool()) - } - case "SupportsStats": - if r.TryDecodeAsNil() { - x.SupportsStats = false - } else { - x.SupportsStats = (bool)(r.DecodeBool()) - } - case "SupportsExpand": - if r.TryDecodeAsNil() { - x.SupportsExpand = false - } else { - x.SupportsExpand = (bool)(r.DecodeBool()) - } - case "SupportsCondition": - if r.TryDecodeAsNil() { - x.SupportsCondition = false - } else { - x.SupportsCondition = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSINodeInfo) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxVolumes = 0 - } else { - x.MaxVolumes = (int64)(r.DecodeInt64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.AccessibleTopology != nil { - x.AccessibleTopology = nil - } - } else { - if x.AccessibleTopology == nil { - x.AccessibleTopology = new(CSITopology) - } - - x.AccessibleTopology.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequiresNodeStageVolume = false - } else { - x.RequiresNodeStageVolume = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsStats = false - } else { - x.SupportsStats = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsExpand = false - } else { - x.SupportsExpand = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsCondition = false - } else { - x.SupportsCondition = (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 *CSIControllerInfo) 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 { - r.EncodeBool(bool(x.SupportsCreateDelete)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsCreateDelete\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsCreateDelete`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsCreateDelete)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsAttachDetach)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsAttachDetach\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsAttachDetach`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsAttachDetach)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsListVolumes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsListVolumes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsListVolumes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsListVolumes)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsGetCapacity)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsGetCapacity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsGetCapacity`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsGetCapacity)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsCreateDeleteSnapshot)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsCreateDeleteSnapshot\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsCreateDeleteSnapshot`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsCreateDeleteSnapshot)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsListSnapshots)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsListSnapshots\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsListSnapshots`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsListSnapshots)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsClone)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsClone\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsClone`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsClone)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsReadOnlyAttach)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsReadOnlyAttach\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsReadOnlyAttach`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsReadOnlyAttach)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsExpand)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsExpand\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsExpand`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsExpand)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsListVolumesAttachedNodes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsListVolumesAttachedNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsListVolumesAttachedNodes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsListVolumesAttachedNodes)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsCondition)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsCondition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsCondition`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsCondition)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SupportsGet)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SupportsGet\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SupportsGet`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SupportsGet)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIControllerInfo) 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 *CSIControllerInfo) 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 "SupportsCreateDelete": - if r.TryDecodeAsNil() { - x.SupportsCreateDelete = false - } else { - x.SupportsCreateDelete = (bool)(r.DecodeBool()) - } - case "SupportsAttachDetach": - if r.TryDecodeAsNil() { - x.SupportsAttachDetach = false - } else { - x.SupportsAttachDetach = (bool)(r.DecodeBool()) - } - case "SupportsListVolumes": - if r.TryDecodeAsNil() { - x.SupportsListVolumes = false - } else { - x.SupportsListVolumes = (bool)(r.DecodeBool()) - } - case "SupportsGetCapacity": - if r.TryDecodeAsNil() { - x.SupportsGetCapacity = false - } else { - x.SupportsGetCapacity = (bool)(r.DecodeBool()) - } - case "SupportsCreateDeleteSnapshot": - if r.TryDecodeAsNil() { - x.SupportsCreateDeleteSnapshot = false - } else { - x.SupportsCreateDeleteSnapshot = (bool)(r.DecodeBool()) - } - case "SupportsListSnapshots": - if r.TryDecodeAsNil() { - x.SupportsListSnapshots = false - } else { - x.SupportsListSnapshots = (bool)(r.DecodeBool()) - } - case "SupportsClone": - if r.TryDecodeAsNil() { - x.SupportsClone = false - } else { - x.SupportsClone = (bool)(r.DecodeBool()) - } - case "SupportsReadOnlyAttach": - if r.TryDecodeAsNil() { - x.SupportsReadOnlyAttach = false - } else { - x.SupportsReadOnlyAttach = (bool)(r.DecodeBool()) - } - case "SupportsExpand": - if r.TryDecodeAsNil() { - x.SupportsExpand = false - } else { - x.SupportsExpand = (bool)(r.DecodeBool()) - } - case "SupportsListVolumesAttachedNodes": - if r.TryDecodeAsNil() { - x.SupportsListVolumesAttachedNodes = false - } else { - x.SupportsListVolumesAttachedNodes = (bool)(r.DecodeBool()) - } - case "SupportsCondition": - if r.TryDecodeAsNil() { - x.SupportsCondition = false - } else { - x.SupportsCondition = (bool)(r.DecodeBool()) - } - case "SupportsGet": - if r.TryDecodeAsNil() { - x.SupportsGet = false - } else { - x.SupportsGet = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIControllerInfo) 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.SupportsCreateDelete = false - } else { - x.SupportsCreateDelete = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsAttachDetach = false - } else { - x.SupportsAttachDetach = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsListVolumes = false - } else { - x.SupportsListVolumes = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsGetCapacity = false - } else { - x.SupportsGetCapacity = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsCreateDeleteSnapshot = false - } else { - x.SupportsCreateDeleteSnapshot = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsListSnapshots = false - } else { - x.SupportsListSnapshots = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsClone = false - } else { - x.SupportsClone = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsReadOnlyAttach = false - } else { - x.SupportsReadOnlyAttach = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsExpand = false - } else { - x.SupportsExpand = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsListVolumesAttachedNodes = false - } else { - x.SupportsListVolumesAttachedNodes = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsCondition = false - } else { - x.SupportsCondition = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SupportsGet = false - } else { - x.SupportsGet = (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 *CSIInfo) 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.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PluginID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PluginID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PluginID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PluginID)) - } - } - } - 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 { - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ProviderVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ProviderVersion)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProviderVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProviderVersion`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ProviderVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ProviderVersion)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.RequiresControllerPlugin)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequiresControllerPlugin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequiresControllerPlugin`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.RequiresControllerPlugin)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.RequiresTopologies)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequiresTopologies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequiresTopologies`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.RequiresTopologies)) - } - } - var yyn30 bool - if x.ControllerInfo == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ControllerInfo == nil { - r.EncodeNil() - } else { - x.ControllerInfo.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ControllerInfo\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ControllerInfo`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.ControllerInfo == nil { - r.EncodeNil() - } else { - x.ControllerInfo.CodecEncodeSelf(e) - } - } - } - var yyn33 bool - if x.NodeInfo == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodeInfo == nil { - r.EncodeNil() - } else { - x.NodeInfo.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeInfo\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeInfo`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.NodeInfo == nil { - r.EncodeNil() - } else { - x.NodeInfo.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CSIInfo) 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 *CSIInfo) 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 "PluginID": - if r.TryDecodeAsNil() { - x.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (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 "UpdateTime": - if r.TryDecodeAsNil() { - x.UpdateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.UpdateTime = r.DecodeTime() - } else if yyxt9 := z.Extension(z.I2Rtid(x.UpdateTime)); yyxt9 != nil { - z.DecExtension(x.UpdateTime, yyxt9) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.UpdateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.UpdateTime) - } else { - z.DecFallback(&x.UpdateTime, false) - } - } - case "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "ProviderVersion": - if r.TryDecodeAsNil() { - x.ProviderVersion = "" - } else { - x.ProviderVersion = (string)(r.DecodeString()) - } - case "RequiresControllerPlugin": - if r.TryDecodeAsNil() { - x.RequiresControllerPlugin = false - } else { - x.RequiresControllerPlugin = (bool)(r.DecodeBool()) - } - case "RequiresTopologies": - if r.TryDecodeAsNil() { - x.RequiresTopologies = false - } else { - x.RequiresTopologies = (bool)(r.DecodeBool()) - } - case "ControllerInfo": - if r.TryDecodeAsNil() { - if true && x.ControllerInfo != nil { - x.ControllerInfo = nil - } - } else { - if x.ControllerInfo == nil { - x.ControllerInfo = new(CSIControllerInfo) - } - - x.ControllerInfo.CodecDecodeSelf(d) - } - case "NodeInfo": - if r.TryDecodeAsNil() { - if true && x.NodeInfo != nil { - x.NodeInfo = nil - } - } else { - if x.NodeInfo == nil { - x.NodeInfo = new(CSINodeInfo) - } - - x.NodeInfo.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CSIInfo) 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.PluginID = "" - } else { - x.PluginID = (string)(r.DecodeString()) - } - 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.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthDescription = "" - } else { - x.HealthDescription = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - 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 yyxt22 := z.Extension(z.I2Rtid(x.UpdateTime)); yyxt22 != nil { - z.DecExtension(x.UpdateTime, yyxt22) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.UpdateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.UpdateTime) - } else { - z.DecFallback(&x.UpdateTime, false) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProviderVersion = "" - } else { - x.ProviderVersion = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequiresControllerPlugin = false - } else { - x.RequiresControllerPlugin = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequiresTopologies = false - } else { - x.RequiresTopologies = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ControllerInfo != nil { - x.ControllerInfo = nil - } - } else { - if x.ControllerInfo == nil { - x.ControllerInfo = new(CSIControllerInfo) - } - - x.ControllerInfo.CodecDecodeSelf(d) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodeInfo != nil { - x.NodeInfo = nil - } - } else { - if x.NodeInfo == nil { - x.NodeInfo = new(CSINodeInfo) - } - - x.NodeInfo.CodecDecodeSelf(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 *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 { - h.encMapstringstring((map[string]string)(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.encMapstringstring((map[string]string)(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 { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringstring((*map[string]string)(&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 *ScheduleStateApplyRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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().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.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() - x.ScheduleState.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScheduleState\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScheduleState`) - } - r.WriteMapElemValue() - x.ScheduleState.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ScheduleStateApplyRequest) 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 *ScheduleStateApplyRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - 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 "ScheduleState": - if r.TryDecodeAsNil() { - x.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ScheduleStateApplyRequest) 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.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - for { - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj21-1, "") - } - r.ReadArrayEnd() -} - -func (x *ScheduleStateReadRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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().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.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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ScheduleStateReadRequest) 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 *ScheduleStateReadRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - 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()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ScheduleStateReadRequest) 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.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 yyxt25 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt25 != nil { - z.DecExtension(x.MaxQueryTime, yyxt25) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - 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.TaskName = "" - } else { - x.TaskName = (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 *ScheduleStateResponse) 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() - x.ScheduleState.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScheduleState\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScheduleState`) - } - r.WriteMapElemValue() - x.ScheduleState.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ScheduleStateResponse) 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 *ScheduleStateResponse) 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 "ScheduleState": - if r.TryDecodeAsNil() { - x.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ScheduleStateResponse) 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.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeMetaApplyRequest) 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(14) - } else { - r.WriteMapStart(14) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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().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.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostring((map[string]*string)(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 { - h.encMapstringPtrtostring((map[string]*string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeMetaApplyRequest) 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 *NodeMetaApplyRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringPtrtostring((*map[string]*string)(&x.Meta), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeMetaApplyRequest) 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.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 yyxt25 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt25 != nil { - z.DecExtension(x.MaxQueryTime, yyxt25) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - 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 { - h.decMapstringPtrtostring((*map[string]*string)(&x.Meta), d) - } - } - for { - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj20-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeMetaResponse) 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.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Dynamic == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostring((map[string]*string)(x.Dynamic), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Dynamic\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Dynamic`) - } - r.WriteMapElemValue() - if x.Dynamic == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostring((map[string]*string)(x.Dynamic), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Static == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Static), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Static\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Static`) - } - r.WriteMapElemValue() - if x.Static == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Static), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeMetaResponse) 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 *NodeMetaResponse) 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 "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "Dynamic": - if r.TryDecodeAsNil() { - x.Dynamic = nil - } else { - if false { - } else { - h.decMapstringPtrtostring((*map[string]*string)(&x.Dynamic), d) - } - } - case "Static": - if r.TryDecodeAsNil() { - x.Static = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Static), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeMetaResponse) 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.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Dynamic = nil - } else { - if false { - } else { - h.decMapstringPtrtostring((*map[string]*string)(&x.Dynamic), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Static = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Static), 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 *NodePool) 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 x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - var yyn12 bool - if x.SchedulerConfiguration == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.SchedulerConfiguration == nil { - r.EncodeNil() - } else { - x.SchedulerConfiguration.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulerConfiguration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulerConfiguration`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.SchedulerConfiguration == nil { - r.EncodeNil() - } else { - x.SchedulerConfiguration.CodecEncodeSelf(e) - } - } - } - 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 *NodePool) 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 *NodePool) 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 "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "SchedulerConfiguration": - if r.TryDecodeAsNil() { - if true && x.SchedulerConfiguration != nil { - x.SchedulerConfiguration = nil - } - } else { - if x.SchedulerConfiguration == nil { - x.SchedulerConfiguration = new(NodePoolSchedulerConfiguration) - } - - x.SchedulerConfiguration.CodecDecodeSelf(d) - } - 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 *NodePool) 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.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SchedulerConfiguration != nil { - x.SchedulerConfiguration = nil - } - } else { - if x.SchedulerConfiguration == nil { - x.SchedulerConfiguration = new(NodePoolSchedulerConfiguration) - } - - x.SchedulerConfiguration.CodecDecodeSelf(d) - } - 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 *NodePoolSchedulerConfiguration) 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() - x.SchedulerAlgorithm.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulerAlgorithm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulerAlgorithm`) - } - r.WriteMapElemValue() - x.SchedulerAlgorithm.CodecEncodeSelf(e) - } - var yyn6 bool - if x.MemoryOversubscriptionEnabled == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MemoryOversubscriptionEnabled == nil { - r.EncodeNil() - } else { - yy7 := *x.MemoryOversubscriptionEnabled - if false { - } else { - r.EncodeBool(bool(yy7)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryOversubscriptionEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryOversubscriptionEnabled`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.MemoryOversubscriptionEnabled == nil { - r.EncodeNil() - } else { - yy9 := *x.MemoryOversubscriptionEnabled - if false { - } else { - r.EncodeBool(bool(yy9)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodePoolSchedulerConfiguration) 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 *NodePoolSchedulerConfiguration) 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 "SchedulerAlgorithm": - if r.TryDecodeAsNil() { - x.SchedulerAlgorithm = "" - } else { - x.SchedulerAlgorithm.CodecDecodeSelf(d) - } - case "MemoryOversubscriptionEnabled": - if r.TryDecodeAsNil() { - if true && x.MemoryOversubscriptionEnabled != nil { - x.MemoryOversubscriptionEnabled = nil - } - } else { - if x.MemoryOversubscriptionEnabled == nil { - x.MemoryOversubscriptionEnabled = new(bool) - } - - if false { - } else { - *x.MemoryOversubscriptionEnabled = (bool)(r.DecodeBool()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodePoolSchedulerConfiguration) 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.SchedulerAlgorithm = "" - } else { - x.SchedulerAlgorithm.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.MemoryOversubscriptionEnabled != nil { - x.MemoryOversubscriptionEnabled = nil - } - } else { - if x.MemoryOversubscriptionEnabled == nil { - x.MemoryOversubscriptionEnabled = new(bool) - } - - if false { - } else { - *x.MemoryOversubscriptionEnabled = (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 *NodePoolListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NodePoolListRequest) 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 *NodePoolListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NodePoolListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *NodePoolListResponse) 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.NodePools == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodePool(([]*NodePool)(x.NodePools), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePools\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePools`) - } - r.WriteMapElemValue() - if x.NodePools == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodePool(([]*NodePool)(x.NodePools), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodePoolListResponse) 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 *NodePoolListResponse) 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 "NodePools": - if r.TryDecodeAsNil() { - x.NodePools = nil - } else { - if false { - } else { - h.decSlicePtrtoNodePool((*[]*NodePool)(&x.NodePools), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodePoolListResponse) 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.NodePools = nil - } else { - if false { - } else { - h.decSlicePtrtoNodePool((*[]*NodePool)(&x.NodePools), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NodePoolSpecificRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NodePoolSpecificRequest) 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 *NodePoolSpecificRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NodePoolSpecificRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *SingleNodePoolResponse) 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.NodePool == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodePool == nil { - r.EncodeNil() - } else { - x.NodePool.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.NodePool == nil { - r.EncodeNil() - } else { - x.NodePool.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleNodePoolResponse) 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 *SingleNodePoolResponse) 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 "NodePool": - if r.TryDecodeAsNil() { - if true && x.NodePool != nil { - x.NodePool = nil - } - } else { - if x.NodePool == nil { - x.NodePool = new(NodePool) - } - - x.NodePool.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleNodePoolResponse) 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.NodePool != nil { - x.NodePool = nil - } - } else { - if x.NodePool == nil { - x.NodePool = new(NodePool) - } - - x.NodePool.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NodePoolUpsertRequest) 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.NodePools == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodePool(([]*NodePool)(x.NodePools), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePools\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePools`) - } - r.WriteMapElemValue() - if x.NodePools == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodePool(([]*NodePool)(x.NodePools), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *NodePoolUpsertRequest) 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 *NodePoolUpsertRequest) 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 "NodePools": - if r.TryDecodeAsNil() { - x.NodePools = nil - } else { - if false { - } else { - h.decSlicePtrtoNodePool((*[]*NodePool)(&x.NodePools), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NodePoolUpsertRequest) 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.NodePools = nil - } else { - if false { - } else { - h.decSlicePtrtoNodePool((*[]*NodePool)(&x.NodePools), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NodePoolDeleteRequest) 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.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *NodePoolDeleteRequest) 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 *NodePoolDeleteRequest) 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NodePoolDeleteRequest) 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.Names = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Names), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NodePoolNodesRequest) 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(14) - } else { - r.WriteMapStart(14) - } - 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)) - } - } - } - var yyn6 bool - if x.Fields == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NodePoolNodesRequest) 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 *NodePoolNodesRequest) 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 "Fields": - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(NodeStubFields) - } - - x.Fields.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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NodePoolNodesRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(NodeStubFields) - } - - x.Fields.CodecDecodeSelf(d) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodePoolNodesResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodePoolNodesResponse) 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 *NodePoolNodesResponse) 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodePoolNodesResponse) 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.Nodes = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeListStub((*[]*NodeListStub)(&x.Nodes), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NodePoolJobsRequest) 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(14) - } else { - r.WriteMapStart(14) - } - 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)) - } - } - } - var yyn6 bool - if x.Fields == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NodePoolJobsRequest) 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 *NodePoolJobsRequest) 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 "Fields": - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(JobStubFields) - } - - x.Fields.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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NodePoolJobsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(JobStubFields) - } - - x.Fields.CodecDecodeSelf(d) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodePoolJobsResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodePoolJobsResponse) 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 *NodePoolJobsResponse) 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodePoolJobsResponse) 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.Jobs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobListStub((*[]*JobListStub)(&x.Jobs), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NUMA) 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.Affinity))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Affinity)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Affinity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Affinity`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Affinity))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Affinity)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Devices), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NUMA) 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 *NUMA) 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 "Affinity": - if r.TryDecodeAsNil() { - x.Affinity = "" - } else { - x.Affinity = (string)(r.DecodeString()) - } - case "Devices": - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Devices), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NUMA) 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.Affinity = "" - } else { - x.Affinity = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Devices), 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 *LegacyNodeCpuResources) 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.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.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.TotalCpuCores)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TotalCpuCores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TotalCpuCores`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.TotalCpuCores)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ReservableCpuCores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ReservableCpuCores), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservableCpuCores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservableCpuCores`) - } - r.WriteMapElemValue() - if x.ReservableCpuCores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ReservableCpuCores), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *LegacyNodeCpuResources) 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 *LegacyNodeCpuResources) 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()) - } - case "TotalCpuCores": - if r.TryDecodeAsNil() { - x.TotalCpuCores = 0 - } else { - x.TotalCpuCores = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - case "ReservableCpuCores": - if r.TryDecodeAsNil() { - x.ReservableCpuCores = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ReservableCpuCores), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *LegacyNodeCpuResources) 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.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TotalCpuCores = 0 - } else { - x.TotalCpuCores = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservableCpuCores = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ReservableCpuCores), 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 *NodeProcessorResources) 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) - } - var yyn3 bool - if x.Topology == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Topology == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.Topology)); yyxt4 != nil { - z.EncExtension(x.Topology, yyxt4) - } else { - z.EncFallback(x.Topology) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Topology\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Topology`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Topology == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Topology)); yyxt5 != nil { - z.EncExtension(x.Topology, yyxt5) - } else { - z.EncFallback(x.Topology) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeProcessorResources) 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 *NodeProcessorResources) 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 "Topology": - if r.TryDecodeAsNil() { - if true && x.Topology != nil { - x.Topology = nil - } - } else { - if x.Topology == nil { - x.Topology = new(pkg4_numalib.Topology) - } - - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Topology)); yyxt5 != nil { - z.DecExtension(x.Topology, yyxt5) - } else { - z.DecFallback(x.Topology, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeProcessorResources) 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.Topology != nil { - x.Topology = nil - } - } else { - if x.Topology == nil { - x.Topology = new(pkg4_numalib.Topology) - } - - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Topology)); yyxt8 != nil { - z.DecExtension(x.Topology, yyxt8) - } else { - z.DecFallback(x.Topology, false) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-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 = (pkg10_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 = (pkg10_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 = (pkg10_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 = (pkg10_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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 = (pkg10_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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Address = "" - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.Address)); yyxt13 != nil { - z.DecExtension(x.Address, yyxt13) - } else { - x.Address = (pkg10_raft.ServerAddress)(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 = (pkg10_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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.ID = "" - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.ID)); yyxt13 != nil { - z.DecExtension(x.ID, yyxt13) - } else { - x.ID = (pkg10_raft.ServerID)(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *RaftPeerRequest) 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 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 yyxt7 := z.Extension(z.I2Rtid(x.ID)); yyxt7 != nil { - z.EncExtension(x.ID, yyxt7) - } 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 yyxt8 := z.Extension(z.I2Rtid(x.ID)); yyxt8 != nil { - z.EncExtension(x.ID, yyxt8) - } 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *RaftPeerRequest) 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 *RaftPeerRequest) 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.RaftIDAddress.Address = "" - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Address)); yyxt5 != nil { - z.DecExtension(x.Address, yyxt5) - } else { - x.Address = (pkg10_raft.ServerAddress)(r.DecodeString()) - } - } - case "ID": - if r.TryDecodeAsNil() { - x.RaftIDAddress.ID = "" - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.ID)); yyxt7 != nil { - z.DecExtension(x.ID, yyxt7) - } else { - x.ID = (pkg10_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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *RaftPeerRequest) 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.RaftIDAddress.Address = "" - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.Address)); yyxt15 != nil { - z.DecExtension(x.Address, yyxt15) - } else { - x.Address = (pkg10_raft.ServerAddress)(r.DecodeString()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RaftIDAddress.ID = "" - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.ID)); yyxt17 != nil { - z.DecExtension(x.ID, yyxt17) - } else { - x.ID = (pkg10_raft.ServerID)(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *LeadershipTransferResponse) 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.From - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"From\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `From`) - } - r.WriteMapElemValue() - yy6 := &x.From - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy9 := &x.To - yy9.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"To\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `To`) - } - r.WriteMapElemValue() - yy11 := &x.To - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Noop)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Noop\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Noop`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Noop)) - } - } - 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 *LeadershipTransferResponse) 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 *LeadershipTransferResponse) 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 "From": - if r.TryDecodeAsNil() { - x.From = RaftIDAddress{} - } else { - x.From.CodecDecodeSelf(d) - } - case "To": - if r.TryDecodeAsNil() { - x.To = RaftIDAddress{} - } else { - x.To.CodecDecodeSelf(d) - } - case "Noop": - if r.TryDecodeAsNil() { - x.Noop = false - } else { - x.Noop = (bool)(r.DecodeBool()) - } - 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 *LeadershipTransferResponse) 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.From = RaftIDAddress{} - } else { - x.From.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.To = RaftIDAddress{} - } else { - x.To.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Noop = false - } else { - x.Noop = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Err = nil - } else { - if false { - } else { - z.DecFallback(&x.Err, true) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *RaftIDAddress) 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.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 yyxt7 := z.Extension(z.I2Rtid(x.ID)); yyxt7 != nil { - z.EncExtension(x.ID, yyxt7) - } 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 yyxt8 := z.Extension(z.I2Rtid(x.ID)); yyxt8 != nil { - z.EncExtension(x.ID, yyxt8) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RaftIDAddress) 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 *RaftIDAddress) 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 = (pkg10_raft.ServerAddress)(r.DecodeString()) - } - } - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.ID)); yyxt7 != nil { - z.DecExtension(x.ID, yyxt7) - } else { - x.ID = (pkg10_raft.ServerID)(r.DecodeString()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RaftIDAddress) 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.Address = "" - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Address)); yyxt10 != nil { - z.DecExtension(x.Address, yyxt10) - } else { - x.Address = (pkg10_raft.ServerAddress)(r.DecodeString()) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - 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 = (pkg10_raft.ServerID)(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 *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(8) - } else { - r.WriteMapStart(8) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = AutopilotConfig{} - } else { - x.Config.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CAS = false - } else { - x.CAS = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(10) - } else { - r.WriteMapStart(10) - } - 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.EncodeUint(uint64(x.MinQuorum)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQuorum\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQuorum`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQuorum)) - } - } - 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 "MinQuorum": - if r.TryDecodeAsNil() { - x.MinQuorum = 0 - } else { - x.MinQuorum = (uint)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize100)) - } - 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 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.CleanupDeadServers = false - } else { - x.CleanupDeadServers = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerStabilizationTime = 0 - } else { - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.ServerStabilizationTime)); yyxt19 != nil { - z.DecExtension(x.ServerStabilizationTime, yyxt19) - } else { - x.ServerStabilizationTime = (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.LastContactThreshold = 0 - } else { - if false { - } else if yyxt21 := z.Extension(z.I2Rtid(x.LastContactThreshold)); yyxt21 != nil { - z.DecExtension(x.LastContactThreshold, yyxt21) - } else { - x.LastContactThreshold = (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.MaxTrailingLogs = 0 - } else { - x.MaxTrailingLogs = (uint64)(r.DecodeUint64()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MinQuorum = 0 - } else { - x.MinQuorum = (uint)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize100)) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnableRedundancyZones = false - } else { - x.EnableRedundancyZones = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisableUpgradeMigration = false - } else { - x.DisableUpgradeMigration = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnableCustomUpgrades = false - } else { - x.EnableCustomUpgrades = (bool)(r.DecodeBool()) - } - 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 SchedulerAlgorithm) 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 *SchedulerAlgorithm) 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 = (SchedulerAlgorithm)(r.DecodeString()) - } -} - -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(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.SchedulerAlgorithm.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulerAlgorithm\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulerAlgorithm`) - } - r.WriteMapElemValue() - x.SchedulerAlgorithm.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy7 := &x.PreemptionConfig - yy7.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptionConfig\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptionConfig`) - } - r.WriteMapElemValue() - yy9 := &x.PreemptionConfig - yy9.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.MemoryOversubscriptionEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryOversubscriptionEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryOversubscriptionEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.MemoryOversubscriptionEnabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.RejectJobRegistration)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RejectJobRegistration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RejectJobRegistration`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.RejectJobRegistration)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PauseEvalBroker)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PauseEvalBroker\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PauseEvalBroker`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PauseEvalBroker)) - } - } - 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 "SchedulerAlgorithm": - if r.TryDecodeAsNil() { - x.SchedulerAlgorithm = "" - } else { - x.SchedulerAlgorithm.CodecDecodeSelf(d) - } - case "PreemptionConfig": - if r.TryDecodeAsNil() { - x.PreemptionConfig = PreemptionConfig{} - } else { - x.PreemptionConfig.CodecDecodeSelf(d) - } - case "MemoryOversubscriptionEnabled": - if r.TryDecodeAsNil() { - x.MemoryOversubscriptionEnabled = false - } else { - x.MemoryOversubscriptionEnabled = (bool)(r.DecodeBool()) - } - case "RejectJobRegistration": - if r.TryDecodeAsNil() { - x.RejectJobRegistration = false - } else { - x.RejectJobRegistration = (bool)(r.DecodeBool()) - } - case "PauseEvalBroker": - if r.TryDecodeAsNil() { - x.PauseEvalBroker = false - } else { - x.PauseEvalBroker = (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 *SchedulerConfiguration) 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.SchedulerAlgorithm = "" - } else { - x.SchedulerAlgorithm.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptionConfig = PreemptionConfig{} - } else { - x.PreemptionConfig.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryOversubscriptionEnabled = false - } else { - x.MemoryOversubscriptionEnabled = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RejectJobRegistration = false - } else { - x.RejectJobRegistration = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PauseEvalBroker = false - } else { - x.PauseEvalBroker = (bool)(r.DecodeBool()) - } - 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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.SchedulerConfig != nil { - x.SchedulerConfig = nil - } - } else { - if x.SchedulerConfig == nil { - x.SchedulerConfig = new(SchedulerConfiguration) - } - - x.SchedulerConfig.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(4) - } else { - r.WriteMapStart(4) - } - 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.SysBatchSchedulerEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SysBatchSchedulerEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SysBatchSchedulerEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SysBatchSchedulerEnabled)) - } - } - 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 "SysBatchSchedulerEnabled": - if r.TryDecodeAsNil() { - x.SysBatchSchedulerEnabled = false - } else { - x.SysBatchSchedulerEnabled = (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 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.SystemSchedulerEnabled = false - } else { - x.SystemSchedulerEnabled = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SysBatchSchedulerEnabled = false - } else { - x.SysBatchSchedulerEnabled = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BatchSchedulerEnabled = false - } else { - x.BatchSchedulerEnabled = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServiceSchedulerEnabled = false - } else { - x.ServiceSchedulerEnabled = (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 *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(7) - } else { - r.WriteMapStart(7) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Config = SchedulerConfiguration{} - } 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *SnapshotSaveRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *SnapshotSaveRequest) 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 *SnapshotSaveRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *SnapshotSaveRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *SnapshotSaveResponse) 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 = [7]bool{ // should field at this index be written? - true, // SnapshotChecksum - x.ErrorCode != 0, // ErrorCode - x.ErrorMsg != "", // ErrorMsg - true, // Index - true, // LastContact - true, // KnownLeader - true, // NextToken - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } 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.SnapshotChecksum))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SnapshotChecksum)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SnapshotChecksum\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SnapshotChecksum`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SnapshotChecksum))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SnapshotChecksum)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[1] { - if false { - } else { - r.EncodeInt(int64(x.ErrorCode)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[1] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ErrorCode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ErrorCode`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ErrorCode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[2] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ErrorMsg))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ErrorMsg)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[2] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ErrorMsg\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ErrorMsg`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ErrorMsg))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ErrorMsg)) - } - } - } - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SnapshotSaveResponse) 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 *SnapshotSaveResponse) 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 "SnapshotChecksum": - if r.TryDecodeAsNil() { - x.SnapshotChecksum = "" - } else { - x.SnapshotChecksum = (string)(r.DecodeString()) - } - case "ErrorCode": - if r.TryDecodeAsNil() { - x.ErrorCode = 0 - } else { - x.ErrorCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ErrorMsg": - if r.TryDecodeAsNil() { - x.ErrorMsg = "" - } else { - x.ErrorMsg = (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 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SnapshotSaveResponse) 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.SnapshotChecksum = "" - } else { - x.SnapshotChecksum = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ErrorCode = 0 - } else { - x.ErrorCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ErrorMsg = "" - } else { - x.ErrorMsg = (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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *SnapshotRestoreRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *SnapshotRestoreRequest) 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 *SnapshotRestoreRequest) 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.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *SnapshotRestoreRequest) 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *SnapshotRestoreResponse) 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 = [6]bool{ // should field at this index be written? - x.ErrorCode != 0, // ErrorCode - x.ErrorMsg != "", // ErrorMsg - true, // Index - true, // LastContact - true, // KnownLeader - true, // NextToken - } - _ = 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 yyq2[0] { - if false { - } else { - r.EncodeInt(int64(x.ErrorCode)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[0] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ErrorCode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ErrorCode`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ErrorCode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[1] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ErrorMsg))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ErrorMsg)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[1] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ErrorMsg\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ErrorMsg`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ErrorMsg))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ErrorMsg)) - } - } - } - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SnapshotRestoreResponse) 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 *SnapshotRestoreResponse) 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 "ErrorCode": - if r.TryDecodeAsNil() { - x.ErrorCode = 0 - } else { - x.ErrorCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ErrorMsg": - if r.TryDecodeAsNil() { - x.ErrorMsg = "" - } else { - x.ErrorMsg = (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 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SnapshotRestoreResponse) 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.ErrorCode = 0 - } else { - x.ErrorCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ErrorMsg = "" - } else { - x.ErrorMsg = (string)(r.DecodeString()) - } - 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *UpgradeCheckVaultWorkloadIdentityRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *UpgradeCheckVaultWorkloadIdentityRequest) 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 *UpgradeCheckVaultWorkloadIdentityRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *UpgradeCheckVaultWorkloadIdentityRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *UpgradeCheckVaultWorkloadIdentityResponse) 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.JobsWithoutVaultIdentity == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobListStub(([]*JobListStub)(x.JobsWithoutVaultIdentity), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobsWithoutVaultIdentity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobsWithoutVaultIdentity`) - } - r.WriteMapElemValue() - if x.JobsWithoutVaultIdentity == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobListStub(([]*JobListStub)(x.JobsWithoutVaultIdentity), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.OutdatedNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeListStub(([]*NodeListStub)(x.OutdatedNodes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OutdatedNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OutdatedNodes`) - } - r.WriteMapElemValue() - if x.OutdatedNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeListStub(([]*NodeListStub)(x.OutdatedNodes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.VaultTokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVaultAccessor(([]*VaultAccessor)(x.VaultTokens), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultTokens\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultTokens`) - } - r.WriteMapElemValue() - if x.VaultTokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVaultAccessor(([]*VaultAccessor)(x.VaultTokens), 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 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *UpgradeCheckVaultWorkloadIdentityResponse) 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 *UpgradeCheckVaultWorkloadIdentityResponse) 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 "JobsWithoutVaultIdentity": - if r.TryDecodeAsNil() { - x.JobsWithoutVaultIdentity = nil - } else { - if false { - } else { - h.decSlicePtrtoJobListStub((*[]*JobListStub)(&x.JobsWithoutVaultIdentity), d) - } - } - case "OutdatedNodes": - if r.TryDecodeAsNil() { - x.OutdatedNodes = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeListStub((*[]*NodeListStub)(&x.OutdatedNodes), d) - } - } - case "VaultTokens": - if r.TryDecodeAsNil() { - x.VaultTokens = nil - } else { - if false { - } else { - h.decSlicePtrtoVaultAccessor((*[]*VaultAccessor)(&x.VaultTokens), 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 yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *UpgradeCheckVaultWorkloadIdentityResponse) 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.JobsWithoutVaultIdentity = nil - } else { - if false { - } else { - h.decSlicePtrtoJobListStub((*[]*JobListStub)(&x.JobsWithoutVaultIdentity), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OutdatedNodes = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeListStub((*[]*NodeListStub)(&x.OutdatedNodes), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultTokens = nil - } else { - if false { - } else { - h.decSlicePtrtoVaultAccessor((*[]*VaultAccessor)(&x.VaultTokens), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt24 := z.Extension(z.I2Rtid(x.LastContact)); yyxt24 != nil { - z.DecExtension(x.LastContact, yyxt24) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -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 *SearchConfig) 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.FuzzyEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FuzzyEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FuzzyEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.FuzzyEnabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.LimitQuery)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LimitQuery\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LimitQuery`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.LimitQuery)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.LimitResults)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LimitResults\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LimitResults`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.LimitResults)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MinTermLength)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinTermLength\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinTermLength`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MinTermLength)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SearchConfig) 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 *SearchConfig) 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 "FuzzyEnabled": - if r.TryDecodeAsNil() { - x.FuzzyEnabled = false - } else { - x.FuzzyEnabled = (bool)(r.DecodeBool()) - } - case "LimitQuery": - if r.TryDecodeAsNil() { - x.LimitQuery = 0 - } else { - x.LimitQuery = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "LimitResults": - if r.TryDecodeAsNil() { - x.LimitResults = 0 - } else { - x.LimitResults = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "MinTermLength": - if r.TryDecodeAsNil() { - x.MinTermLength = 0 - } else { - x.MinTermLength = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SearchConfig) 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.FuzzyEnabled = false - } else { - x.FuzzyEnabled = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LimitQuery = 0 - } else { - x.LimitQuery = (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.LimitResults = 0 - } else { - x.LimitResults = (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.MinTermLength = 0 - } else { - x.MinTermLength = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-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(6) - } else { - r.WriteMapStart(6) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Matches = nil - } else { - if false { - } else { - h.decMapContextSlicestring((*map[Context][]string)(&x.Matches), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Truncations = nil - } else { - if false { - } else { - h.decMapContextbool((*map[Context]bool)(&x.Truncations), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.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.Context = "" - } else { - x.Context.CodecDecodeSelf(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 yyxt25 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt25 != nil { - z.DecExtension(x.MaxQueryTime, yyxt25) - } 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.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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *FuzzyMatch) 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 x.Scope == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Scope), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Scope\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Scope`) - } - r.WriteMapElemValue() - if x.Scope == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Scope), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FuzzyMatch) 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 *FuzzyMatch) 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 "Scope": - if r.TryDecodeAsNil() { - x.Scope = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Scope), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FuzzyMatch) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Scope = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Scope), 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 *FuzzySearchResponse) 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.Matches == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapContextSliceFuzzyMatch((map[Context][]FuzzyMatch)(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.encMapContextSliceFuzzyMatch((map[Context][]FuzzyMatch)(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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FuzzySearchResponse) 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 *FuzzySearchResponse) 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.decMapContextSliceFuzzyMatch((*map[Context][]FuzzyMatch)(&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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FuzzySearchResponse) 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.Matches = nil - } else { - if false { - } else { - h.decMapContextSliceFuzzyMatch((*map[Context][]FuzzyMatch)(&x.Matches), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Truncations = nil - } else { - if false { - } else { - h.decMapContextbool((*map[Context]bool)(&x.Truncations), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *FuzzySearchRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Text))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Text)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Text\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Text`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Text))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Text)) - } - } - } - 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *FuzzySearchRequest) 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 *FuzzySearchRequest) 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 "Text": - if r.TryDecodeAsNil() { - x.Text = "" - } else { - x.Text = (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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *FuzzySearchRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Text = "" - } else { - x.Text = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Context = "" - } else { - x.Context.CodecDecodeSelf(d) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *SIToken) 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.ConsulNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulNamespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConsulNamespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConsulNamespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulNamespace)) - } - } - } - 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.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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SIToken) 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 *SIToken) 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 "ConsulNamespace": - if r.TryDecodeAsNil() { - x.ConsulNamespace = "" - } else { - x.ConsulNamespace = (string)(r.DecodeString()) - } - case "TaskName": - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - 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()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SIToken) 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.ConsulNamespace = "" - } else { - x.ConsulNamespace = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (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 *SITokenAccessor) 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.ConsulNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulNamespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConsulNamespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConsulNamespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulNamespace)) - } - } - } - 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.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.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.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 { - 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 *SITokenAccessor) 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 *SITokenAccessor) 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 "ConsulNamespace": - if r.TryDecodeAsNil() { - x.ConsulNamespace = "" - } else { - x.ConsulNamespace = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "AccessorID": - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - case "TaskName": - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - 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 *SITokenAccessor) 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.ConsulNamespace = "" - } else { - x.ConsulNamespace = (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.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.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - 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 *SITokenAccessorsRequest) 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.encSlicePtrtoSITokenAccessor(([]*SITokenAccessor)(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.encSlicePtrtoSITokenAccessor(([]*SITokenAccessor)(x.Accessors), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SITokenAccessorsRequest) 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 *SITokenAccessorsRequest) 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.decSlicePtrtoSITokenAccessor((*[]*SITokenAccessor)(&x.Accessors), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SITokenAccessorsRequest) 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.decSlicePtrtoSITokenAccessor((*[]*SITokenAccessor)(&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 *DeriveSITokenRequest) 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.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 { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *DeriveSITokenRequest) 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 *DeriveSITokenRequest) 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 { - h.decSlicestring((*[]string)(&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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *DeriveSITokenRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj22 int - var yyb22 bool - var yyhl22 bool = l >= 0 - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tasks), d) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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()) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj22-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeriveSITokenResponse) 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.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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.encMapstringstring((map[string]string)(x.Tokens), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeriveSITokenResponse) 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 *DeriveSITokenResponse) 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.decMapstringstring((*map[string]string)(&x.Tokens), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeriveSITokenResponse) 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.Tokens = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Tokens), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - 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) - } - 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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ServiceRegistration) 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.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServiceName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServiceName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } - 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.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.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.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.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Tags), e) - } - } - } - 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 { - r.EncodeInt(int64(x.Port)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Port\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Port`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } - 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 *ServiceRegistration) 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 *ServiceRegistration) 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 "ServiceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = (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 "Datacenter": - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Tags": - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tags), d) - } - } - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - case "Port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 *ServiceRegistration) 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.ServiceName = "" - } else { - x.ServiceName = (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.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (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.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - 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 { - h.decSlicestring((*[]string)(&x.Tags), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - 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 = (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.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 *ServiceRegistrationUpsertRequest) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(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.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(x.Services), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ServiceRegistrationUpsertRequest) 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 *ServiceRegistrationUpsertRequest) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ServiceRegistrationUpsertRequest) 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.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ServiceRegistrationUpsertResponse) 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 *ServiceRegistrationUpsertResponse) 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 *ServiceRegistrationUpsertResponse) 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 *ServiceRegistrationUpsertResponse) 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 *ServiceRegistrationDeleteByIDRequest) 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.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ServiceRegistrationDeleteByIDRequest) 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 *ServiceRegistrationDeleteByIDRequest) 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 "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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ServiceRegistrationDeleteByIDRequest) 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ServiceRegistrationDeleteByIDResponse) 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 *ServiceRegistrationDeleteByIDResponse) 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 *ServiceRegistrationDeleteByIDResponse) 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 *ServiceRegistrationDeleteByIDResponse) 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 *ServiceRegistrationDeleteByNodeIDRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *ServiceRegistrationDeleteByNodeIDRequest) 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 *ServiceRegistrationDeleteByNodeIDRequest) 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ServiceRegistrationDeleteByNodeIDRequest) 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.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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ServiceRegistrationDeleteByNodeIDResponse) 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 *ServiceRegistrationDeleteByNodeIDResponse) 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 *ServiceRegistrationDeleteByNodeIDResponse) 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 *ServiceRegistrationDeleteByNodeIDResponse) 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 *ServiceRegistrationListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ServiceRegistrationListRequest) 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 *ServiceRegistrationListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ServiceRegistrationListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *ServiceRegistrationListResponse) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceRegistrationListStub(([]*ServiceRegistrationListStub)(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.encSlicePtrtoServiceRegistrationListStub(([]*ServiceRegistrationListStub)(x.Services), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceRegistrationListResponse) 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 *ServiceRegistrationListResponse) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistrationListStub((*[]*ServiceRegistrationListStub)(&x.Services), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceRegistrationListResponse) 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.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistrationListStub((*[]*ServiceRegistrationListStub)(&x.Services), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ServiceRegistrationListStub) 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.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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceRegistrationStub(([]*ServiceRegistrationStub)(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.encSlicePtrtoServiceRegistrationStub(([]*ServiceRegistrationStub)(x.Services), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceRegistrationListStub) 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 *ServiceRegistrationListStub) 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 "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistrationStub((*[]*ServiceRegistrationStub)(&x.Services), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceRegistrationListStub) 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.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistrationStub((*[]*ServiceRegistrationStub)(&x.Services), 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 *ServiceRegistrationStub) 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.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServiceName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServiceName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Tags), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceRegistrationStub) 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 *ServiceRegistrationStub) 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 "ServiceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = (string)(r.DecodeString()) - } - case "Tags": - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tags), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceRegistrationStub) 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.ServiceName = "" - } else { - x.ServiceName = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tags), 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 *ServiceRegistrationByNameRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServiceName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServiceName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Choose))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Choose)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Choose\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Choose`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Choose))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Choose)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ServiceRegistrationByNameRequest) 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 *ServiceRegistrationByNameRequest) 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 "ServiceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = (string)(r.DecodeString()) - } - case "Choose": - if r.TryDecodeAsNil() { - x.Choose = "" - } else { - x.Choose = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ServiceRegistrationByNameRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Choose = "" - } else { - x.Choose = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *ServiceRegistrationByNameResponse) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(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.encSlicePtrtoServiceRegistration(([]*ServiceRegistration)(x.Services), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceRegistrationByNameResponse) 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 *ServiceRegistrationByNameResponse) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceRegistrationByNameResponse) 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.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceRegistration((*[]*ServiceRegistration)(&x.Services), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(26) - } else { - r.WriteMapStart(26) - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - r.EncodeBool(bool(x.Expose)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Expose\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Expose`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Expose)) - } - } - 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 yyxt31 := z.Extension(z.I2Rtid(x.Interval)); yyxt31 != nil { - z.EncExtension(x.Interval, yyxt31) - } 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 yyxt32 := z.Extension(z.I2Rtid(x.Interval)); yyxt32 != nil { - z.EncExtension(x.Interval, yyxt32) - } else { - r.EncodeInt(int64(x.Interval)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(x.Timeout)); yyxt34 != nil { - z.EncExtension(x.Timeout, yyxt34) - } 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 yyxt35 := z.Extension(z.I2Rtid(x.Timeout)); yyxt35 != nil { - z.EncExtension(x.Timeout, yyxt35) - } 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Notes))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Notes)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Notes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Notes`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Notes))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Notes)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSServerName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSServerName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLSServerName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLSServerName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSServerName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSServerName)) - } - } - } - 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 yyn54 bool - if x.CheckRestart == nil { - yyn54 = true - goto LABEL54 - } - LABEL54: - if yyr2 || yy2arr2 { - if yyn54 { - 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 yyn54 { - 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.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.SuccessBeforePassing)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SuccessBeforePassing\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SuccessBeforePassing`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.SuccessBeforePassing)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.FailuresBeforeCritical)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailuresBeforeCritical\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailuresBeforeCritical`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.FailuresBeforeCritical)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.FailuresBeforeWarning)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailuresBeforeWarning\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailuresBeforeWarning`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.FailuresBeforeWarning)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Body))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Body)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Body\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Body`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Body))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Body)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OnUpdate))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OnUpdate)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OnUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OnUpdate`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OnUpdate))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OnUpdate)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "Expose": - if r.TryDecodeAsNil() { - x.Expose = false - } else { - x.Expose = (bool)(r.DecodeBool()) - } - 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 yyxt15 := z.Extension(z.I2Rtid(x.Interval)); yyxt15 != nil { - z.DecExtension(x.Interval, yyxt15) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - case "Timeout": - 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()) - } - } - case "InitialStatus": - if r.TryDecodeAsNil() { - x.InitialStatus = "" - } else { - x.InitialStatus = (string)(r.DecodeString()) - } - case "Notes": - if r.TryDecodeAsNil() { - x.Notes = "" - } else { - x.Notes = (string)(r.DecodeString()) - } - case "TLSServerName": - if r.TryDecodeAsNil() { - x.TLSServerName = "" - } else { - x.TLSServerName = (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()) - } - case "SuccessBeforePassing": - if r.TryDecodeAsNil() { - x.SuccessBeforePassing = 0 - } else { - x.SuccessBeforePassing = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "FailuresBeforeCritical": - if r.TryDecodeAsNil() { - x.FailuresBeforeCritical = 0 - } else { - x.FailuresBeforeCritical = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "FailuresBeforeWarning": - if r.TryDecodeAsNil() { - x.FailuresBeforeWarning = 0 - } else { - x.FailuresBeforeWarning = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Body": - if r.TryDecodeAsNil() { - x.Body = "" - } else { - x.Body = (string)(r.DecodeString()) - } - case "OnUpdate": - if r.TryDecodeAsNil() { - x.OnUpdate = "" - } else { - x.OnUpdate = (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 yyj34 int - var yyb34 bool - var yyhl34 bool = l >= 0 - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Protocol = "" - } else { - x.Protocol = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PortLabel = "" - } else { - x.PortLabel = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Expose = false - } else { - x.Expose = (bool)(r.DecodeBool()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AddressMode = "" - } else { - x.AddressMode = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt46 := z.Extension(z.I2Rtid(x.Interval)); yyxt46 != nil { - z.DecExtension(x.Interval, yyxt46) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt48 := z.Extension(z.I2Rtid(x.Timeout)); yyxt48 != nil { - z.DecExtension(x.Timeout, yyxt48) - } else { - x.Timeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.InitialStatus = "" - } else { - x.InitialStatus = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Notes = "" - } else { - x.Notes = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSServerName = "" - } else { - x.TLSServerName = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSSkipVerify = false - } else { - x.TLSSkipVerify = (bool)(r.DecodeBool()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Method = "" - } else { - x.Method = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Header = nil - } else { - if false { - } else { - h.decMapstringSlicestring((*map[string][]string)(&x.Header), d) - } - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - 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) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GRPCService = "" - } else { - x.GRPCService = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GRPCUseTLS = false - } else { - x.GRPCUseTLS = (bool)(r.DecodeBool()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SuccessBeforePassing = 0 - } else { - x.SuccessBeforePassing = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailuresBeforeCritical = 0 - } else { - x.FailuresBeforeCritical = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailuresBeforeWarning = 0 - } else { - x.FailuresBeforeWarning = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Body = "" - } else { - x.Body = (string)(r.DecodeString()) - } - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OnUpdate = "" - } else { - x.OnUpdate = (string)(r.DecodeString()) - } - for { - yyj34++ - if yyhl34 { - yyb34 = yyj34 > l - } else { - yyb34 = r.CheckBreak() - } - if yyb34 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj34-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(19) - } else { - r.WriteMapStart(19) - } - 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.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.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 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 { - r.EncodeBool(bool(x.EnableTagOverride)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnableTagOverride\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnableTagOverride`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EnableTagOverride)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Tags), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.CanaryTags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 yyn30 bool - if x.Connect == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - 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 yyn30 { - 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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.CanaryMeta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.CanaryMeta), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CanaryMeta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CanaryMeta`) - } - r.WriteMapElemValue() - if x.CanaryMeta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.CanaryMeta), e) - } - } - } - var yyn39 bool - if x.Weights == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Weights == nil { - r.EncodeNil() - } else { - x.Weights.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Weights\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Weights`) - } - r.WriteMapElemValue() - if yyn39 { - r.EncodeNil() - } else { - if x.Weights == nil { - r.EncodeNil() - } else { - x.Weights.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaggedAddresses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.TaggedAddresses), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaggedAddresses\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaggedAddresses`) - } - r.WriteMapElemValue() - if x.TaggedAddresses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.TaggedAddresses), e) - } - } - } - 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.OnUpdate))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OnUpdate)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OnUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OnUpdate`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OnUpdate))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OnUpdate)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Provider\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Provider`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Provider))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Provider)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cluster\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cluster`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } - var yyn57 bool - if x.Identity == nil { - yyn57 = true - goto LABEL57 - } - LABEL57: - if yyr2 || yy2arr2 { - if yyn57 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Identity == nil { - r.EncodeNil() - } else { - x.Identity.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Identity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Identity`) - } - r.WriteMapElemValue() - if yyn57 { - r.EncodeNil() - } else { - if x.Identity == nil { - r.EncodeNil() - } else { - x.Identity.CodecEncodeSelf(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 "TaskName": - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (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 "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - case "EnableTagOverride": - if r.TryDecodeAsNil() { - x.EnableTagOverride = false - } else { - x.EnableTagOverride = (bool)(r.DecodeBool()) - } - case "Tags": - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tags), d) - } - } - case "CanaryTags": - if r.TryDecodeAsNil() { - x.CanaryTags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&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 { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "CanaryMeta": - if r.TryDecodeAsNil() { - x.CanaryMeta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.CanaryMeta), d) - } - } - case "Weights": - if r.TryDecodeAsNil() { - if true && x.Weights != nil { - x.Weights = nil - } - } else { - if x.Weights == nil { - x.Weights = new(ServiceWeights) - } - - x.Weights.CodecDecodeSelf(d) - } - case "TaggedAddresses": - if r.TryDecodeAsNil() { - x.TaggedAddresses = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.TaggedAddresses), d) - } - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "OnUpdate": - if r.TryDecodeAsNil() { - x.OnUpdate = "" - } else { - x.OnUpdate = (string)(r.DecodeString()) - } - case "Provider": - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - case "Cluster": - if r.TryDecodeAsNil() { - x.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - case "Identity": - if r.TryDecodeAsNil() { - if true && x.Identity != nil { - x.Identity = nil - } - } else { - if x.Identity == nil { - x.Identity = new(WorkloadIdentity) - } - - x.Identity.CodecDecodeSelf(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 yyj29 int - var yyb29 bool - var yyhl29 bool = l >= 0 - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PortLabel = "" - } else { - x.PortLabel = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AddressMode = "" - } else { - x.AddressMode = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnableTagOverride = false - } else { - x.EnableTagOverride = (bool)(r.DecodeBool()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tags), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CanaryTags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.CanaryTags), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Checks = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceCheck((*[]*ServiceCheck)(&x.Checks), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - 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) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CanaryMeta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.CanaryMeta), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Weights != nil { - x.Weights = nil - } - } else { - if x.Weights == nil { - x.Weights = new(ServiceWeights) - } - - x.Weights.CodecDecodeSelf(d) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaggedAddresses = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.TaggedAddresses), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OnUpdate = "" - } else { - x.OnUpdate = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Provider = "" - } else { - x.Provider = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Identity != nil { - x.Identity = nil - } - } else { - if x.Identity == nil { - x.Identity = new(WorkloadIdentity) - } - - x.Identity.CodecDecodeSelf(d) - } - for { - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj29-1, "") - } - r.ReadArrayEnd() -} - -func (x *ServiceWeights) 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.Passing)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Passing\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Passing`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Passing)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Warning)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Warning\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Warning`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Warning)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceWeights) 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 *ServiceWeights) 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 "Passing": - if r.TryDecodeAsNil() { - x.Passing = 0 - } else { - x.Passing = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Warning": - if r.TryDecodeAsNil() { - x.Warning = 0 - } else { - x.Warning = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceWeights) 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.Passing = 0 - } else { - x.Passing = (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.Warning = 0 - } else { - x.Warning = (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 *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(4) - } else { - r.WriteMapStart(4) - } - 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) - } - } - } - var yyn12 bool - if x.Gateway == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Gateway == nil { - r.EncodeNil() - } else { - x.Gateway.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Gateway\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Gateway`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Gateway == nil { - r.EncodeNil() - } else { - x.Gateway.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) - } - case "Gateway": - if r.TryDecodeAsNil() { - if true && x.Gateway != nil { - x.Gateway = nil - } - } else { - if x.Gateway == nil { - x.Gateway = new(ConsulGateway) - } - - x.Gateway.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 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.Native = false - } else { - x.Native = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - 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) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - 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) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Gateway != nil { - x.Gateway = nil - } - } else { - if x.Gateway == nil { - x.Gateway = new(ConsulGateway) - } - - x.Gateway.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 *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(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.DisableDefaultTCPCheck)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisableDefaultTCPCheck\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisableDefaultTCPCheck`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.DisableDefaultTCPCheck)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), 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 { - h.decSlicestring((*[]string)(&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) - } - case "DisableDefaultTCPCheck": - if r.TryDecodeAsNil() { - x.DisableDefaultTCPCheck = false - } else { - x.DisableDefaultTCPCheck = (bool)(r.DecodeBool()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), 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 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.Tags = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tags), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Port = "" - } else { - x.Port = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - 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) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisableDefaultTCPCheck = false - } else { - x.DisableDefaultTCPCheck = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), 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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(x.Config), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Env == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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.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.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 { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - case "Env": - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringstring((*map[string]string)(&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()) - } - case "VolumeMounts": - if r.TryDecodeAsNil() { - x.VolumeMounts = nil - } else { - if false { - } else { - h.decSlicePtrtoVolumeMount((*[]*VolumeMount)(&x.VolumeMounts), d) - } - } - 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 yyj22 int - var yyb22 bool - var yyhl22 bool = l >= 0 - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Env), d) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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 yyxt34 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt34 != nil { - z.DecExtension(x.KillTimeout, yyxt34) - } else { - *x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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 yyxt37 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt37 != nil { - z.DecExtension(x.ShutdownDelay, yyxt37) - } else { - *x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillSignal = "" - } else { - x.KillSignal = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VolumeMounts = nil - } else { - if false { - } else { - h.decSlicePtrtoVolumeMount((*[]*VolumeMount)(&x.VolumeMounts), d) - } - } - for { - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj22-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(6) - } else { - r.WriteMapStart(6) - } - 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) - } - } - } - var yyn12 bool - if x.Expose == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Expose == nil { - r.EncodeNil() - } else { - x.Expose.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Expose\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Expose`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Expose == nil { - r.EncodeNil() - } else { - x.Expose.CodecEncodeSelf(e) - } - } - } - var yyn15 bool - if x.TransparentProxy == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.TransparentProxy == nil { - r.EncodeNil() - } else { - x.TransparentProxy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TransparentProxy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TransparentProxy`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.TransparentProxy == nil { - r.EncodeNil() - } else { - x.TransparentProxy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(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 "Expose": - if r.TryDecodeAsNil() { - if true && x.Expose != nil { - x.Expose = nil - } - } else { - if x.Expose == nil { - x.Expose = new(ConsulExposeConfig) - } - - x.Expose.CodecDecodeSelf(d) - } - case "TransparentProxy": - if r.TryDecodeAsNil() { - if true && x.TransparentProxy != nil { - x.TransparentProxy = nil - } - } else { - if x.TransparentProxy == nil { - x.TransparentProxy = new(ConsulTransparentProxy) - } - - x.TransparentProxy.CodecDecodeSelf(d) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&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 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.LocalServiceAddress = "" - } else { - x.LocalServiceAddress = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalServicePort = 0 - } else { - x.LocalServicePort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Upstreams = nil - } else { - if false { - } else { - h.decSliceConsulUpstream((*[]ConsulUpstream)(&x.Upstreams), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Expose != nil { - x.Expose = nil - } - } else { - if x.Expose == nil { - x.Expose = new(ConsulExposeConfig) - } - - x.Expose.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.TransparentProxy != nil { - x.TransparentProxy = nil - } - } else { - if x.TransparentProxy == nil { - x.TransparentProxy = new(ConsulTransparentProxy) - } - - x.TransparentProxy.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), 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 *ConsulMeshGateway) 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.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 *ConsulMeshGateway) 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 *ConsulMeshGateway) 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()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulMeshGateway) 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.Mode = "" - } else { - x.Mode = (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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationNamespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestinationNamespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestinationNamespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationNamespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationPartition))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationPartition)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestinationPartition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestinationPartition`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationPartition))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationPartition)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationPeer))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationPeer)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestinationPeer\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestinationPeer`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationPeer))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationPeer)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestinationType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestinationType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationType)) - } - } - } - 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.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.LocalBindAddress))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalBindAddress)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalBindAddress\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalBindAddress`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalBindAddress))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalBindAddress)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalBindSocketPath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalBindSocketPath)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalBindSocketPath\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalBindSocketPath`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalBindSocketPath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalBindSocketPath)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalBindSocketMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalBindSocketMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalBindSocketMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalBindSocketMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalBindSocketMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalBindSocketMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy34 := &x.MeshGateway - yy34.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MeshGateway\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MeshGateway`) - } - r.WriteMapElemValue() - yy36 := &x.MeshGateway - yy36.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(x.Config), e) - } - } - } - 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 "DestinationNamespace": - if r.TryDecodeAsNil() { - x.DestinationNamespace = "" - } else { - x.DestinationNamespace = (string)(r.DecodeString()) - } - case "DestinationPartition": - if r.TryDecodeAsNil() { - x.DestinationPartition = "" - } else { - x.DestinationPartition = (string)(r.DecodeString()) - } - case "DestinationPeer": - if r.TryDecodeAsNil() { - x.DestinationPeer = "" - } else { - x.DestinationPeer = (string)(r.DecodeString()) - } - case "DestinationType": - if r.TryDecodeAsNil() { - x.DestinationType = "" - } else { - x.DestinationType = (string)(r.DecodeString()) - } - case "LocalBindPort": - if r.TryDecodeAsNil() { - x.LocalBindPort = 0 - } else { - x.LocalBindPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Datacenter": - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - case "LocalBindAddress": - if r.TryDecodeAsNil() { - x.LocalBindAddress = "" - } else { - x.LocalBindAddress = (string)(r.DecodeString()) - } - case "LocalBindSocketPath": - if r.TryDecodeAsNil() { - x.LocalBindSocketPath = "" - } else { - x.LocalBindSocketPath = (string)(r.DecodeString()) - } - case "LocalBindSocketMode": - if r.TryDecodeAsNil() { - x.LocalBindSocketMode = "" - } else { - x.LocalBindSocketMode = (string)(r.DecodeString()) - } - case "MeshGateway": - if r.TryDecodeAsNil() { - x.MeshGateway = ConsulMeshGateway{} - } else { - x.MeshGateway.CodecDecodeSelf(d) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - 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 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.DestinationName = "" - } else { - x.DestinationName = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestinationNamespace = "" - } else { - x.DestinationNamespace = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestinationPartition = "" - } else { - x.DestinationPartition = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestinationPeer = "" - } else { - x.DestinationPeer = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestinationType = "" - } else { - x.DestinationType = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalBindPort = 0 - } else { - x.LocalBindPort = (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.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalBindAddress = "" - } else { - x.LocalBindAddress = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalBindSocketPath = "" - } else { - x.LocalBindSocketPath = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalBindSocketMode = "" - } else { - x.LocalBindSocketMode = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MeshGateway = ConsulMeshGateway{} - } else { - x.MeshGateway.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *ConsulExposeConfig) 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.Paths == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceConsulExposePath(([]ConsulExposePath)(x.Paths), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Paths\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Paths`) - } - r.WriteMapElemValue() - if x.Paths == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceConsulExposePath(([]ConsulExposePath)(x.Paths), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulExposeConfig) 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 *ConsulExposeConfig) 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 "Paths": - if r.TryDecodeAsNil() { - x.Paths = nil - } else { - if false { - } else { - h.decSliceConsulExposePath((*[]ConsulExposePath)(&x.Paths), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulExposeConfig) 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.Paths = nil - } else { - if false { - } else { - h.decSliceConsulExposePath((*[]ConsulExposePath)(&x.Paths), 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 *ConsulExposePath) 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.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 { - r.EncodeInt(int64(x.LocalPathPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalPathPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalPathPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.LocalPathPort)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ListenerPort))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ListenerPort)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ListenerPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ListenerPort`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ListenerPort))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ListenerPort)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulExposePath) 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 *ConsulExposePath) 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 "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 "LocalPathPort": - if r.TryDecodeAsNil() { - x.LocalPathPort = 0 - } else { - x.LocalPathPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ListenerPort": - if r.TryDecodeAsNil() { - x.ListenerPort = "" - } else { - x.ListenerPort = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulExposePath) 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.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Protocol = "" - } else { - x.Protocol = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalPathPort = 0 - } else { - x.LocalPathPort = (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.ListenerPort = "" - } else { - x.ListenerPort = (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 *ConsulGateway) 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.Proxy == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - 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 yyn3 { - r.EncodeNil() - } else { - if x.Proxy == nil { - r.EncodeNil() - } else { - x.Proxy.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.Ingress == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Ingress == nil { - r.EncodeNil() - } else { - x.Ingress.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Ingress\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Ingress`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Ingress == nil { - r.EncodeNil() - } else { - x.Ingress.CodecEncodeSelf(e) - } - } - } - var yyn9 bool - if x.Terminating == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Terminating == nil { - r.EncodeNil() - } else { - x.Terminating.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Terminating\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Terminating`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Terminating == nil { - r.EncodeNil() - } else { - x.Terminating.CodecEncodeSelf(e) - } - } - } - var yyn12 bool - if x.Mesh == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Mesh == nil { - r.EncodeNil() - } else { - x.Mesh.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Mesh\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Mesh`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Mesh == nil { - r.EncodeNil() - } else { - x.Mesh.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulGateway) 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 *ConsulGateway) 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 "Proxy": - if r.TryDecodeAsNil() { - if true && x.Proxy != nil { - x.Proxy = nil - } - } else { - if x.Proxy == nil { - x.Proxy = new(ConsulGatewayProxy) - } - - x.Proxy.CodecDecodeSelf(d) - } - case "Ingress": - if r.TryDecodeAsNil() { - if true && x.Ingress != nil { - x.Ingress = nil - } - } else { - if x.Ingress == nil { - x.Ingress = new(ConsulIngressConfigEntry) - } - - x.Ingress.CodecDecodeSelf(d) - } - case "Terminating": - if r.TryDecodeAsNil() { - if true && x.Terminating != nil { - x.Terminating = nil - } - } else { - if x.Terminating == nil { - x.Terminating = new(ConsulTerminatingConfigEntry) - } - - x.Terminating.CodecDecodeSelf(d) - } - case "Mesh": - if r.TryDecodeAsNil() { - if true && x.Mesh != nil { - x.Mesh = nil - } - } else { - if x.Mesh == nil { - x.Mesh = new(ConsulMeshConfigEntry) - } - - x.Mesh.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulGateway) 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() { - if true && x.Proxy != nil { - x.Proxy = nil - } - } else { - if x.Proxy == nil { - x.Proxy = new(ConsulGatewayProxy) - } - - x.Proxy.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.Ingress != nil { - x.Ingress = nil - } - } else { - if x.Ingress == nil { - x.Ingress = new(ConsulIngressConfigEntry) - } - - x.Ingress.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.Terminating != nil { - x.Terminating = nil - } - } else { - if x.Terminating == nil { - x.Terminating = new(ConsulTerminatingConfigEntry) - } - - x.Terminating.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.Mesh != nil { - x.Mesh = nil - } - } else { - if x.Mesh == nil { - x.Mesh = new(ConsulMeshConfigEntry) - } - - x.Mesh.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 *ConsulGatewayBindAddress) 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.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 { - r.EncodeInt(int64(x.Port)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Port\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Port`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulGatewayBindAddress) 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 *ConsulGatewayBindAddress) 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 "Port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulGatewayBindAddress) 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.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = (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 *ConsulGatewayProxy) 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.ConnectTimeout == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ConnectTimeout == nil { - r.EncodeNil() - } else { - yy4 := *x.ConnectTimeout - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(yy4)); yyxt5 != nil { - z.EncExtension(yy4, yyxt5) - } else { - r.EncodeInt(int64(yy4)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConnectTimeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConnectTimeout`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ConnectTimeout == nil { - r.EncodeNil() - } else { - yy6 := *x.ConnectTimeout - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(yy6)); yyxt7 != nil { - z.EncExtension(yy6, yyxt7) - } else { - r.EncodeInt(int64(yy6)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.EnvoyGatewayBindTaggedAddresses)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnvoyGatewayBindTaggedAddresses\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnvoyGatewayBindTaggedAddresses`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EnvoyGatewayBindTaggedAddresses)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.EnvoyGatewayBindAddresses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoConsulGatewayBindAddress((map[string]*ConsulGatewayBindAddress)(x.EnvoyGatewayBindAddresses), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnvoyGatewayBindAddresses\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnvoyGatewayBindAddresses`) - } - r.WriteMapElemValue() - if x.EnvoyGatewayBindAddresses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoConsulGatewayBindAddress((map[string]*ConsulGatewayBindAddress)(x.EnvoyGatewayBindAddresses), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.EnvoyGatewayNoDefaultBind)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnvoyGatewayNoDefaultBind\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnvoyGatewayNoDefaultBind`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EnvoyGatewayNoDefaultBind)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EnvoyDNSDiscoveryType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EnvoyDNSDiscoveryType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnvoyDNSDiscoveryType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnvoyDNSDiscoveryType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EnvoyDNSDiscoveryType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EnvoyDNSDiscoveryType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(x.Config), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulGatewayProxy) 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 *ConsulGatewayProxy) 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 "ConnectTimeout": - if r.TryDecodeAsNil() { - if true && x.ConnectTimeout != nil { - x.ConnectTimeout = nil - } - } else { - if x.ConnectTimeout == nil { - x.ConnectTimeout = new(time.Duration) - } - - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ConnectTimeout)); yyxt5 != nil { - z.DecExtension(x.ConnectTimeout, yyxt5) - } else { - *x.ConnectTimeout = (time.Duration)(r.DecodeInt64()) - } - } - case "EnvoyGatewayBindTaggedAddresses": - if r.TryDecodeAsNil() { - x.EnvoyGatewayBindTaggedAddresses = false - } else { - x.EnvoyGatewayBindTaggedAddresses = (bool)(r.DecodeBool()) - } - case "EnvoyGatewayBindAddresses": - if r.TryDecodeAsNil() { - x.EnvoyGatewayBindAddresses = nil - } else { - if false { - } else { - h.decMapstringPtrtoConsulGatewayBindAddress((*map[string]*ConsulGatewayBindAddress)(&x.EnvoyGatewayBindAddresses), d) - } - } - case "EnvoyGatewayNoDefaultBind": - if r.TryDecodeAsNil() { - x.EnvoyGatewayNoDefaultBind = false - } else { - x.EnvoyGatewayNoDefaultBind = (bool)(r.DecodeBool()) - } - case "EnvoyDNSDiscoveryType": - if r.TryDecodeAsNil() { - x.EnvoyDNSDiscoveryType = "" - } else { - x.EnvoyDNSDiscoveryType = (string)(r.DecodeString()) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulGatewayProxy) 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() { - if true && x.ConnectTimeout != nil { - x.ConnectTimeout = nil - } - } else { - if x.ConnectTimeout == nil { - x.ConnectTimeout = new(time.Duration) - } - - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.ConnectTimeout)); yyxt15 != nil { - z.DecExtension(x.ConnectTimeout, yyxt15) - } else { - *x.ConnectTimeout = (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.EnvoyGatewayBindTaggedAddresses = false - } else { - x.EnvoyGatewayBindTaggedAddresses = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnvoyGatewayBindAddresses = nil - } else { - if false { - } else { - h.decMapstringPtrtoConsulGatewayBindAddress((*map[string]*ConsulGatewayBindAddress)(&x.EnvoyGatewayBindAddresses), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnvoyGatewayNoDefaultBind = false - } else { - x.EnvoyGatewayNoDefaultBind = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnvoyDNSDiscoveryType = "" - } else { - x.EnvoyDNSDiscoveryType = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), 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 *ConsulGatewayTLSSDSConfig) 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.ClusterName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClusterName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClusterName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClusterName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClusterName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClusterName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CertResource))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CertResource)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CertResource\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CertResource`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CertResource))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CertResource)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulGatewayTLSSDSConfig) 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 *ConsulGatewayTLSSDSConfig) 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 "ClusterName": - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = (string)(r.DecodeString()) - } - case "CertResource": - if r.TryDecodeAsNil() { - x.CertResource = "" - } else { - x.CertResource = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulGatewayTLSSDSConfig) 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.ClusterName = "" - } else { - x.ClusterName = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CertResource = "" - } else { - x.CertResource = (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 *ConsulGatewayTLSConfig) 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.TLSMinVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSMinVersion)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLSMinVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLSMinVersion`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSMinVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSMinVersion)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSMaxVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSMaxVersion)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLSMaxVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLSMaxVersion`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSMaxVersion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSMaxVersion)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.CipherSuites == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.CipherSuites), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CipherSuites\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CipherSuites`) - } - r.WriteMapElemValue() - if x.CipherSuites == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.CipherSuites), e) - } - } - } - var yyn15 bool - if x.SDS == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.SDS == nil { - r.EncodeNil() - } else { - x.SDS.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SDS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SDS`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.SDS == nil { - r.EncodeNil() - } else { - x.SDS.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulGatewayTLSConfig) 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 *ConsulGatewayTLSConfig) 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 "TLSMinVersion": - if r.TryDecodeAsNil() { - x.TLSMinVersion = "" - } else { - x.TLSMinVersion = (string)(r.DecodeString()) - } - case "TLSMaxVersion": - if r.TryDecodeAsNil() { - x.TLSMaxVersion = "" - } else { - x.TLSMaxVersion = (string)(r.DecodeString()) - } - case "CipherSuites": - if r.TryDecodeAsNil() { - x.CipherSuites = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.CipherSuites), d) - } - } - case "SDS": - if r.TryDecodeAsNil() { - if true && x.SDS != nil { - x.SDS = nil - } - } else { - if x.SDS == nil { - x.SDS = new(ConsulGatewayTLSSDSConfig) - } - - x.SDS.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulGatewayTLSConfig) 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.Enabled = false - } else { - x.Enabled = (bool)(r.DecodeBool()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSMinVersion = "" - } else { - x.TLSMinVersion = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSMaxVersion = "" - } else { - x.TLSMaxVersion = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CipherSuites = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.CipherSuites), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SDS != nil { - x.SDS = nil - } - } else { - if x.SDS == nil { - x.SDS = new(ConsulGatewayTLSSDSConfig) - } - - x.SDS.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 *ConsulHTTPHeaderModifiers) 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.Add == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Add), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Add\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Add`) - } - r.WriteMapElemValue() - if x.Add == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Add), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Set == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Set), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Set\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Set`) - } - r.WriteMapElemValue() - if x.Set == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Set), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Remove == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Remove), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Remove\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Remove`) - } - r.WriteMapElemValue() - if x.Remove == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Remove), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulHTTPHeaderModifiers) 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 *ConsulHTTPHeaderModifiers) 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 "Add": - if r.TryDecodeAsNil() { - x.Add = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Add), d) - } - } - case "Set": - if r.TryDecodeAsNil() { - x.Set = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Set), d) - } - } - case "Remove": - if r.TryDecodeAsNil() { - x.Remove = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Remove), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulHTTPHeaderModifiers) 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.Add = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Add), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Set = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Set), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Remove = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Remove), 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 *ConsulIngressService) 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 x.Hosts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Hosts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hosts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hosts`) - } - r.WriteMapElemValue() - if x.Hosts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Hosts), e) - } - } - } - var yyn9 bool - if x.TLS == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.TLS == nil { - r.EncodeNil() - } else { - x.TLS.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLS`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.TLS == nil { - r.EncodeNil() - } else { - x.TLS.CodecEncodeSelf(e) - } - } - } - var yyn12 bool - if x.RequestHeaders == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RequestHeaders == nil { - r.EncodeNil() - } else { - x.RequestHeaders.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequestHeaders\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequestHeaders`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.RequestHeaders == nil { - r.EncodeNil() - } else { - x.RequestHeaders.CodecEncodeSelf(e) - } - } - } - var yyn15 bool - if x.ResponseHeaders == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ResponseHeaders == nil { - r.EncodeNil() - } else { - x.ResponseHeaders.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResponseHeaders\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ResponseHeaders`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.ResponseHeaders == nil { - r.EncodeNil() - } else { - x.ResponseHeaders.CodecEncodeSelf(e) - } - } - } - var yyn18 bool - if x.MaxConnections == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MaxConnections == nil { - r.EncodeNil() - } else { - yy19 := *x.MaxConnections - if false { - } else { - r.EncodeUint(uint64(yy19)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxConnections\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxConnections`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.MaxConnections == nil { - r.EncodeNil() - } else { - yy21 := *x.MaxConnections - if false { - } else { - r.EncodeUint(uint64(yy21)) - } - } - } - } - var yyn23 bool - if x.MaxPendingRequests == nil { - yyn23 = true - goto LABEL23 - } - LABEL23: - if yyr2 || yy2arr2 { - if yyn23 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MaxPendingRequests == nil { - r.EncodeNil() - } else { - yy24 := *x.MaxPendingRequests - if false { - } else { - r.EncodeUint(uint64(yy24)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxPendingRequests\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxPendingRequests`) - } - r.WriteMapElemValue() - if yyn23 { - r.EncodeNil() - } else { - if x.MaxPendingRequests == nil { - r.EncodeNil() - } else { - yy26 := *x.MaxPendingRequests - if false { - } else { - r.EncodeUint(uint64(yy26)) - } - } - } - } - var yyn28 bool - if x.MaxConcurrentRequests == nil { - yyn28 = true - goto LABEL28 - } - LABEL28: - if yyr2 || yy2arr2 { - if yyn28 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MaxConcurrentRequests == nil { - r.EncodeNil() - } else { - yy29 := *x.MaxConcurrentRequests - if false { - } else { - r.EncodeUint(uint64(yy29)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxConcurrentRequests\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxConcurrentRequests`) - } - r.WriteMapElemValue() - if yyn28 { - r.EncodeNil() - } else { - if x.MaxConcurrentRequests == nil { - r.EncodeNil() - } else { - yy31 := *x.MaxConcurrentRequests - if false { - } else { - r.EncodeUint(uint64(yy31)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulIngressService) 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 *ConsulIngressService) 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 "Hosts": - if r.TryDecodeAsNil() { - x.Hosts = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Hosts), d) - } - } - case "TLS": - if r.TryDecodeAsNil() { - if true && x.TLS != nil { - x.TLS = nil - } - } else { - if x.TLS == nil { - x.TLS = new(ConsulGatewayTLSConfig) - } - - x.TLS.CodecDecodeSelf(d) - } - case "RequestHeaders": - if r.TryDecodeAsNil() { - if true && x.RequestHeaders != nil { - x.RequestHeaders = nil - } - } else { - if x.RequestHeaders == nil { - x.RequestHeaders = new(ConsulHTTPHeaderModifiers) - } - - x.RequestHeaders.CodecDecodeSelf(d) - } - case "ResponseHeaders": - if r.TryDecodeAsNil() { - if true && x.ResponseHeaders != nil { - x.ResponseHeaders = nil - } - } else { - if x.ResponseHeaders == nil { - x.ResponseHeaders = new(ConsulHTTPHeaderModifiers) - } - - x.ResponseHeaders.CodecDecodeSelf(d) - } - case "MaxConnections": - if r.TryDecodeAsNil() { - if true && x.MaxConnections != nil { - x.MaxConnections = nil - } - } else { - if x.MaxConnections == nil { - x.MaxConnections = new(uint32) - } - - if false { - } else { - *x.MaxConnections = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) - } - } - case "MaxPendingRequests": - if r.TryDecodeAsNil() { - if true && x.MaxPendingRequests != nil { - x.MaxPendingRequests = nil - } - } else { - if x.MaxPendingRequests == nil { - x.MaxPendingRequests = new(uint32) - } - - if false { - } else { - *x.MaxPendingRequests = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) - } - } - case "MaxConcurrentRequests": - if r.TryDecodeAsNil() { - if true && x.MaxConcurrentRequests != nil { - x.MaxConcurrentRequests = nil - } - } else { - if x.MaxConcurrentRequests == nil { - x.MaxConcurrentRequests = new(uint32) - } - - if false { - } else { - *x.MaxConcurrentRequests = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulIngressService) 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.Hosts = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Hosts), d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.TLS != nil { - x.TLS = nil - } - } else { - if x.TLS == nil { - x.TLS = new(ConsulGatewayTLSConfig) - } - - x.TLS.CodecDecodeSelf(d) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RequestHeaders != nil { - x.RequestHeaders = nil - } - } else { - if x.RequestHeaders == nil { - x.RequestHeaders = new(ConsulHTTPHeaderModifiers) - } - - x.RequestHeaders.CodecDecodeSelf(d) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ResponseHeaders != nil { - x.ResponseHeaders = nil - } - } else { - if x.ResponseHeaders == nil { - x.ResponseHeaders = new(ConsulHTTPHeaderModifiers) - } - - x.ResponseHeaders.CodecDecodeSelf(d) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.MaxConnections != nil { - x.MaxConnections = nil - } - } else { - if x.MaxConnections == nil { - x.MaxConnections = new(uint32) - } - - if false { - } else { - *x.MaxConnections = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.MaxPendingRequests != nil { - x.MaxPendingRequests = nil - } - } else { - if x.MaxPendingRequests == nil { - x.MaxPendingRequests = new(uint32) - } - - if false { - } else { - *x.MaxPendingRequests = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.MaxConcurrentRequests != nil { - x.MaxConcurrentRequests = nil - } - } else { - if x.MaxConcurrentRequests == nil { - x.MaxConcurrentRequests = new(uint32) - } - - if false { - } else { - *x.MaxConcurrentRequests = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) - } - } - for { - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj16-1, "") - } - r.ReadArrayEnd() -} - -func (x *ConsulIngressListener) 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.Port)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Port\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Port`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Port)) - } - } - 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 x.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConsulIngressService(([]*ConsulIngressService)(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.encSlicePtrtoConsulIngressService(([]*ConsulIngressService)(x.Services), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulIngressListener) 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 *ConsulIngressListener) 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 "Port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Protocol": - if r.TryDecodeAsNil() { - x.Protocol = "" - } else { - x.Protocol = (string)(r.DecodeString()) - } - case "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoConsulIngressService((*[]*ConsulIngressService)(&x.Services), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulIngressListener) 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.Port = 0 - } else { - x.Port = (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.Protocol = "" - } else { - x.Protocol = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoConsulIngressService((*[]*ConsulIngressService)(&x.Services), 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 *ConsulIngressConfigEntry) 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.TLS == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.TLS == nil { - r.EncodeNil() - } else { - x.TLS.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLS`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.TLS == nil { - r.EncodeNil() - } else { - x.TLS.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Listeners == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConsulIngressListener(([]*ConsulIngressListener)(x.Listeners), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Listeners\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Listeners`) - } - r.WriteMapElemValue() - if x.Listeners == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConsulIngressListener(([]*ConsulIngressListener)(x.Listeners), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulIngressConfigEntry) 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 *ConsulIngressConfigEntry) 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 "TLS": - if r.TryDecodeAsNil() { - if true && x.TLS != nil { - x.TLS = nil - } - } else { - if x.TLS == nil { - x.TLS = new(ConsulGatewayTLSConfig) - } - - x.TLS.CodecDecodeSelf(d) - } - case "Listeners": - if r.TryDecodeAsNil() { - x.Listeners = nil - } else { - if false { - } else { - h.decSlicePtrtoConsulIngressListener((*[]*ConsulIngressListener)(&x.Listeners), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulIngressConfigEntry) 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.TLS != nil { - x.TLS = nil - } - } else { - if x.TLS == nil { - x.TLS = new(ConsulGatewayTLSConfig) - } - - x.TLS.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Listeners = nil - } else { - if false { - } else { - h.decSlicePtrtoConsulIngressListener((*[]*ConsulIngressListener)(&x.Listeners), 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 *ConsulLinkedService) 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.CAFile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CAFile)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CAFile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CAFile`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CAFile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CAFile)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CertFile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CertFile)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CertFile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CertFile`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CertFile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CertFile)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyFile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyFile)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyFile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyFile`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyFile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyFile)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SNI))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SNI)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SNI\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SNI`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SNI))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SNI)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulLinkedService) 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 *ConsulLinkedService) 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 "CAFile": - if r.TryDecodeAsNil() { - x.CAFile = "" - } else { - x.CAFile = (string)(r.DecodeString()) - } - case "CertFile": - if r.TryDecodeAsNil() { - x.CertFile = "" - } else { - x.CertFile = (string)(r.DecodeString()) - } - case "KeyFile": - if r.TryDecodeAsNil() { - x.KeyFile = "" - } else { - x.KeyFile = (string)(r.DecodeString()) - } - case "SNI": - if r.TryDecodeAsNil() { - x.SNI = "" - } else { - x.SNI = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulLinkedService) 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.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.CAFile = "" - } else { - x.CAFile = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CertFile = "" - } else { - x.CertFile = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KeyFile = "" - } else { - x.KeyFile = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SNI = "" - } else { - x.SNI = (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 *ConsulTerminatingConfigEntry) 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.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConsulLinkedService(([]*ConsulLinkedService)(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.encSlicePtrtoConsulLinkedService(([]*ConsulLinkedService)(x.Services), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulTerminatingConfigEntry) 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 *ConsulTerminatingConfigEntry) 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 "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoConsulLinkedService((*[]*ConsulLinkedService)(&x.Services), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulTerminatingConfigEntry) 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.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoConsulLinkedService((*[]*ConsulLinkedService)(&x.Services), 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 *ConsulMeshConfigEntry) 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 *ConsulMeshConfigEntry) 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 *ConsulMeshConfigEntry) 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 *ConsulMeshConfigEntry) 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 *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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.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.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.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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 *AgentPprofRequest) 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(19) - } else { - r.WriteMapStart(19) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.ReqType)); yyxt4 != nil { - z.EncExtension(x.ReqType, yyxt4) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReqType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReqType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReqType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReqType`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ReqType)); yyxt5 != nil { - z.EncExtension(x.ReqType, yyxt5) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReqType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReqType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Profile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Profile)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Profile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Profile`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Profile))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Profile)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Seconds)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Seconds\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Seconds`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Seconds)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Debug)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Debug\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Debug`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Debug)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.GC)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GC\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GC`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.GC)) - } - } - 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.ServerID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServerID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerID)) - } - } - } - 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 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(codecSelferCcUTF8100, `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(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *AgentPprofRequest) 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 *AgentPprofRequest) 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 "ReqType": - if r.TryDecodeAsNil() { - x.ReqType = "" - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ReqType)); yyxt5 != nil { - z.DecExtension(x.ReqType, yyxt5) - } else { - x.ReqType = (pkg11_pprof.ReqType)(r.DecodeString()) - } - } - case "Profile": - if r.TryDecodeAsNil() { - x.Profile = "" - } else { - x.Profile = (string)(r.DecodeString()) - } - case "Seconds": - if r.TryDecodeAsNil() { - x.Seconds = 0 - } else { - x.Seconds = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Debug": - if r.TryDecodeAsNil() { - x.Debug = 0 - } else { - x.Debug = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "GC": - if r.TryDecodeAsNil() { - x.GC = 0 - } else { - x.GC = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 "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 yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.DecExtension(x.MaxQueryTime, yyxt16) - } 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *AgentPprofRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj25 int - var yyb25 bool - var yyhl25 bool = l >= 0 - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReqType = "" - } else { - if false { - } else if yyxt27 := z.Extension(z.I2Rtid(x.ReqType)); yyxt27 != nil { - z.DecExtension(x.ReqType, yyxt27) - } else { - x.ReqType = (pkg11_pprof.ReqType)(r.DecodeString()) - } - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Profile = "" - } else { - x.Profile = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Seconds = 0 - } else { - x.Seconds = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Debug = 0 - } else { - x.Debug = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GC = 0 - } else { - x.GC = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerID = "" - } else { - x.ServerID = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt38 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt38 != nil { - z.DecExtension(x.MaxQueryTime, yyxt38) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj25++ - if yyhl25 { - yyb25 = yyj25 > l - } else { - yyb25 = r.CheckBreak() - } - if yyb25 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj25-1, "") - } - r.ReadArrayEnd() -} - -func (x *AgentPprofResponse) 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.AgentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AgentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AgentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AgentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AgentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AgentID)) - } - } - } - 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.HTTPHeaders == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.HTTPHeaders), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HTTPHeaders\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HTTPHeaders`) - } - r.WriteMapElemValue() - if x.HTTPHeaders == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.HTTPHeaders), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AgentPprofResponse) 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 *AgentPprofResponse) 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 "AgentID": - if r.TryDecodeAsNil() { - x.AgentID = "" - } else { - x.AgentID = (string)(r.DecodeString()) - } - case "Payload": - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - case "HTTPHeaders": - if r.TryDecodeAsNil() { - x.HTTPHeaders = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.HTTPHeaders), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AgentPprofResponse) 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.AgentID = "" - } else { - x.AgentID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HTTPHeaders = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.HTTPHeaders), 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 *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(5) - } else { - r.WriteMapStart(5) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.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.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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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 *AuthenticatedIdentity) 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.ACLToken == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ACLToken == nil { - r.EncodeNil() - } else { - x.ACLToken.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ACLToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ACLToken`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ACLToken == nil { - r.EncodeNil() - } else { - x.ACLToken.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.Claims == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Claims == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Claims)); yyxt7 != nil { - z.EncExtension(x.Claims, yyxt7) - } else { - z.EncFallback(x.Claims) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Claims\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Claims`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Claims == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Claims)); yyxt8 != nil { - z.EncExtension(x.Claims, yyxt8) - } else { - z.EncFallback(x.Claims) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLSName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLSName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TLSName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TLSName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.RemoteIP == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.RemoteIP)); yyxt16 != nil { - z.EncExtension(x.RemoteIP, yyxt16) - } else if !z.EncBinary() { - z.EncTextMarshal(x.RemoteIP) - } else { - h.encnet_IP((net.IP)(x.RemoteIP), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RemoteIP\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RemoteIP`) - } - r.WriteMapElemValue() - if x.RemoteIP == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.RemoteIP)); yyxt17 != nil { - z.EncExtension(x.RemoteIP, yyxt17) - } else if !z.EncBinary() { - z.EncTextMarshal(x.RemoteIP) - } else { - h.encnet_IP((net.IP)(x.RemoteIP), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AuthenticatedIdentity) 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 *AuthenticatedIdentity) 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 "ACLToken": - if r.TryDecodeAsNil() { - if true && x.ACLToken != nil { - x.ACLToken = nil - } - } else { - if x.ACLToken == nil { - x.ACLToken = new(ACLToken) - } - - x.ACLToken.CodecDecodeSelf(d) - } - case "Claims": - if r.TryDecodeAsNil() { - if true && x.Claims != nil { - x.Claims = nil - } - } else { - if x.Claims == nil { - x.Claims = new(IdentityClaims) - } - - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.Claims)); yyxt6 != nil { - z.DecExtension(x.Claims, yyxt6) - } else { - z.DecFallback(x.Claims, false) - } - } - case "ClientID": - if r.TryDecodeAsNil() { - x.ClientID = "" - } else { - x.ClientID = (string)(r.DecodeString()) - } - case "TLSName": - if r.TryDecodeAsNil() { - x.TLSName = "" - } else { - x.TLSName = (string)(r.DecodeString()) - } - case "RemoteIP": - if r.TryDecodeAsNil() { - x.RemoteIP = nil - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.RemoteIP)); yyxt10 != nil { - z.DecExtension(x.RemoteIP, yyxt10) - } else if !z.DecBinary() { - z.DecTextUnmarshal(&x.RemoteIP) - } else { - h.decnet_IP((*net.IP)(&x.RemoteIP), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AuthenticatedIdentity) 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.ACLToken != nil { - x.ACLToken = nil - } - } else { - if x.ACLToken == nil { - x.ACLToken = new(ACLToken) - } - - x.ACLToken.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Claims != nil { - x.Claims = nil - } - } else { - if x.Claims == nil { - x.Claims = new(IdentityClaims) - } - - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.Claims)); yyxt14 != nil { - z.DecExtension(x.Claims, yyxt14) - } else { - z.DecFallback(x.Claims, false) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientID = "" - } else { - x.ClientID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSName = "" - } else { - x.TLSName = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RemoteIP = nil - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.RemoteIP)); yyxt18 != nil { - z.DecExtension(x.RemoteIP, yyxt18) - } else if !z.DecBinary() { - z.DecTextUnmarshal(&x.RemoteIP) - } else { - h.decnet_IP((*net.IP)(&x.RemoteIP), 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 *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(4) - } else { - r.WriteMapStart(4) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.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.LastContact = 0 - } else { - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.LastContact)); yyxt12 != nil { - z.DecExtension(x.LastContact, yyxt12) - } 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.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (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 *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(8) - } else { - r.WriteMapStart(8) - } - 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 { - r.EncodeBool(bool(x.CreateNodePool)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateNodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateNodePool`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.CreateNodePool)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "CreateNodePool": - if r.TryDecodeAsNil() { - x.CreateNodePool = false - } else { - x.CreateNodePool = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Node != nil { - x.Node = nil - } - } else { - if x.Node == nil { - x.Node = new(Node) - } - - x.Node.CodecDecodeSelf(d) - } - 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.CreateNodePool = false - } else { - x.CreateNodePool = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.NodeIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.NodeIDs), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(9) - } else { - r.WriteMapStart(9) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (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.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(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)) - } - } - } - 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.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 yyn12 bool - if x.NodeEvent == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - 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 yyn12 { - 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 x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.UpdatedBy))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.UpdatedBy)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdatedBy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdatedBy`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.UpdatedBy))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.UpdatedBy)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "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 "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "UpdatedBy": - if r.TryDecodeAsNil() { - x.UpdatedBy = "" - } else { - x.UpdatedBy = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MarkEligible = false - } else { - x.MarkEligible = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedBy = "" - } else { - x.UpdatedBy = (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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(8) - } else { - r.WriteMapStart(8) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Updates = nil - } else { - if false { - } else { - h.decMapstringPtrtoDrainUpdate((*map[string]*DrainUpdate)(&x.Updates), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeEvents = nil - } else { - if false { - } else { - h.decMapstringPtrtoNodeEvent((*map[string]*NodeEvent)(&x.NodeEvents), 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(9) - } else { - r.WriteMapStart(9) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Eligibility = "" - } else { - x.Eligibility = (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.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(14) - } else { - r.WriteMapStart(14) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(14) - } else { - r.WriteMapStart(14) - } - var yyn3 bool - if x.Submission == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Submission == nil { - r.EncodeNil() - } else { - x.Submission.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Submission\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Submission`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Submission == nil { - r.EncodeNil() - } else { - x.Submission.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.Job == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - 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 yyn6 { - 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.PreserveCounts)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreserveCounts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreserveCounts`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PreserveCounts)) - } - } - 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 { - r.EncodeInt(int64(x.EvalPriority)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalPriority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalPriority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.EvalPriority)) - } - } - 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) - } - } - } - 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 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 yyn27 { - r.EncodeNil() - } else { - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "Submission": - if r.TryDecodeAsNil() { - if true && x.Submission != nil { - x.Submission = nil - } - } else { - if x.Submission == nil { - x.Submission = new(JobSubmission) - } - - x.Submission.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 "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 "PreserveCounts": - if r.TryDecodeAsNil() { - x.PreserveCounts = false - } else { - x.PreserveCounts = (bool)(r.DecodeBool()) - } - case "PolicyOverride": - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - case "EvalPriority": - if r.TryDecodeAsNil() { - x.EvalPriority = 0 - } else { - x.EvalPriority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 "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 "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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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() { - if true && x.Submission != nil { - x.Submission = nil - } - } else { - if x.Submission == nil { - x.Submission = new(JobSubmission) - } - - x.Submission.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() { - x.EnforceIndex = false - } else { - x.EnforceIndex = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreserveCounts = false - } else { - x.PreserveCounts = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalPriority = 0 - } else { - x.EvalPriority = (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() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.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.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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.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.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.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - 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 false { - } else { - r.EncodeInt(int64(x.EvalPriority)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalPriority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalPriority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.EvalPriority)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.NoShutdownDelay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NoShutdownDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NoShutdownDelay`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.NoShutdownDelay)) - } - } - var yyn18 bool - if x.Eval == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - 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 yyn18 { - r.EncodeNil() - } else { - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } - 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "Global": - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - case "EvalPriority": - if r.TryDecodeAsNil() { - x.EvalPriority = 0 - } else { - x.EvalPriority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NoShutdownDelay": - if r.TryDecodeAsNil() { - x.NoShutdownDelay = false - } else { - x.NoShutdownDelay = (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) - } - case "SubmitTime": - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Purge = false - } else { - x.Purge = (bool)(r.DecodeBool()) - } - 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.EvalPriority = 0 - } else { - x.EvalPriority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NoShutdownDelay = false - } else { - x.NoShutdownDelay = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - 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) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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.WriteRequest.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.WriteRequest.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.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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 *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(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() - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.EvalOptions = EvalOptions{} - } else { - x.EvalOptions.CodecDecodeSelf(d) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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 *JobSubmissionRequest) 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(14) - } else { - r.WriteMapStart(14) - } - 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.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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *JobSubmissionRequest) 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 *JobSubmissionRequest) 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 "Version": - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *JobSubmissionRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobSubmissionResponse) 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.Submission == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Submission == nil { - r.EncodeNil() - } else { - x.Submission.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Submission\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Submission`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Submission == nil { - r.EncodeNil() - } else { - x.Submission.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobSubmissionResponse) 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 *JobSubmissionResponse) 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 "Submission": - if r.TryDecodeAsNil() { - if true && x.Submission != nil { - x.Submission = nil - } - } else { - if x.Submission == nil { - x.Submission = new(JobSubmission) - } - - x.Submission.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobSubmissionResponse) 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.Submission != nil { - x.Submission = nil - } - } else { - if x.Submission == nil { - x.Submission = new(JobSubmission) - } - - x.Submission.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(14) - } else { - r.WriteMapStart(14) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 yyn39 bool - if x.Fields == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if yyn39 { - r.EncodeNil() - } else { - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "Fields": - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(JobStubFields) - } - - x.Fields.CodecDecodeSelf(d) - } - 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 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.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 yyxt23 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt23 != nil { - z.DecExtension(x.MaxQueryTime, yyxt23) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(JobStubFields) - } - - x.Fields.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 *JobStubFields) 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.Meta)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Meta)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStubFields) 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 *JobStubFields) 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 "Meta": - if r.TryDecodeAsNil() { - x.Meta = false - } else { - x.Meta = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStubFields) 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.Meta = false - } else { - x.Meta = (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 *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(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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Diff = false - } else { - x.Diff = (bool)(r.DecodeBool()) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *JobScaleRequest) 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(14) - } else { - r.WriteMapStart(14) - } - 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.Target == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Target), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Target\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Target`) - } - r.WriteMapElemValue() - if x.Target == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Target), e) - } - } - } - var yyn9 bool - if x.Count == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Count == nil { - r.EncodeNil() - } else { - yy10 := *x.Count - if false { - } else { - r.EncodeInt(int64(yy10)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Count\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Count`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Count == nil { - r.EncodeNil() - } else { - yy12 := *x.Count - if false { - } else { - r.EncodeInt(int64(yy12)) - } - } - } - } - 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 { - r.EncodeBool(bool(x.Error)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Error)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(x.Meta), e) - } - } - } - 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 { - 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *JobScaleRequest) 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 *JobScaleRequest) 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 "Target": - if r.TryDecodeAsNil() { - x.Target = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Target), d) - } - } - case "Count": - if r.TryDecodeAsNil() { - if true && x.Count != nil { - x.Count = nil - } - } else { - if x.Count == nil { - x.Count = new(int64) - } - - if false { - } else { - *x.Count = (int64)(r.DecodeInt64()) - } - } - case "Message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - case "Error": - if r.TryDecodeAsNil() { - x.Error = false - } else { - x.Error = (bool)(r.DecodeBool()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Meta), d) - } - } - case "PolicyOverride": - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - 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 "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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *JobScaleRequest) 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.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Target = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Target), d) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Count != nil { - x.Count = nil - } - } else { - if x.Count == nil { - x.Count = new(int64) - } - - if false { - } else { - *x.Count = (int64)(r.DecodeInt64()) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Error = false - } else { - x.Error = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Meta), d) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnforceIndex = false - } else { - x.EnforceIndex = (bool)(r.DecodeBool()) - } - 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.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj21-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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.JobID = "" - } else { - x.JobID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *JobScaleStatusRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *JobScaleStatusRequest) 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 *JobScaleStatusRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *JobScaleStatusRequest) 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.JobID = "" - } else { - x.JobID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(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 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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdPrefixTemplate))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdPrefixTemplate)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdPrefixTemplate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdPrefixTemplate`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdPrefixTemplate))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdPrefixTemplate)) - } - } - } - 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 { - h.decMapstringstring((*map[string]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "IdPrefixTemplate": - if r.TryDecodeAsNil() { - x.IdPrefixTemplate = "" - } else { - x.IdPrefixTemplate = (string)(r.DecodeString()) - } - 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 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.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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.WriteRequest.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.WriteRequest.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.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IdPrefixTemplate = "" - } else { - x.IdPrefixTemplate = (string)(r.DecodeString()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(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.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.ConsulToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConsulToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConsulToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulToken)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "ConsulToken": - if r.TryDecodeAsNil() { - x.ConsulToken = "" - } else { - x.ConsulToken = (string)(r.DecodeString()) - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - 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()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ConsulToken = "" - } else { - x.ConsulToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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.WriteRequest.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.WriteRequest.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.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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 *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(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)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stable = false - } else { - x.Stable = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 yyn39 bool - if x.Fields == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if yyn39 { - r.EncodeNil() - } else { - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "Fields": - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(NodeStubFields) - } - - x.Fields.CodecDecodeSelf(d) - } - 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 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.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 yyxt23 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt23 != nil { - z.DecExtension(x.MaxQueryTime, yyxt23) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(NodeStubFields) - } - - x.Fields.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 *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(7) - } else { - r.WriteMapStart(7) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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 { - 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.EvalToken = "" - } else { - x.EvalToken = (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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *EvalReapRequest) 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 x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Evals), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Allocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.UserInitiated)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UserInitiated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UserInitiated`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.UserInitiated)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *EvalReapRequest) 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 *EvalReapRequest) 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.decSlicestring((*[]string)(&x.Evals), d) - } - } - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allocs), d) - } - } - case "Filter": - if r.TryDecodeAsNil() { - x.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "UserInitiated": - if r.TryDecodeAsNil() { - x.UserInitiated = false - } else { - x.UserInitiated = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *EvalReapRequest) 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.Evals = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Evals), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allocs), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UserInitiated = false - } else { - x.UserInitiated = (bool)(r.DecodeBool()) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(14) - } else { - r.WriteMapStart(14) - } - 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.EncodeBool(bool(x.IncludeRelated)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IncludeRelated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IncludeRelated`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IncludeRelated)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "IncludeRelated": - if r.TryDecodeAsNil() { - x.IncludeRelated = false - } else { - x.IncludeRelated = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IncludeRelated = false - } else { - x.IncludeRelated = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Schedulers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Schedulers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Schedulers), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.Timeout)); yyxt18 != nil { - z.DecExtension(x.Timeout, yyxt18) - } else { - x.Timeout = (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.SchedulerVersion = 0 - } else { - x.SchedulerVersion = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FilterJobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FilterJobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FilterJobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FilterJobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FilterJobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FilterJobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FilterEvalStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FilterEvalStatus)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FilterEvalStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FilterEvalStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FilterEvalStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FilterEvalStatus)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "FilterJobID": - if r.TryDecodeAsNil() { - x.FilterJobID = "" - } else { - x.FilterJobID = (string)(r.DecodeString()) - } - case "FilterEvalStatus": - if r.TryDecodeAsNil() { - x.FilterEvalStatus = "" - } else { - x.FilterEvalStatus = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FilterJobID = "" - } else { - x.FilterJobID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FilterEvalStatus = "" - } else { - x.FilterEvalStatus = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalCountRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *EvalCountRequest) 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 *EvalCountRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *EvalCountRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Plan != nil { - x.Plan = nil - } - } else { - if x.Plan == nil { - x.Plan = new(Plan) - } - - x.Plan.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(18) - } else { - r.WriteMapStart(18) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 yyn33 bool - if x.Deployment == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - 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 yyn33 { - 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.WriteArrayElem() - if x.IneligibleNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.IneligibleNodes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IneligibleNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IneligibleNodes`) - } - r.WriteMapElemValue() - if x.IneligibleNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.IneligibleNodes), 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.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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) - } - } - case "IneligibleNodes": - if r.TryDecodeAsNil() { - x.IneligibleNodes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.IneligibleNodes), d) - } - } - case "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - 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 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.AllocUpdateRequest.Alloc = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Alloc), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.AllocsStopped = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsStopped), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.AllocsUpdated = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.AllocsUpdated), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - 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) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.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.AllocUpdateRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - 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) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - 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.NodePreemptions = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.NodePreemptions), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocsPreempted = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsPreempted), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptionEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.PreemptionEvals), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IneligibleNodes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.IneligibleNodes), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (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 *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(10) - } else { - r.WriteMapStart(10) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Alloc = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Alloc), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocsStopped = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsStopped), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocsUpdated = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.AllocsUpdated), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), 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() { - x.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.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.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.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.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 *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(7) - } else { - r.WriteMapStart(7) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Allocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoDesiredTransition((*map[string]*DesiredTransition)(&x.Allocs), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(7) - } else { - r.WriteMapStart(7) - } - 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 { - r.EncodeBool(bool(x.NoShutdownDelay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NoShutdownDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NoShutdownDelay`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.NoShutdownDelay)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "NoShutdownDelay": - if r.TryDecodeAsNil() { - x.NoShutdownDelay = false - } else { - x.NoShutdownDelay = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NoShutdownDelay = false - } else { - x.NoShutdownDelay = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 yyn39 bool - if x.Fields == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if yyn39 { - r.EncodeNil() - } else { - if x.Fields == nil { - r.EncodeNil() - } else { - x.Fields.CodecEncodeSelf(e) - } - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "Fields": - if r.TryDecodeAsNil() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(AllocStubFields) - } - - x.Fields.CodecDecodeSelf(d) - } - 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 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.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 yyxt23 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt23 != nil { - z.DecExtension(x.MaxQueryTime, yyxt23) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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() { - if true && x.Fields != nil { - x.Fields = nil - } - } else { - if x.Fields == nil { - x.Fields = new(AllocStubFields) - } - - x.Fields.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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(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(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.Signal = "" - } else { - x.Signal = (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.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 yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *AllocPauseRequest) 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.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() - x.ScheduleState.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScheduleState\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScheduleState`) - } - r.WriteMapElemValue() - x.ScheduleState.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 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *AllocPauseRequest) 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 *AllocPauseRequest) 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 "ScheduleState": - if r.TryDecodeAsNil() { - x.ScheduleState = "" - } else { - x.ScheduleState.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 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *AllocPauseRequest) 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.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.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - 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 yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *AllocGetPauseStateRequest) 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(14) - } else { - r.WriteMapStart(14) - } - 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *AllocGetPauseStateRequest) 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 *AllocGetPauseStateRequest) 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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *AllocGetPauseStateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocGetPauseStateResponse) 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() - x.ScheduleState.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScheduleState\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScheduleState`) - } - r.WriteMapElemValue() - x.ScheduleState.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocGetPauseStateResponse) 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 *AllocGetPauseStateResponse) 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 "ScheduleState": - if r.TryDecodeAsNil() { - x.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocGetPauseStateResponse) 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.ScheduleState = "" - } else { - x.ScheduleState.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-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(13) - } else { - r.WriteMapStart(13) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 { - h.decSlicestring((*[]string)(&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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllocIDs), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(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(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 { - r.EncodeBool(bool(x.AllTasks)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllTasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllTasks`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllTasks)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "AllTasks": - if r.TryDecodeAsNil() { - x.AllTasks = false - } else { - x.AllTasks = (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 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllTasks = false - } else { - x.AllTasks = (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 yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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 { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringstring((*map[string]string)(&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 *ClusterMetadata) 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.ClusterID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClusterID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClusterID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClusterID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClusterID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClusterID)) - } - } - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ClusterMetadata) 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 *ClusterMetadata) 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 "ClusterID": - if r.TryDecodeAsNil() { - x.ClusterID = "" - } else { - x.ClusterID = (string)(r.DecodeString()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ClusterMetadata) 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.ClusterID = "" - } else { - x.ClusterID = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (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 *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(16) - } else { - r.WriteMapStart(16) - } - 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 { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 { - h.decSlicestring((*[]string)(&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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj22 int - var yyb22 bool - var yyhl22 bool = l >= 0 - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Tasks), d) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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()) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj22-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(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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.encMapstringstring((map[string]string)(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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 { - h.decMapstringstring((*map[string]string)(&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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Tasks = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Tasks), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - 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) - } - 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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *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(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Deployments == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Deployments = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Deployments), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(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 x.HealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.HealthyAllocationIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UnhealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&x.HealthyAllocationIDs), d) - } - } - case "UnhealthyAllocationIDs": - if r.TryDecodeAsNil() { - x.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.HealthyAllocationIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.HealthyAllocationIDs), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.UnhealthyAllocationIDs), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.HealthyAllocationIDs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UnhealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 yyxt28 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt28 != nil { - z.EncExtension(x.Timestamp, yyxt28) - } 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 yyxt29 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt29 != nil { - z.EncExtension(x.Timestamp, yyxt29) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } - var yyn30 bool - if x.DeploymentUpdate == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - 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 yyn30 { - r.EncodeNil() - } else { - if x.DeploymentUpdate == nil { - r.EncodeNil() - } else { - x.DeploymentUpdate.CodecEncodeSelf(e) - } - } - } - var yyn33 bool - if x.Job == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - 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 yyn33 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - var yyn36 bool - if x.Eval == nil { - yyn36 = true - goto LABEL36 - } - LABEL36: - if yyr2 || yy2arr2 { - if yyn36 { - 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 yyn36 { - 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 { - h.decSlicestring((*[]string)(&x.HealthyAllocationIDs), d) - } - } - case "UnhealthyAllocationIDs": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 yyxt15 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt15 != nil { - z.DecExtension(x.Timestamp, yyxt15) - } 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.HealthyAllocationIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.HealthyAllocationIDs), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.UnhealthyAllocationIDs), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - 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 yyxt31 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt31 != nil { - z.DecExtension(x.Timestamp, yyxt31) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - 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) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - 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) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - 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 { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(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 { - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Groups), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PromotedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PromotedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PromotedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PromotedAt)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&x.Groups), d) - } - } - case "PromotedAt": - if r.TryDecodeAsNil() { - x.PromotedAt = 0 - } else { - x.PromotedAt = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Groups), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PromotedAt = 0 - } else { - x.PromotedAt = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(10) - } else { - r.WriteMapStart(10) - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Groups), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PromotedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PromotedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PromotedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PromotedAt)) - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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.Eval == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - 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 yyn30 { - 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 { - h.decSlicestring((*[]string)(&x.Groups), d) - } - } - case "PromotedAt": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.PromotedAt = 0 - } else { - x.PromotedAt = (int64)(r.DecodeInt64()) - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.DeploymentPromoteRequest.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.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.DeploymentPromoteRequest.Groups = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Groups), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.PromotedAt = 0 - } else { - x.PromotedAt = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.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.DeploymentPromoteRequest.WriteRequest.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.DeploymentPromoteRequest.WriteRequest.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.DeploymentPromoteRequest.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - 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 { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-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(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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Pause = false - } else { - x.Pause = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *DeploymentRunRequest) 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *DeploymentRunRequest) 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 *DeploymentRunRequest) 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *DeploymentRunRequest) 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *DeploymentUnblockRequest) 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *DeploymentUnblockRequest) 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 *DeploymentUnblockRequest) 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *DeploymentUnblockRequest) 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *DeploymentCancelRequest) 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *DeploymentCancelRequest) 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 *DeploymentCancelRequest) 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *DeploymentCancelRequest) 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *ScalingPolicySpecificRequest) 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.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ScalingPolicySpecificRequest) 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 *ScalingPolicySpecificRequest) 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 "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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ScalingPolicySpecificRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *SingleScalingPolicyResponse) 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.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleScalingPolicyResponse) 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 *SingleScalingPolicyResponse) 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(ScalingPolicy) - } - - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleScalingPolicyResponse) 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.Policy != nil { - x.Policy = nil - } - } else { - if x.Policy == nil { - x.Policy = new(ScalingPolicy) - } - - x.Policy.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *ScalingPolicyListRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Job))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Job)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Job))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Job)) - } - } - } - 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *ScalingPolicyListRequest) 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 *ScalingPolicyListRequest) 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() { - x.Job = "" - } else { - x.Job = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *ScalingPolicyListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Job = "" - } else { - x.Job = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *ScalingPolicyListResponse) 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.encSlicePtrtoScalingPolicyListStub(([]*ScalingPolicyListStub)(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.encSlicePtrtoScalingPolicyListStub(([]*ScalingPolicyListStub)(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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ScalingPolicyListResponse) 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 *ScalingPolicyListResponse) 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.decSlicePtrtoScalingPolicyListStub((*[]*ScalingPolicyListStub)(&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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ScalingPolicyListResponse) 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.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoScalingPolicyListStub((*[]*ScalingPolicyListStub)(&x.Policies), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - h.encMapstringint((map[string]int)(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.encMapstringint((map[string]int)(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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 { - h.decMapstringint((*map[string]int)(&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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Build = "" - } else { - x.Build = (string)(r.DecodeString()) - } - 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.decMapstringint((*map[string]int)(&x.Versions), 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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(8) - } else { - r.WriteMapStart(8) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-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(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 { - 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.VolumeEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeEvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeEvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeEvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VolumeEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VolumeEvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.VolumeEvalIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeEvalIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeEvalIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.VolumeEvalIndex)) - } - } - 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 yyxt22 := z.Extension(z.I2Rtid(x.LastContact)); yyxt22 != nil { - z.EncExtension(x.LastContact, yyxt22) - } 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 yyxt23 := z.Extension(z.I2Rtid(x.LastContact)); yyxt23 != nil { - z.EncExtension(x.LastContact, yyxt23) - } 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 "VolumeEvalID": - if r.TryDecodeAsNil() { - x.VolumeEvalID = "" - } else { - x.VolumeEvalID = (string)(r.DecodeString()) - } - case "VolumeEvalIndex": - if r.TryDecodeAsNil() { - x.VolumeEvalIndex = 0 - } else { - x.VolumeEvalIndex = (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 yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.DecExtension(x.LastContact, yyxt11) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VolumeEvalID = "" - } else { - x.VolumeEvalID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VolumeEvalIndex = 0 - } else { - x.VolumeEvalIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.LastContact)); yyxt22 != nil { - z.DecExtension(x.LastContact, yyxt22) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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(13) - } else { - r.WriteMapStart(13) - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - r.EncodeUint(uint64(x.Features)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Features\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Features`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Features)) - } - } - 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 { - 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 { - 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 yyxt34 := z.Extension(z.I2Rtid(x.LastContact)); yyxt34 != nil { - z.EncExtension(x.LastContact, yyxt34) - } 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 yyxt35 := z.Extension(z.I2Rtid(x.LastContact)); yyxt35 != nil { - z.EncExtension(x.LastContact, yyxt35) - } 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "Features": - if r.TryDecodeAsNil() { - x.Features = 0 - } else { - x.Features = (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 "SchedulingEligibility": - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.HeartbeatTTL = 0 - } else { - if false { - } else if yyxt23 := z.Extension(z.I2Rtid(x.HeartbeatTTL)); yyxt23 != nil { - z.DecExtension(x.HeartbeatTTL, yyxt23) - } else { - x.HeartbeatTTL = (time.Duration)(r.DecodeInt64()) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EvalIDs), d) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Features = 0 - } else { - x.Features = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LeaderRPCAddr = "" - } else { - x.LeaderRPCAddr = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NumNodes = 0 - } else { - x.NumNodes = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Servers = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeServerInfo((*[]*NodeServerInfo)(&x.Servers), d) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt36 := z.Extension(z.I2Rtid(x.LastContact)); yyxt36 != nil { - z.DecExtension(x.LastContact, yyxt36) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj21-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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Allocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Allocs), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringuint64((map[string]uint64)(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.encMapstringuint64((map[string]uint64)(x.Allocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.MigrateTokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 { - h.decMapstringuint64((*map[string]uint64)(&x.Allocs), d) - } - } - case "MigrateTokens": - if r.TryDecodeAsNil() { - x.MigrateTokens = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Allocs = nil - } else { - if false { - } else { - h.decMapstringuint64((*map[string]uint64)(&x.Allocs), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MigrateTokens = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.MigrateTokens), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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() { - 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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Nodes = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeListStub((*[]*NodeListStub)(&x.Nodes), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(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 { - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.JobSummary != nil { - x.JobSummary = nil - } - } else { - if x.JobSummary == nil { - x.JobSummary = new(JobSummary) - } - - x.JobSummary.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *JobScaleStatusResponse) 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.JobScaleStatus == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.JobScaleStatus == nil { - r.EncodeNil() - } else { - x.JobScaleStatus.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobScaleStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobScaleStatus`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.JobScaleStatus == nil { - r.EncodeNil() - } else { - x.JobScaleStatus.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobScaleStatusResponse) 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 *JobScaleStatusResponse) 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 "JobScaleStatus": - if r.TryDecodeAsNil() { - if true && x.JobScaleStatus != nil { - x.JobScaleStatus = nil - } - } else { - if x.JobScaleStatus == nil { - x.JobScaleStatus = new(JobScaleStatus) - } - - x.JobScaleStatus.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobScaleStatusResponse) 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.JobScaleStatus != nil { - x.JobScaleStatus = nil - } - } else { - if x.JobScaleStatus == nil { - x.JobScaleStatus = new(JobScaleStatus) - } - - x.JobScaleStatus.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *JobScaleStatus) 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 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.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.JobStopped)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobStopped\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobStopped`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.JobStopped)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskGroupScaleStatus((map[string]*TaskGroupScaleStatus)(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.encMapstringPtrtoTaskGroupScaleStatus((map[string]*TaskGroupScaleStatus)(x.TaskGroups), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobScaleStatus) 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 *JobScaleStatus) 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 "JobCreateIndex": - if r.TryDecodeAsNil() { - x.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (uint64)(r.DecodeUint64()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "JobStopped": - if r.TryDecodeAsNil() { - x.JobStopped = false - } else { - x.JobStopped = (bool)(r.DecodeBool()) - } - case "TaskGroups": - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskGroupScaleStatus((*map[string]*TaskGroupScaleStatus)(&x.TaskGroups), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobScaleStatus) 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.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (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.JobStopped = false - } else { - x.JobStopped = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskGroupScaleStatus((*map[string]*TaskGroupScaleStatus)(&x.TaskGroups), 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 *TaskGroupScaleStatus) 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.Desired)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Desired\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Desired`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Desired)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Placed)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Placed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Placed`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Placed)) - } - } - 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.Healthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Healthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Healthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Healthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Unhealthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Unhealthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Unhealthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Unhealthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoScalingEvent(([]*ScalingEvent)(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.encSlicePtrtoScalingEvent(([]*ScalingEvent)(x.Events), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskGroupScaleStatus) 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 *TaskGroupScaleStatus) 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 "Desired": - if r.TryDecodeAsNil() { - x.Desired = 0 - } else { - x.Desired = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Placed": - if r.TryDecodeAsNil() { - x.Placed = 0 - } else { - x.Placed = (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 "Healthy": - if r.TryDecodeAsNil() { - x.Healthy = 0 - } else { - x.Healthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Unhealthy": - if r.TryDecodeAsNil() { - x.Unhealthy = 0 - } else { - x.Unhealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Events": - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoScalingEvent((*[]*ScalingEvent)(&x.Events), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskGroupScaleStatus) 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.Desired = 0 - } else { - x.Desired = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Placed = 0 - } else { - x.Placed = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Running = 0 - } else { - x.Running = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Healthy = 0 - } else { - x.Healthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Unhealthy = 0 - } else { - x.Unhealthy = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoScalingEvent((*[]*ScalingEvent)(&x.Events), 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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Jobs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobListStub((*[]*JobListStub)(&x.Jobs), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(16) - } else { - r.WriteMapStart(16) - } - 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)) - } - } - var yyn9 bool - if x.DiffVersion == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DiffVersion == nil { - r.EncodeNil() - } else { - yy10 := *x.DiffVersion - if false { - } else { - r.EncodeUint(uint64(yy10)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiffVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiffVersion`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.DiffVersion == nil { - r.EncodeNil() - } else { - yy12 := *x.DiffVersion - 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.DiffTagName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DiffTagName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiffTagName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiffTagName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DiffTagName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DiffTagName)) - } - } - } - 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 yyxt27 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt27 != nil { - z.EncExtension(x.MaxQueryTime, yyxt27) - } 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 yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.EncExtension(x.MaxQueryTime, yyxt28) - } 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "DiffVersion": - if r.TryDecodeAsNil() { - if true && x.DiffVersion != nil { - x.DiffVersion = nil - } - } else { - if x.DiffVersion == nil { - x.DiffVersion = new(uint64) - } - - if false { - } else { - *x.DiffVersion = (uint64)(r.DecodeUint64()) - } - } - case "DiffTagName": - if r.TryDecodeAsNil() { - x.DiffTagName = "" - } else { - x.DiffTagName = (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 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj22 int - var yyb22 bool - var yyhl22 bool = l >= 0 - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Diffs = false - } else { - x.Diffs = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DiffVersion != nil { - x.DiffVersion = nil - } - } else { - if x.DiffVersion == nil { - x.DiffVersion = new(uint64) - } - - if false { - } else { - *x.DiffVersion = (uint64)(r.DecodeUint64()) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiffTagName = "" - } else { - x.DiffTagName = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - 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()) - } - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj22++ - if yyhl22 { - yyb22 = yyj22 > l - } else { - yyb22 = r.CheckBreak() - } - if yyb22 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj22-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(6) - } else { - r.WriteMapStart(6) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Versions = nil - } else { - if false { - } else { - h.decSlicePtrtoJob((*[]*Job)(&x.Versions), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Diffs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobDiff((*[]*JobDiff)(&x.Diffs), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Alloc != nil { - x.Alloc = nil - } - } else { - if x.Alloc == nil { - x.Alloc = new(Allocation) - } - - x.Alloc.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceSignedWorkloadIdentity(([]SignedWorkloadIdentity)(x.SignedIdentities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SignedIdentities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SignedIdentities`) - } - r.WriteMapElemValue() - if x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceSignedWorkloadIdentity(([]SignedWorkloadIdentity)(x.SignedIdentities), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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 "SignedIdentities": - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decSliceSignedWorkloadIdentity((*[]SignedWorkloadIdentity)(&x.SignedIdentities), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Allocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Allocs), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decSliceSignedWorkloadIdentity((*[]SignedWorkloadIdentity)(&x.SignedIdentities), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Evaluations = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evaluations), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(7) - } else { - r.WriteMapStart(7) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WaitIndex = 0 - } else { - x.WaitIndex = (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.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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Deployments = nil - } else { - if false { - } else { - h.decSlicePtrtoDeployment((*[]*Deployment)(&x.Deployments), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Evaluations = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evaluations), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *EvalCountResponse) 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.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)) - } - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalCountResponse) 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 *EvalCountResponse) 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 "Count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalCountResponse) 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.Count = 0 - } else { - x.Count = (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.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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Connected = false - } else { - x.Connected = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - 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 yyxt15 := z.Extension(z.I2Rtid(x.Established)); yyxt15 != nil { - z.DecExtension(x.Established, yyxt15) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Established) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Established) - } else { - z.DecFallback(&x.Established, false) - } - } - 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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *HostDataRequest) 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(14) - } else { - r.WriteMapStart(14) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServerID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerID)) - } - } - } - 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *HostDataRequest) 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 *HostDataRequest) 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 "ServerID": - if r.TryDecodeAsNil() { - x.ServerID = "" - } else { - x.ServerID = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *HostDataRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerID = "" - } else { - x.ServerID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *HostDataResponse) 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.AgentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AgentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AgentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AgentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AgentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AgentID)) - } - } - } - var yyn6 bool - if x.HostData == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.HostData == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.HostData)); yyxt7 != nil { - z.EncExtension(x.HostData, yyxt7) - } else { - z.EncFallback(x.HostData) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostData\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HostData`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.HostData == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.HostData)); yyxt8 != nil { - z.EncExtension(x.HostData, yyxt8) - } else { - z.EncFallback(x.HostData) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *HostDataResponse) 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 *HostDataResponse) 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 "AgentID": - if r.TryDecodeAsNil() { - x.AgentID = "" - } else { - x.AgentID = (string)(r.DecodeString()) - } - case "HostData": - if r.TryDecodeAsNil() { - if true && x.HostData != nil { - x.HostData = nil - } - } else { - if x.HostData == nil { - x.HostData = new(pkg12_host.HostData) - } - - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.HostData)); yyxt6 != nil { - z.DecExtension(x.HostData, yyxt6) - } else { - z.DecFallback(x.HostData, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *HostDataResponse) 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.AgentID = "" - } else { - x.AgentID = (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.HostData != nil { - x.HostData = nil - } - } else { - if x.HostData == nil { - x.HostData = new(pkg12_host.HostData) - } - - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.HostData)); yyxt10 != nil { - z.DecExtension(x.HostData, yyxt10) - } else { - z.DecFallback(x.HostData, 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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.NodeEvents = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoNodeEvent((*map[string][]*NodeEvent)(&x.NodeEvents), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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 { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringstring((*map[string]string)(&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 DrainStatus) 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 *DrainStatus) 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 = (DrainStatus)(r.DecodeString()) - } -} - -func (x *DrainMetadata) 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().TimeNotBuiltin { - r.EncodeTime(x.StartedAt) - } else if yyxt4 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt4 != nil { - z.EncExtension(x.StartedAt, yyxt4) - } 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 yyxt5 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt5 != nil { - z.EncExtension(x.StartedAt, yyxt5) - } 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.UpdatedAt) - } else if yyxt7 := z.Extension(z.I2Rtid(x.UpdatedAt)); yyxt7 != nil { - z.EncExtension(x.UpdatedAt, yyxt7) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.UpdatedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.UpdatedAt) - } else { - z.EncFallback(x.UpdatedAt) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdatedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdatedAt`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.UpdatedAt) - } else if yyxt8 := z.Extension(z.I2Rtid(x.UpdatedAt)); yyxt8 != nil { - z.EncExtension(x.UpdatedAt, yyxt8) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.UpdatedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.UpdatedAt) - } else { - z.EncFallback(x.UpdatedAt) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Status.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - x.Status.CodecEncodeSelf(e) - } - 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 x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DrainMetadata) 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 *DrainMetadata) 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 "StartedAt": - if r.TryDecodeAsNil() { - x.StartedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StartedAt = r.DecodeTime() - } else if yyxt5 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt5 != nil { - z.DecExtension(x.StartedAt, yyxt5) - } 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 "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.UpdatedAt = r.DecodeTime() - } else if yyxt7 := z.Extension(z.I2Rtid(x.UpdatedAt)); yyxt7 != nil { - z.DecExtension(x.UpdatedAt, yyxt7) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.UpdatedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.UpdatedAt) - } else { - z.DecFallback(&x.UpdatedAt, false) - } - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status.CodecDecodeSelf(d) - } - case "AccessorID": - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DrainMetadata) 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.StartedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StartedAt = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt14 != nil { - z.DecExtension(x.StartedAt, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StartedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StartedAt) - } else { - z.DecFallback(&x.StartedAt, false) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.UpdatedAt = r.DecodeTime() - } else if yyxt16 := z.Extension(z.I2Rtid(x.UpdatedAt)); yyxt16 != nil { - z.DecExtension(x.UpdatedAt, yyxt16) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.UpdatedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.UpdatedAt) - } else { - z.DecFallback(&x.UpdatedAt, false) - } - } - 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.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), 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 *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(33) - } else { - r.WriteMapStart(33) - } - 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.CgroupParent))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CgroupParent)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CgroupParent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CgroupParent`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CgroupParent))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CgroupParent)) - } - } - } - 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 { - h.encMapstringstring((map[string]string)(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.encMapstringstring((map[string]string)(x.Attributes), e) - } - } - } - var yyn27 bool - if x.NodeResources == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - 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 yyn27 { - r.EncodeNil() - } else { - if x.NodeResources == nil { - r.EncodeNil() - } else { - x.NodeResources.CodecEncodeSelf(e) - } - } - } - var yyn30 bool - if x.ReservedResources == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - 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 yyn30 { - r.EncodeNil() - } else { - if x.ReservedResources == nil { - r.EncodeNil() - } else { - x.ReservedResources.CodecEncodeSelf(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.Reserved == nil { - yyn36 = true - goto LABEL36 - } - LABEL36: - if yyr2 || yy2arr2 { - if yyn36 { - 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 yyn36 { - 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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Links), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } - 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)) - } - } - } - var yyn54 bool - if x.DrainStrategy == nil { - yyn54 = true - goto LABEL54 - } - LABEL54: - if yyr2 || yy2arr2 { - if yyn54 { - 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 yyn54 { - 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.CSIControllerPlugins == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.CSIControllerPlugins), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CSIControllerPlugins\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CSIControllerPlugins`) - } - r.WriteMapElemValue() - if x.CSIControllerPlugins == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.CSIControllerPlugins), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.CSINodePlugins == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.CSINodePlugins), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CSINodePlugins\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CSINodePlugins`) - } - r.WriteMapElemValue() - if x.CSINodePlugins == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoCSIInfo((map[string]*CSIInfo)(x.CSINodePlugins), 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 x.HostNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoClientHostNetworkConfig((map[string]*ClientHostNetworkConfig)(x.HostNetworks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostNetworks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HostNetworks`) - } - r.WriteMapElemValue() - if x.HostNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoClientHostNetworkConfig((map[string]*ClientHostNetworkConfig)(x.HostNetworks), e) - } - } - } - var yyn87 bool - if x.LastDrain == nil { - yyn87 = true - goto LABEL87 - } - LABEL87: - if yyr2 || yy2arr2 { - if yyn87 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.LastDrain == nil { - r.EncodeNil() - } else { - x.LastDrain.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastDrain\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastDrain`) - } - r.WriteMapElemValue() - if yyn87 { - r.EncodeNil() - } else { - if x.LastDrain == nil { - r.EncodeNil() - } else { - x.LastDrain.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.LastMissedHeartbeatIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastMissedHeartbeatIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastMissedHeartbeatIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.LastMissedHeartbeatIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.LastAllocUpdateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastAllocUpdateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastAllocUpdateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.LastAllocUpdateIndex)) - } - } - 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 "CgroupParent": - if r.TryDecodeAsNil() { - x.CgroupParent = "" - } else { - x.CgroupParent = (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 { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringstring((*map[string]string)(&x.Links), d) - } - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "NodeClass": - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - case "NodePool": - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - case "ComputedClass": - if r.TryDecodeAsNil() { - x.ComputedClass = "" - } else { - x.ComputedClass = (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 "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 "CSIControllerPlugins": - if r.TryDecodeAsNil() { - x.CSIControllerPlugins = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.CSIControllerPlugins), d) - } - } - case "CSINodePlugins": - if r.TryDecodeAsNil() { - x.CSINodePlugins = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.CSINodePlugins), d) - } - } - case "HostVolumes": - if r.TryDecodeAsNil() { - x.HostVolumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostVolumeConfig((*map[string]*ClientHostVolumeConfig)(&x.HostVolumes), d) - } - } - case "HostNetworks": - if r.TryDecodeAsNil() { - x.HostNetworks = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostNetworkConfig((*map[string]*ClientHostNetworkConfig)(&x.HostNetworks), d) - } - } - case "LastDrain": - if r.TryDecodeAsNil() { - if true && x.LastDrain != nil { - x.LastDrain = nil - } - } else { - if x.LastDrain == nil { - x.LastDrain = new(DrainMetadata) - } - - x.LastDrain.CodecDecodeSelf(d) - } - case "LastMissedHeartbeatIndex": - if r.TryDecodeAsNil() { - x.LastMissedHeartbeatIndex = 0 - } else { - x.LastMissedHeartbeatIndex = (uint64)(r.DecodeUint64()) - } - case "LastAllocUpdateIndex": - if r.TryDecodeAsNil() { - x.LastAllocUpdateIndex = 0 - } else { - x.LastAllocUpdateIndex = (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()) - } - 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 yyj46 int - var yyb46 bool - var yyhl46 bool = l >= 0 - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CgroupParent = "" - } else { - x.CgroupParent = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HTTPAddr = "" - } else { - x.HTTPAddr = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSEnabled = false - } else { - x.TLSEnabled = (bool)(r.DecodeBool()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Attributes), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Links = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Links), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ComputedClass = "" - } else { - x.ComputedClass = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusUpdatedAt = 0 - } else { - x.StatusUpdatedAt = (int64)(r.DecodeInt64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeEvent((*[]*NodeEvent)(&x.Events), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtoDriverInfo((*map[string]*DriverInfo)(&x.Drivers), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CSIControllerPlugins = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.CSIControllerPlugins), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CSINodePlugins = nil - } else { - if false { - } else { - h.decMapstringPtrtoCSIInfo((*map[string]*CSIInfo)(&x.CSINodePlugins), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostVolumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostVolumeConfig((*map[string]*ClientHostVolumeConfig)(&x.HostVolumes), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostNetworks = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostNetworkConfig((*map[string]*ClientHostNetworkConfig)(&x.HostNetworks), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.LastDrain != nil { - x.LastDrain = nil - } - } else { - if x.LastDrain == nil { - x.LastDrain = new(DrainMetadata) - } - - x.LastDrain.CodecDecodeSelf(d) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastMissedHeartbeatIndex = 0 - } else { - x.LastMissedHeartbeatIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastAllocUpdateIndex = 0 - } else { - x.LastAllocUpdateIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj46-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(19) - } else { - r.WriteMapStart(19) - } - 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 x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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.encMapstringstring((map[string]string)(x.Attributes), e) - } - } - } - 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.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } - 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 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) - } - } - } - var yyn45 bool - if x.NodeResources == nil { - yyn45 = true - goto LABEL45 - } - LABEL45: - if yyr2 || yy2arr2 { - if yyn45 { - 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 yyn45 { - r.EncodeNil() - } else { - if x.NodeResources == nil { - r.EncodeNil() - } else { - x.NodeResources.CodecEncodeSelf(e) - } - } - } - var yyn48 bool - if x.ReservedResources == nil { - yyn48 = true - goto LABEL48 - } - LABEL48: - if yyr2 || yy2arr2 { - if yyn48 { - 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 yyn48 { - r.EncodeNil() - } else { - if x.ReservedResources == nil { - r.EncodeNil() - } else { - x.ReservedResources.CodecEncodeSelf(e) - } - } - } - var yyn51 bool - if x.LastDrain == nil { - yyn51 = true - goto LABEL51 - } - LABEL51: - if yyr2 || yy2arr2 { - if yyn51 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.LastDrain == nil { - r.EncodeNil() - } else { - x.LastDrain.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastDrain\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastDrain`) - } - r.WriteMapElemValue() - if yyn51 { - r.EncodeNil() - } else { - if x.LastDrain == nil { - r.EncodeNil() - } else { - x.LastDrain.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 *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 "Attributes": - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Attributes), d) - } - } - 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 "NodePool": - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (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 "HostVolumes": - if r.TryDecodeAsNil() { - x.HostVolumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostVolumeConfig((*map[string]*ClientHostVolumeConfig)(&x.HostVolumes), 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 "LastDrain": - if r.TryDecodeAsNil() { - if true && x.LastDrain != nil { - x.LastDrain = nil - } - } else { - if x.LastDrain == nil { - x.LastDrain = new(DrainMetadata) - } - - x.LastDrain.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 *NodeListStub) 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.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Attributes), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - 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.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtoDriverInfo((*map[string]*DriverInfo)(&x.Drivers), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostVolumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostVolumeConfig((*map[string]*ClientHostVolumeConfig)(&x.HostVolumes), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - 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) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - 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) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.LastDrain != nil { - x.LastDrain = nil - } - } else { - if x.LastDrain == nil { - x.LastDrain = new(DrainMetadata) - } - - x.LastDrain.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj26-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeStubFields) 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.Resources)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Resources)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.OS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.OS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeStubFields) 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 *NodeStubFields) 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 "Resources": - if r.TryDecodeAsNil() { - x.Resources = false - } else { - x.Resources = (bool)(r.DecodeBool()) - } - case "OS": - if r.TryDecodeAsNil() { - x.OS = false - } else { - x.OS = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeStubFields) 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.Resources = false - } else { - x.Resources = (bool)(r.DecodeBool()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.OS = false - } else { - x.OS = (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 *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(10) - } else { - r.WriteMapStart(10) - } - 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.Cores)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cores`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Cores)) - } - } - 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.MemoryMaxMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryMaxMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryMaxMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MemoryMaxMB)) - } - } - 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) - } - } - var yyn27 bool - if x.NUMA == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NUMA == nil { - r.EncodeNil() - } else { - x.NUMA.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NUMA\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NUMA`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.NUMA == nil { - r.EncodeNil() - } else { - x.NUMA.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.SecretsMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SecretsMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SecretsMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.SecretsMB)) - } - } - 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 "Cores": - if r.TryDecodeAsNil() { - x.Cores = 0 - } else { - x.Cores = (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 "MemoryMaxMB": - if r.TryDecodeAsNil() { - x.MemoryMaxMB = 0 - } else { - x.MemoryMaxMB = (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) - } - case "NUMA": - if r.TryDecodeAsNil() { - if true && x.NUMA != nil { - x.NUMA = nil - } - } else { - if x.NUMA == nil { - x.NUMA = new(NUMA) - } - - x.NUMA.CodecDecodeSelf(d) - } - case "SecretsMB": - if r.TryDecodeAsNil() { - x.SecretsMB = 0 - } else { - x.SecretsMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 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.CPU = 0 - } else { - x.CPU = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cores = 0 - } else { - x.Cores = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMaxMB = 0 - } else { - x.MemoryMaxMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IOPS = 0 - } else { - x.IOPS = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - x.Devices.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NUMA != nil { - x.NUMA = nil - } - } else { - if x.NUMA == nil { - x.NUMA = new(NUMA) - } - - x.NUMA.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretsMB = 0 - } else { - x.SecretsMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-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 *NodeNetworkResource) 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.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.MacAddress))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.MacAddress)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MacAddress\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MacAddress`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.MacAddress))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.MacAddress)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Speed)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Speed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Speed`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Speed)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Addresses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceNodeNetworkAddress(([]NodeNetworkAddress)(x.Addresses), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Addresses\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Addresses`) - } - r.WriteMapElemValue() - if x.Addresses == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceNodeNetworkAddress(([]NodeNetworkAddress)(x.Addresses), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeNetworkResource) 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 *NodeNetworkResource) 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 "MacAddress": - if r.TryDecodeAsNil() { - x.MacAddress = "" - } else { - x.MacAddress = (string)(r.DecodeString()) - } - case "Speed": - if r.TryDecodeAsNil() { - x.Speed = 0 - } else { - x.Speed = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Addresses": - if r.TryDecodeAsNil() { - x.Addresses = nil - } else { - if false { - } else { - h.decSliceNodeNetworkAddress((*[]NodeNetworkAddress)(&x.Addresses), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeNetworkResource) 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.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Device = "" - } else { - x.Device = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MacAddress = "" - } else { - x.MacAddress = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Speed = 0 - } else { - x.Speed = (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.Addresses = nil - } else { - if false { - } else { - h.decSliceNodeNetworkAddress((*[]NodeNetworkAddress)(&x.Addresses), 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 NodeNetworkAF) 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 *NodeNetworkAF) 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 = (NodeNetworkAF)(r.DecodeString()) - } -} - -func (x *NodeNetworkAddress) 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.Family.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Family\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Family`) - } - r.WriteMapElemValue() - x.Family.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Alias))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Alias)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Alias\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Alias`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Alias))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Alias)) - } - } - } - 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.ReservedPorts))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReservedPorts)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedPorts`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReservedPorts))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReservedPorts)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Gateway))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Gateway)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Gateway\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Gateway`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Gateway))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Gateway)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeNetworkAddress) 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 *NodeNetworkAddress) 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 "Family": - if r.TryDecodeAsNil() { - x.Family = "" - } else { - x.Family.CodecDecodeSelf(d) - } - case "Alias": - if r.TryDecodeAsNil() { - x.Alias = "" - } else { - x.Alias = (string)(r.DecodeString()) - } - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - case "ReservedPorts": - if r.TryDecodeAsNil() { - x.ReservedPorts = "" - } else { - x.ReservedPorts = (string)(r.DecodeString()) - } - case "Gateway": - if r.TryDecodeAsNil() { - x.Gateway = "" - } else { - x.Gateway = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeNetworkAddress) 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.Family = "" - } else { - x.Family.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Alias = "" - } else { - x.Alias = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedPorts = "" - } else { - x.ReservedPorts = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Gateway = "" - } else { - x.Gateway = (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 *AllocatedPortMapping) 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 = [5]bool{ // should field at this index be written? - x.Label != "", // Label - x.Value != 0, // Value - x.To != 0, // To - x.HostIP != "", // HostIP - x.IgnoreCollision, // IgnoreCollision - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } 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.Label))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Label)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - 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 yyq2[1] { - if false { - } else { - r.EncodeInt(int64(x.Value)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[1] { - 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 yyq2[2] { - if false { - } else { - r.EncodeInt(int64(x.To)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[2] { - 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.WriteArrayElem() - if yyq2[3] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HostIP))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HostIP)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[3] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostIP\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HostIP`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HostIP))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HostIP)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[4] { - if false { - } else { - r.EncodeBool(bool(x.IgnoreCollision)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IgnoreCollision\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IgnoreCollision`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IgnoreCollision)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedPortMapping) 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 *AllocatedPortMapping) 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)) - } - case "HostIP": - if r.TryDecodeAsNil() { - x.HostIP = "" - } else { - x.HostIP = (string)(r.DecodeString()) - } - case "IgnoreCollision": - if r.TryDecodeAsNil() { - x.IgnoreCollision = false - } else { - x.IgnoreCollision = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedPortMapping) 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.Label = "" - } else { - x.Label = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Value = 0 - } else { - x.Value = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.To = 0 - } else { - x.To = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostIP = "" - } else { - x.HostIP = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IgnoreCollision = false - } else { - x.IgnoreCollision = (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 AllocatedPorts) 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.encAllocatedPorts((AllocatedPorts)(x), e) - } - } -} - -func (x *AllocatedPorts) 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.decAllocatedPorts((*AllocatedPorts)(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' - var yyq2 = [5]bool{ // should field at this index be written? - x.Label != "", // Label - x.Value != 0, // Value - x.To != 0, // To - x.HostNetwork != "", // HostNetwork - x.IgnoreCollision, // IgnoreCollision - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } 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.Label))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Label)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - 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 yyq2[1] { - if false { - } else { - r.EncodeInt(int64(x.Value)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[1] { - 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 yyq2[2] { - if false { - } else { - r.EncodeInt(int64(x.To)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[2] { - 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.WriteArrayElem() - if yyq2[3] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HostNetwork))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HostNetwork)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[3] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostNetwork\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HostNetwork`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HostNetwork))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HostNetwork)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[4] { - if false { - } else { - r.EncodeBool(bool(x.IgnoreCollision)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IgnoreCollision\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IgnoreCollision`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IgnoreCollision)) - } - } - } - 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)) - } - case "HostNetwork": - if r.TryDecodeAsNil() { - x.HostNetwork = "" - } else { - x.HostNetwork = (string)(r.DecodeString()) - } - case "IgnoreCollision": - if r.TryDecodeAsNil() { - x.IgnoreCollision = false - } else { - x.IgnoreCollision = (bool)(r.DecodeBool()) - } - 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 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.Label = "" - } else { - x.Label = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Value = 0 - } else { - x.Value = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.To = 0 - } else { - x.To = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostNetwork = "" - } else { - x.HostNetwork = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IgnoreCollision = false - } else { - x.IgnoreCollision = (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 *DNSConfig) 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.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Servers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Searches == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Searches), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Searches\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Searches`) - } - r.WriteMapElemValue() - if x.Searches == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Searches), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Options == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Options), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Options\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Options`) - } - r.WriteMapElemValue() - if x.Options == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Options), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DNSConfig) 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 *DNSConfig) 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.decSlicestring((*[]string)(&x.Servers), d) - } - } - case "Searches": - if r.TryDecodeAsNil() { - x.Searches = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Searches), d) - } - } - case "Options": - if r.TryDecodeAsNil() { - x.Options = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Options), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DNSConfig) 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.Servers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Servers), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Searches = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Searches), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Options = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Options), 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 *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' - var yyq2 = [10]bool{ // should field at this index be written? - x.Mode != "", // Mode - x.Device != "", // Device - x.CIDR != "", // CIDR - x.IP != "", // IP - x.Hostname != "", // Hostname - x.MBits != 0, // MBits - x.DNS != nil, // DNS - len(x.ReservedPorts) != 0, // ReservedPorts - len(x.DynamicPorts) != 0, // DynamicPorts - x.CNI != nil, // CNI - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } 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.Mode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Mode)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - 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 yyq2[1] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Device))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Device)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[1] { - 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 yyq2[2] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CIDR))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CIDR)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[2] { - 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 yyq2[3] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IP))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IP)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[3] { - 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 yyq2[4] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Hostname))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Hostname)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hostname\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hostname`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Hostname))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Hostname)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[5] { - if false { - } else { - r.EncodeInt(int64(x.MBits)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[5] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MBits\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MBits`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MBits)) - } - } - } - var yyn21 bool - if x.DNS == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[6] { - if x.DNS == nil { - r.EncodeNil() - } else { - x.DNS.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[6] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DNS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DNS`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.DNS == nil { - r.EncodeNil() - } else { - x.DNS.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[7] { - if x.ReservedPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePort(([]Port)(x.ReservedPorts), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[7] { - 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 yyq2[8] { - if x.DynamicPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePort(([]Port)(x.DynamicPorts), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[8] { - 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) - } - } - } - } - var yyn30 bool - if x.CNI == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[9] { - if x.CNI == nil { - r.EncodeNil() - } else { - x.CNI.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[9] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CNI\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CNI`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.CNI == nil { - r.EncodeNil() - } else { - x.CNI.CodecEncodeSelf(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 "Hostname": - if r.TryDecodeAsNil() { - x.Hostname = "" - } else { - x.Hostname = (string)(r.DecodeString()) - } - case "MBits": - if r.TryDecodeAsNil() { - x.MBits = 0 - } else { - x.MBits = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "DNS": - if r.TryDecodeAsNil() { - if true && x.DNS != nil { - x.DNS = nil - } - } else { - if x.DNS == nil { - x.DNS = new(DNSConfig) - } - - x.DNS.CodecDecodeSelf(d) - } - 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) - } - } - case "CNI": - if r.TryDecodeAsNil() { - if true && x.CNI != nil { - x.CNI = nil - } - } else { - if x.CNI == nil { - x.CNI = new(CNIConfig) - } - - x.CNI.CodecDecodeSelf(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 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.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Device = "" - } else { - x.Device = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CIDR = "" - } else { - x.CIDR = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IP = "" - } else { - x.IP = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hostname = "" - } else { - x.Hostname = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MBits = 0 - } else { - x.MBits = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DNS != nil { - x.DNS = nil - } - } else { - if x.DNS == nil { - x.DNS = new(DNSConfig) - } - - x.DNS.CodecDecodeSelf(d) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedPorts = nil - } else { - if false { - } else { - h.decSlicePort((*[]Port)(&x.ReservedPorts), d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DynamicPorts = nil - } else { - if false { - } else { - h.decSlicePort((*[]Port)(&x.DynamicPorts), d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.CNI != nil { - x.CNI = nil - } - } else { - if x.CNI == nil { - x.CNI = new(CNIConfig) - } - - x.CNI.CodecDecodeSelf(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 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(9) - } else { - r.WriteMapStart(9) - } - 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.Processors - yy9.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Processors\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Processors`) - } - r.WriteMapElemValue() - yy11 := &x.Processors - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy14 := &x.Memory - yy14.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Memory\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Memory`) - } - r.WriteMapElemValue() - yy16 := &x.Memory - yy16.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy19 := &x.Disk - yy19.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Disk\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Disk`) - } - r.WriteMapElemValue() - yy21 := &x.Disk - yy21.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.WriteArrayElem() - if x.NodeNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeNetworkResource(([]*NodeNetworkResource)(x.NodeNetworks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeNetworks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeNetworks`) - } - r.WriteMapElemValue() - if x.NodeNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeNetworkResource(([]*NodeNetworkResource)(x.NodeNetworks), 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 false { - } else { - r.EncodeInt(int64(x.MinDynamicPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinDynamicPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinDynamicPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MinDynamicPort)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MaxDynamicPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxDynamicPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxDynamicPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxDynamicPort)) - } - } - 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 = LegacyNodeCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - case "Processors": - if r.TryDecodeAsNil() { - x.Processors = NodeProcessorResources{} - } else { - x.Processors.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 "Devices": - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeDeviceResource((*[]*NodeDeviceResource)(&x.Devices), d) - } - } - case "NodeNetworks": - if r.TryDecodeAsNil() { - x.NodeNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeNetworkResource((*[]*NodeNetworkResource)(&x.NodeNetworks), d) - } - } - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - case "MinDynamicPort": - if r.TryDecodeAsNil() { - x.MinDynamicPort = 0 - } else { - x.MinDynamicPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "MaxDynamicPort": - if r.TryDecodeAsNil() { - x.MaxDynamicPort = 0 - } else { - x.MaxDynamicPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 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.Cpu = LegacyNodeCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Processors = NodeProcessorResources{} - } else { - x.Processors.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Memory = NodeMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Disk = NodeDiskResources{} - } else { - x.Disk.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeDeviceResource((*[]*NodeDeviceResource)(&x.Devices), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeNetworkResource((*[]*NodeNetworkResource)(&x.NodeNetworks), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MinDynamicPort = 0 - } else { - x.MinDynamicPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxDynamicPort = 0 - } else { - x.MaxDynamicPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-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]*pkg3_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]*pkg3_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]*pkg3_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]*pkg3_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(2) - } else { - r.WriteMapStart(2) - } - 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.WriteArrayElem() - if x.ReservedCpuCores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ReservedCpuCores), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedCpuCores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedCpuCores`) - } - r.WriteMapElemValue() - if x.ReservedCpuCores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ReservedCpuCores), e) - } - } - } - 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()) - } - case "ReservedCpuCores": - if r.TryDecodeAsNil() { - x.ReservedCpuCores = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ReservedCpuCores), d) - } - } - 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 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.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedCpuCores = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ReservedCpuCores), 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 *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(3) - } else { - r.WriteMapStart(3) - } - 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() - if x.TaskLifecycles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskLifecycleConfig((map[string]*TaskLifecycleConfig)(x.TaskLifecycles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskLifecycles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskLifecycles`) - } - r.WriteMapElemValue() - if x.TaskLifecycles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskLifecycleConfig((map[string]*TaskLifecycleConfig)(x.TaskLifecycles), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy10 := &x.Shared - yy10.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Shared\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Shared`) - } - r.WriteMapElemValue() - yy12 := &x.Shared - yy12.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 "TaskLifecycles": - if r.TryDecodeAsNil() { - x.TaskLifecycles = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskLifecycleConfig((*map[string]*TaskLifecycleConfig)(&x.TaskLifecycles), 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 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.Tasks = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocatedTaskResources((*map[string]*AllocatedTaskResources)(&x.Tasks), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskLifecycles = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskLifecycleConfig((*map[string]*TaskLifecycleConfig)(&x.TaskLifecycles), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Shared = AllocatedSharedResources{} - } else { - x.Shared.CodecDecodeSelf(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 *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(3) - } else { - r.WriteMapStart(3) - } - 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.WriteArrayElem() - if x.Ports == nil { - r.EncodeNil() - } else { - x.Ports.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Ports\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Ports`) - } - r.WriteMapElemValue() - if x.Ports == nil { - r.EncodeNil() - } else { - x.Ports.CodecEncodeSelf(e) - } - } - 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()) - } - case "Ports": - if r.TryDecodeAsNil() { - x.Ports = nil - } else { - x.Ports.CodecDecodeSelf(d) - } - 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 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.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Ports = nil - } else { - x.Ports.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 *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(2) - } else { - r.WriteMapStart(2) - } - 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.WriteArrayElem() - if x.ReservedCores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ReservedCores), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedCores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedCores`) - } - r.WriteMapElemValue() - if x.ReservedCores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceuint16(([]uint16)(x.ReservedCores), e) - } - } - } - 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()) - } - case "ReservedCores": - if r.TryDecodeAsNil() { - x.ReservedCores = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ReservedCores), d) - } - } - 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 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.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedCores = nil - } else { - if false { - } else { - h.decSliceuint16((*[]uint16)(&x.ReservedCores), 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 *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(2) - } else { - r.WriteMapStart(2) - } - 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.MemoryMaxMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryMaxMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryMaxMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MemoryMaxMB)) - } - } - 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()) - } - case "MemoryMaxMB": - if r.TryDecodeAsNil() { - x.MemoryMaxMB = 0 - } else { - x.MemoryMaxMB = (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 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.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMaxMB = 0 - } else { - x.MemoryMaxMB = (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 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 *JobSubmission) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Format))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Format)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Format\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Format`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Format))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Format)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.VariableFlags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.VariableFlags), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VariableFlags\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VariableFlags`) - } - r.WriteMapElemValue() - if x.VariableFlags == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.VariableFlags), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Variables))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Variables)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Variables\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Variables`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Variables))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Variables)) - } - } - } - 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.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.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 *JobSubmission) 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 *JobSubmission) 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 "Source": - if r.TryDecodeAsNil() { - x.Source = "" - } else { - x.Source = (string)(r.DecodeString()) - } - case "Format": - if r.TryDecodeAsNil() { - x.Format = "" - } else { - x.Format = (string)(r.DecodeString()) - } - case "VariableFlags": - if r.TryDecodeAsNil() { - x.VariableFlags = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.VariableFlags), d) - } - } - case "Variables": - if r.TryDecodeAsNil() { - x.Variables = "" - } else { - x.Variables = (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 "Version": - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (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 *JobSubmission) 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.Source = "" - } else { - x.Source = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Format = "" - } else { - x.Format = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableFlags = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.VariableFlags), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Variables = "" - } else { - x.Variables = (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.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.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (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 *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(38) - } else { - r.WriteMapStart(38) - } - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Datacenters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } - 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() - yy49 := &x.Update - yy49.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Update\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Update`) - } - r.WriteMapElemValue() - yy51 := &x.Update - yy51.CodecEncodeSelf(e) - } - var yyn53 bool - if x.Multiregion == nil { - yyn53 = true - goto LABEL53 - } - LABEL53: - if yyr2 || yy2arr2 { - if yyn53 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Multiregion == nil { - r.EncodeNil() - } else { - x.Multiregion.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Multiregion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Multiregion`) - } - r.WriteMapElemValue() - if yyn53 { - r.EncodeNil() - } else { - if x.Multiregion == nil { - r.EncodeNil() - } else { - x.Multiregion.CodecEncodeSelf(e) - } - } - } - var yyn56 bool - if x.Periodic == nil { - yyn56 = true - goto LABEL56 - } - LABEL56: - if yyr2 || yy2arr2 { - if yyn56 { - 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 yyn56 { - r.EncodeNil() - } else { - if x.Periodic == nil { - r.EncodeNil() - } else { - x.Periodic.CodecEncodeSelf(e) - } - } - } - var yyn59 bool - if x.ParameterizedJob == nil { - yyn59 = true - goto LABEL59 - } - LABEL59: - if yyr2 || yy2arr2 { - if yyn59 { - 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 yyn59 { - 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DispatchIdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DispatchIdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DispatchIdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DispatchIdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DispatchIdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DispatchIdempotencyToken)) - } - } - } - 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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConsulToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConsulToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulNamespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConsulNamespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConsulNamespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ConsulNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ConsulNamespace)) - } - } - } - 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.VaultNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultNamespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultNamespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultNamespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultNamespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultNamespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NomadTokenID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NomadTokenID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NomadTokenID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NomadTokenID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NomadTokenID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NomadTokenID)) - } - } - } - 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)) - } - } - var yyn113 bool - if x.UI == nil { - yyn113 = true - goto LABEL113 - } - LABEL113: - if yyr2 || yy2arr2 { - if yyn113 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.UI == nil { - r.EncodeNil() - } else { - x.UI.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UI\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UI`) - } - r.WriteMapElemValue() - if yyn113 { - r.EncodeNil() - } else { - if x.UI == nil { - r.EncodeNil() - } else { - x.UI.CodecEncodeSelf(e) - } - } - } - var yyn116 bool - if x.VersionTag == nil { - yyn116 = true - goto LABEL116 - } - LABEL116: - if yyr2 || yy2arr2 { - if yyn116 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.VersionTag == nil { - r.EncodeNil() - } else { - x.VersionTag.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VersionTag\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VersionTag`) - } - r.WriteMapElemValue() - if yyn116 { - r.EncodeNil() - } else { - if x.VersionTag == nil { - r.EncodeNil() - } else { - x.VersionTag.CodecEncodeSelf(e) - } - } - } - 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 { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - case "NodePool": - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - 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 "Multiregion": - if r.TryDecodeAsNil() { - if true && x.Multiregion != nil { - x.Multiregion = nil - } - } else { - if x.Multiregion == nil { - x.Multiregion = new(Multiregion) - } - - x.Multiregion.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 "DispatchIdempotencyToken": - if r.TryDecodeAsNil() { - x.DispatchIdempotencyToken = "" - } else { - x.DispatchIdempotencyToken = (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 { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "ConsulToken": - if r.TryDecodeAsNil() { - x.ConsulToken = "" - } else { - x.ConsulToken = (string)(r.DecodeString()) - } - case "ConsulNamespace": - if r.TryDecodeAsNil() { - x.ConsulNamespace = "" - } else { - x.ConsulNamespace = (string)(r.DecodeString()) - } - case "VaultToken": - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - case "VaultNamespace": - if r.TryDecodeAsNil() { - x.VaultNamespace = "" - } else { - x.VaultNamespace = (string)(r.DecodeString()) - } - case "NomadTokenID": - if r.TryDecodeAsNil() { - x.NomadTokenID = "" - } else { - x.NomadTokenID = (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()) - } - case "UI": - if r.TryDecodeAsNil() { - if true && x.UI != nil { - x.UI = nil - } - } else { - if x.UI == nil { - x.UI = new(JobUIConfig) - } - - x.UI.CodecDecodeSelf(d) - } - case "VersionTag": - if r.TryDecodeAsNil() { - if true && x.VersionTag != nil { - x.VersionTag = nil - } - } else { - if x.VersionTag == nil { - x.VersionTag = new(JobVersionTag) - } - - x.VersionTag.CodecDecodeSelf(d) - } - 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 yyj49 int - var yyb49 bool - var yyhl49 bool = l >= 0 - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllAtOnce = false - } else { - x.AllAtOnce = (bool)(r.DecodeBool()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Spreads = nil - } else { - if false { - } else { - h.decSlicePtrtoSpread((*[]*Spread)(&x.Spreads), d) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskGroup((*[]*TaskGroup)(&x.TaskGroups), d) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Update = UpdateStrategy{} - } else { - x.Update.CodecDecodeSelf(d) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Multiregion != nil { - x.Multiregion = nil - } - } else { - if x.Multiregion == nil { - x.Multiregion = new(Multiregion) - } - - x.Multiregion.CodecDecodeSelf(d) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - 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) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - 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) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Dispatched = false - } else { - x.Dispatched = (bool)(r.DecodeBool()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DispatchIdempotencyToken = "" - } else { - x.DispatchIdempotencyToken = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ConsulToken = "" - } else { - x.ConsulToken = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ConsulNamespace = "" - } else { - x.ConsulNamespace = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultNamespace = "" - } else { - x.VaultNamespace = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NomadTokenID = "" - } else { - x.NomadTokenID = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stable = false - } else { - x.Stable = (bool)(r.DecodeBool()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.UI != nil { - x.UI = nil - } - } else { - if x.UI == nil { - x.UI = new(JobUIConfig) - } - - x.UI.CodecDecodeSelf(d) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.VersionTag != nil { - x.VersionTag = nil - } - } else { - if x.VersionTag == nil { - x.VersionTag = new(JobVersionTag) - } - - x.VersionTag.CodecDecodeSelf(d) - } - for { - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj49-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobVersionTag) 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.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 { - r.EncodeInt(int64(x.TaggedTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaggedTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaggedTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.TaggedTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobVersionTag) 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 *JobVersionTag) 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 "TaggedTime": - if r.TryDecodeAsNil() { - x.TaggedTime = 0 - } else { - x.TaggedTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobVersionTag) 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.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaggedTime = 0 - } else { - x.TaggedTime = (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 *JobApplyTagRequest) 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.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)) - } - } - } - var yyn9 bool - if x.Tag == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Tag == nil { - r.EncodeNil() - } else { - x.Tag.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tag\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tag`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Tag == nil { - r.EncodeNil() - } else { - x.Tag.CodecEncodeSelf(e) - } - } - } - 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *JobApplyTagRequest) 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 *JobApplyTagRequest) 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 "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Tag": - if r.TryDecodeAsNil() { - if true && x.Tag != nil { - x.Tag = nil - } - } else { - if x.Tag == nil { - x.Tag = new(JobVersionTag) - } - - x.Tag.CodecDecodeSelf(d) - } - case "Version": - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *JobApplyTagRequest) 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.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() { - if true && x.Tag != nil { - x.Tag = nil - } - } else { - if x.Tag == nil { - x.Tag = new(JobVersionTag) - } - - x.Tag.CodecDecodeSelf(d) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *JobTagResponse) 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 { - r.EncodeInt(int64(x.TaggedTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaggedTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaggedTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.TaggedTime)) - } - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobTagResponse) 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 *JobTagResponse) 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 "TaggedTime": - if r.TryDecodeAsNil() { - x.TaggedTime = 0 - } else { - x.TaggedTime = (int64)(r.DecodeInt64()) - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobTagResponse) 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.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.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaggedTime = 0 - } else { - x.TaggedTime = (int64)(r.DecodeInt64()) - } - 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 yyxt18 := z.Extension(z.I2Rtid(x.LastContact)); yyxt18 != nil { - z.DecExtension(x.LastContact, yyxt18) - } 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()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *JobUIConfig) 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.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.Links == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobUILink(([]*JobUILink)(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 { - h.encSlicePtrtoJobUILink(([]*JobUILink)(x.Links), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobUIConfig) 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 *JobUIConfig) 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 "Description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - case "Links": - if r.TryDecodeAsNil() { - x.Links = nil - } else { - if false { - } else { - h.decSlicePtrtoJobUILink((*[]*JobUILink)(&x.Links), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobUIConfig) 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.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Links = nil - } else { - if false { - } else { - h.decSlicePtrtoJobUILink((*[]*JobUILink)(&x.Links), 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 *JobUILink) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Url))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Url)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Url\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Url`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Url))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Url)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobUILink) 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 *JobUILink) 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 "Url": - if r.TryDecodeAsNil() { - x.Url = "" - } else { - x.Url = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobUILink) 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.Label = "" - } else { - x.Label = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Url = "" - } else { - x.Url = (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 *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(20) - } else { - r.WriteMapStart(20) - } - 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.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.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Datacenters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } - var yyn21 bool - if x.Multiregion == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Multiregion == nil { - r.EncodeNil() - } else { - x.Multiregion.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Multiregion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Multiregion`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.Multiregion == nil { - r.EncodeNil() - } else { - x.Multiregion.CodecEncodeSelf(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 yyn45 bool - if x.JobSummary == nil { - yyn45 = true - goto LABEL45 - } - LABEL45: - if yyr2 || yy2arr2 { - if yyn45 { - 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 yyn45 { - 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.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - 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 "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Datacenters": - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - case "NodePool": - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - case "Multiregion": - if r.TryDecodeAsNil() { - if true && x.Multiregion != nil { - x.Multiregion = nil - } - } else { - if x.Multiregion == nil { - x.Multiregion = new(Multiregion) - } - - x.Multiregion.CodecDecodeSelf(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()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - 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 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - 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.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Multiregion != nil { - x.Multiregion = nil - } - } else { - if x.Multiregion == nil { - x.Multiregion = new(Multiregion) - } - - x.Multiregion.CodecDecodeSelf(d) - } - 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.Priority = 0 - } else { - x.Priority = (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.Periodic = false - } else { - x.Periodic = (bool)(r.DecodeBool()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParameterizedJob = false - } else { - x.ParameterizedJob = (bool)(r.DecodeBool()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - 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) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - 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 { - h.decMapstringstring((*map[string]string)(&x.Meta), 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 *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(7) - } else { - r.WriteMapStart(7) - } - 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.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Unknown)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Unknown\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Unknown`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Unknown)) - } - } - 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)) - } - case "Unknown": - if r.TryDecodeAsNil() { - x.Unknown = 0 - } else { - x.Unknown = (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 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.Queued = 0 - } else { - x.Queued = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Complete = 0 - } else { - x.Complete = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Running = 0 - } else { - x.Running = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Starting = 0 - } else { - x.Starting = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Lost = 0 - } else { - x.Lost = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Unknown = 0 - } else { - x.Unknown = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-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 *Multiregion) 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.Strategy == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Strategy == nil { - r.EncodeNil() - } else { - x.Strategy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Strategy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Strategy`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Strategy == nil { - r.EncodeNil() - } else { - x.Strategy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Regions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoMultiregionRegion(([]*MultiregionRegion)(x.Regions), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Regions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Regions`) - } - r.WriteMapElemValue() - if x.Regions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoMultiregionRegion(([]*MultiregionRegion)(x.Regions), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Multiregion) 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 *Multiregion) 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 "Strategy": - if r.TryDecodeAsNil() { - if true && x.Strategy != nil { - x.Strategy = nil - } - } else { - if x.Strategy == nil { - x.Strategy = new(MultiregionStrategy) - } - - x.Strategy.CodecDecodeSelf(d) - } - case "Regions": - if r.TryDecodeAsNil() { - x.Regions = nil - } else { - if false { - } else { - h.decSlicePtrtoMultiregionRegion((*[]*MultiregionRegion)(&x.Regions), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Multiregion) 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.Strategy != nil { - x.Strategy = nil - } - } else { - if x.Strategy == nil { - x.Strategy = new(MultiregionStrategy) - } - - x.Strategy.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Regions = nil - } else { - if false { - } else { - h.decSlicePtrtoMultiregionRegion((*[]*MultiregionRegion)(&x.Regions), 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 *MultiregionStrategy) 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.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.OnFailure))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OnFailure)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OnFailure\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OnFailure`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OnFailure))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OnFailure)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *MultiregionStrategy) 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 *MultiregionStrategy) 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 "OnFailure": - if r.TryDecodeAsNil() { - x.OnFailure = "" - } else { - x.OnFailure = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *MultiregionStrategy) 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.MaxParallel = 0 - } else { - x.MaxParallel = (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.OnFailure = "" - } else { - x.OnFailure = (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 *MultiregionRegion) 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 { - 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)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Datacenters), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePool`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodePool))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodePool)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *MultiregionRegion) 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 *MultiregionRegion) 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 "Datacenters": - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - case "NodePool": - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *MultiregionRegion) 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.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.Count = 0 - } else { - x.Count = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Datacenters), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePool = "" - } else { - x.NodePool = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), 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 *Namespace) 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.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.Quota))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Quota)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Quota\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Quota`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Quota))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Quota)) - } - } - } - var yyn12 bool - if x.Capabilities == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Capabilities == nil { - r.EncodeNil() - } else { - x.Capabilities.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Capabilities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Capabilities`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Capabilities == nil { - r.EncodeNil() - } else { - x.Capabilities.CodecEncodeSelf(e) - } - } - } - var yyn15 bool - if x.NodePoolConfiguration == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodePoolConfiguration == nil { - r.EncodeNil() - } else { - x.NodePoolConfiguration.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePoolConfiguration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePoolConfiguration`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.NodePoolConfiguration == nil { - r.EncodeNil() - } else { - x.NodePoolConfiguration.CodecEncodeSelf(e) - } - } - } - var yyn18 bool - if x.VaultConfiguration == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.VaultConfiguration == nil { - r.EncodeNil() - } else { - x.VaultConfiguration.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultConfiguration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultConfiguration`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.VaultConfiguration == nil { - r.EncodeNil() - } else { - x.VaultConfiguration.CodecEncodeSelf(e) - } - } - } - var yyn21 bool - if x.ConsulConfiguration == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ConsulConfiguration == nil { - r.EncodeNil() - } else { - x.ConsulConfiguration.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConsulConfiguration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConsulConfiguration`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.ConsulConfiguration == nil { - r.EncodeNil() - } else { - x.ConsulConfiguration.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - 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 *Namespace) 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 *Namespace) 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 "Quota": - if r.TryDecodeAsNil() { - x.Quota = "" - } else { - x.Quota = (string)(r.DecodeString()) - } - case "Capabilities": - if r.TryDecodeAsNil() { - if true && x.Capabilities != nil { - x.Capabilities = nil - } - } else { - if x.Capabilities == nil { - x.Capabilities = new(NamespaceCapabilities) - } - - x.Capabilities.CodecDecodeSelf(d) - } - case "NodePoolConfiguration": - if r.TryDecodeAsNil() { - if true && x.NodePoolConfiguration != nil { - x.NodePoolConfiguration = nil - } - } else { - if x.NodePoolConfiguration == nil { - x.NodePoolConfiguration = new(NamespaceNodePoolConfiguration) - } - - x.NodePoolConfiguration.CodecDecodeSelf(d) - } - case "VaultConfiguration": - if r.TryDecodeAsNil() { - if true && x.VaultConfiguration != nil { - x.VaultConfiguration = nil - } - } else { - if x.VaultConfiguration == nil { - x.VaultConfiguration = new(NamespaceVaultConfiguration) - } - - x.VaultConfiguration.CodecDecodeSelf(d) - } - case "ConsulConfiguration": - if r.TryDecodeAsNil() { - if true && x.ConsulConfiguration != nil { - x.ConsulConfiguration = nil - } - } else { - if x.ConsulConfiguration == nil { - x.ConsulConfiguration = new(NamespaceConsulConfiguration) - } - - x.ConsulConfiguration.CodecDecodeSelf(d) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - 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 *Namespace) 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.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Quota = "" - } else { - x.Quota = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Capabilities != nil { - x.Capabilities = nil - } - } else { - if x.Capabilities == nil { - x.Capabilities = new(NamespaceCapabilities) - } - - x.Capabilities.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodePoolConfiguration != nil { - x.NodePoolConfiguration = nil - } - } else { - if x.NodePoolConfiguration == nil { - x.NodePoolConfiguration = new(NamespaceNodePoolConfiguration) - } - - x.NodePoolConfiguration.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.VaultConfiguration != nil { - x.VaultConfiguration = nil - } - } else { - if x.VaultConfiguration == nil { - x.VaultConfiguration = new(NamespaceVaultConfiguration) - } - - x.VaultConfiguration.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ConsulConfiguration != nil { - x.ConsulConfiguration = nil - } - } else { - if x.ConsulConfiguration == nil { - x.ConsulConfiguration = new(NamespaceConsulConfiguration) - } - - x.ConsulConfiguration.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - 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.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 *NamespaceCapabilities) 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.EnabledTaskDrivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.EnabledTaskDrivers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnabledTaskDrivers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnabledTaskDrivers`) - } - r.WriteMapElemValue() - if x.EnabledTaskDrivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.EnabledTaskDrivers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DisabledTaskDrivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DisabledTaskDrivers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisabledTaskDrivers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisabledTaskDrivers`) - } - r.WriteMapElemValue() - if x.DisabledTaskDrivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DisabledTaskDrivers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.EnabledNetworkModes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.EnabledNetworkModes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnabledNetworkModes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnabledNetworkModes`) - } - r.WriteMapElemValue() - if x.EnabledNetworkModes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.EnabledNetworkModes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DisabledNetworkModes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DisabledNetworkModes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisabledNetworkModes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisabledNetworkModes`) - } - r.WriteMapElemValue() - if x.DisabledNetworkModes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DisabledNetworkModes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespaceCapabilities) 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 *NamespaceCapabilities) 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 "EnabledTaskDrivers": - if r.TryDecodeAsNil() { - x.EnabledTaskDrivers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EnabledTaskDrivers), d) - } - } - case "DisabledTaskDrivers": - if r.TryDecodeAsNil() { - x.DisabledTaskDrivers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DisabledTaskDrivers), d) - } - } - case "EnabledNetworkModes": - if r.TryDecodeAsNil() { - x.EnabledNetworkModes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EnabledNetworkModes), d) - } - } - case "DisabledNetworkModes": - if r.TryDecodeAsNil() { - x.DisabledNetworkModes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DisabledNetworkModes), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespaceCapabilities) 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.EnabledTaskDrivers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EnabledTaskDrivers), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisabledTaskDrivers = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DisabledTaskDrivers), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnabledNetworkModes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.EnabledNetworkModes), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisabledNetworkModes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DisabledNetworkModes), 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 *NamespaceNodePoolConfiguration) 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.Default))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Default)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Default\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Default`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Default))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Default)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allowed == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Allowed), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allowed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allowed`) - } - r.WriteMapElemValue() - if x.Allowed == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Allowed), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Denied == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Denied), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Denied\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Denied`) - } - r.WriteMapElemValue() - if x.Denied == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Denied), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespaceNodePoolConfiguration) 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 *NamespaceNodePoolConfiguration) 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 "Default": - if r.TryDecodeAsNil() { - x.Default = "" - } else { - x.Default = (string)(r.DecodeString()) - } - case "Allowed": - if r.TryDecodeAsNil() { - x.Allowed = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allowed), d) - } - } - case "Denied": - if r.TryDecodeAsNil() { - x.Denied = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Denied), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespaceNodePoolConfiguration) 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.Default = "" - } else { - x.Default = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allowed = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Allowed), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Denied = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Denied), 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 *NamespaceListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NamespaceListRequest) 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 *NamespaceListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NamespaceListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *NamespaceListResponse) 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.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespaces\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespaces`) - } - r.WriteMapElemValue() - if x.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespaceListResponse) 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 *NamespaceListResponse) 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 "Namespaces": - if r.TryDecodeAsNil() { - x.Namespaces = nil - } else { - if false { - } else { - h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespaceListResponse) 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.Namespaces = nil - } else { - if false { - } else { - h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NamespaceSpecificRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NamespaceSpecificRequest) 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 *NamespaceSpecificRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NamespaceSpecificRequest) 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *SingleNamespaceResponse) 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.Namespace == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Namespace == nil { - r.EncodeNil() - } else { - x.Namespace.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Namespace == nil { - r.EncodeNil() - } else { - x.Namespace.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleNamespaceResponse) 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 *SingleNamespaceResponse) 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 "Namespace": - if r.TryDecodeAsNil() { - if true && x.Namespace != nil { - x.Namespace = nil - } - } else { - if x.Namespace == nil { - x.Namespace = new(Namespace) - } - - x.Namespace.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleNamespaceResponse) 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.Namespace != nil { - x.Namespace = nil - } - } else { - if x.Namespace == nil { - x.Namespace = new(Namespace) - } - - x.Namespace.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NamespaceSetRequest) 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 x.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Namespaces), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespaces\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespaces`) - } - r.WriteMapElemValue() - if x.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Namespaces), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *NamespaceSetRequest) 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 *NamespaceSetRequest) 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 "Namespaces": - if r.TryDecodeAsNil() { - x.Namespaces = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Namespaces), 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *NamespaceSetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespaces = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Namespaces), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *NamespaceSetResponse) 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.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoNamespace((map[string]*Namespace)(x.Namespaces), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespaces\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespaces`) - } - r.WriteMapElemValue() - if x.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoNamespace((map[string]*Namespace)(x.Namespaces), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespaceSetResponse) 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 *NamespaceSetResponse) 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 "Namespaces": - if r.TryDecodeAsNil() { - x.Namespaces = nil - } else { - if false { - } else { - h.decMapstringPtrtoNamespace((*map[string]*Namespace)(&x.Namespaces), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespaceSetResponse) 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.Namespaces = nil - } else { - if false { - } else { - h.decMapstringPtrtoNamespace((*map[string]*Namespace)(&x.Namespaces), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *NamespaceDeleteRequest) 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.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Namespaces), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespaces\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespaces`) - } - r.WriteMapElemValue() - if x.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Namespaces), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *NamespaceDeleteRequest) 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 *NamespaceDeleteRequest) 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 "Namespaces": - if r.TryDecodeAsNil() { - x.Namespaces = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Namespaces), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NamespaceDeleteRequest) 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.Namespaces = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Namespaces), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NamespaceUpsertRequest) 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.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespaces\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespaces`) - } - r.WriteMapElemValue() - if x.Namespaces == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *NamespaceUpsertRequest) 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 *NamespaceUpsertRequest) 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 "Namespaces": - if r.TryDecodeAsNil() { - x.Namespaces = nil - } else { - if false { - } else { - h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *NamespaceUpsertRequest) 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.Namespaces = nil - } else { - if false { - } else { - h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 x.Specs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Specs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Specs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Specs`) - } - r.WriteMapElemValue() - if x.Specs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Specs), e) - } - } - } - 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 "Specs": - if r.TryDecodeAsNil() { - x.Specs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Specs), d) - } - } - 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 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.Enabled = false - } else { - x.Enabled = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Spec = "" - } else { - x.Spec = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Specs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Specs), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SpecType = "" - } else { - x.SpecType = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProhibitOverlap = false - } else { - x.ProhibitOverlap = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TimeZone = "" - } else { - x.TimeZone = (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 *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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.MetaRequired), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.MetaOptional == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&x.MetaRequired), d) - } - } - case "MetaOptional": - if r.TryDecodeAsNil() { - x.MetaOptional = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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 *TaskLifecycleConfig) 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.Hook))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Hook)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hook\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hook`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Hook))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Hook)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Sidecar)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Sidecar\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Sidecar`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Sidecar)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskLifecycleConfig) 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 *TaskLifecycleConfig) 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 "Hook": - if r.TryDecodeAsNil() { - x.Hook = "" - } else { - x.Hook = (string)(r.DecodeString()) - } - case "Sidecar": - if r.TryDecodeAsNil() { - x.Sidecar = false - } else { - x.Sidecar = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskLifecycleConfig) 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.Hook = "" - } else { - x.Hook = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Sidecar = false - } else { - x.Sidecar = (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 *JobScalingEvents) 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.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 x.ScalingEvents == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoScalingEvent((map[string][]*ScalingEvent)(x.ScalingEvents), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScalingEvents\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScalingEvents`) - } - r.WriteMapElemValue() - if x.ScalingEvents == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoScalingEvent((map[string][]*ScalingEvent)(x.ScalingEvents), e) - } - } - } - 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 *JobScalingEvents) 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 *JobScalingEvents) 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 "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 "ScalingEvents": - if r.TryDecodeAsNil() { - x.ScalingEvents = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoScalingEvent((*map[string][]*ScalingEvent)(&x.ScalingEvents), d) - } - } - 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 *JobScalingEvents) 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.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.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.ScalingEvents = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoScalingEvent((*map[string][]*ScalingEvent)(&x.ScalingEvents), d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (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 *ScalingEvent) 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.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)) - } - } - var yyn6 bool - if x.Count == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Count == nil { - r.EncodeNil() - } else { - yy7 := *x.Count - if false { - } else { - r.EncodeInt(int64(yy7)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Count\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Count`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Count == nil { - r.EncodeNil() - } else { - yy9 := *x.Count - if false { - } else { - r.EncodeInt(int64(yy9)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PreviousCount)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreviousCount\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreviousCount`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PreviousCount)) - } - } - 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 { - r.EncodeBool(bool(x.Error)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Error)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(x.Meta), e) - } - } - } - var yyn23 bool - if x.EvalID == nil { - yyn23 = true - goto LABEL23 - } - LABEL23: - if yyr2 || yy2arr2 { - if yyn23 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.EvalID == nil { - r.EncodeNil() - } else { - yy24 := *x.EvalID - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yy24))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yy24)) - } - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if yyn23 { - r.EncodeNil() - } else { - if x.EvalID == nil { - r.EncodeNil() - } else { - yy26 := *x.EvalID - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yy26))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yy26)) - } - } - } - } - } - 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 *ScalingEvent) 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 *ScalingEvent) 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 "Time": - if r.TryDecodeAsNil() { - x.Time = 0 - } else { - x.Time = (int64)(r.DecodeInt64()) - } - case "Count": - if r.TryDecodeAsNil() { - if true && x.Count != nil { - x.Count = nil - } - } else { - if x.Count == nil { - x.Count = new(int64) - } - - if false { - } else { - *x.Count = (int64)(r.DecodeInt64()) - } - } - case "PreviousCount": - if r.TryDecodeAsNil() { - x.PreviousCount = 0 - } else { - x.PreviousCount = (int64)(r.DecodeInt64()) - } - case "Message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - case "Error": - if r.TryDecodeAsNil() { - x.Error = false - } else { - x.Error = (bool)(r.DecodeBool()) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Meta), d) - } - } - case "EvalID": - if r.TryDecodeAsNil() { - if true && x.EvalID != nil { - x.EvalID = nil - } - } else { - if x.EvalID == nil { - x.EvalID = new(string) - } - - if false { - } else { - *x.EvalID = (string)(r.DecodeString()) - } - } - 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 *ScalingEvent) 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.Time = 0 - } else { - x.Time = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Count != nil { - x.Count = nil - } - } else { - if x.Count == nil { - x.Count = new(int64) - } - - if false { - } else { - *x.Count = (int64)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousCount = 0 - } else { - x.PreviousCount = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Error = false - } else { - x.Error = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Meta), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.EvalID != nil { - x.EvalID = nil - } - } else { - if x.EvalID == nil { - x.EvalID = new(string) - } - - if false { - } else { - *x.EvalID = (string)(r.DecodeString()) - } - } - 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()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *ScalingEventRequest) 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.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 { - 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)) - } - } - } - var yyn12 bool - if x.ScalingEvent == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ScalingEvent == nil { - r.EncodeNil() - } else { - x.ScalingEvent.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScalingEvent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScalingEvent`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.ScalingEvent == nil { - r.EncodeNil() - } else { - x.ScalingEvent.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ScalingEventRequest) 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 *ScalingEventRequest) 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 "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 "TaskGroup": - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - case "ScalingEvent": - if r.TryDecodeAsNil() { - if true && x.ScalingEvent != nil { - x.ScalingEvent = nil - } - } else { - if x.ScalingEvent == nil { - x.ScalingEvent = new(ScalingEvent) - } - - x.ScalingEvent.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ScalingEventRequest) 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.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.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (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.ScalingEvent != nil { - x.ScalingEvent = nil - } - } else { - if x.ScalingEvent == nil { - x.ScalingEvent = new(ScalingEvent) - } - - x.ScalingEvent.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 *ScalingPolicy) 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.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.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.Target == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Target), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Target\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Target`) - } - r.WriteMapElemValue() - if x.Target == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Target), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policy == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(x.Policy), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policy`) - } - r.WriteMapElemValue() - if x.Policy == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringInterface((map[string]interface{})(x.Policy), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Min)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Min\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Min`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Min)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Max)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Max\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Max`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Max)) - } - } - 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 { - 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 *ScalingPolicy) 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 *ScalingPolicy) 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 "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Target": - if r.TryDecodeAsNil() { - x.Target = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Target), d) - } - } - case "Policy": - if r.TryDecodeAsNil() { - x.Policy = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Policy), d) - } - } - case "Min": - if r.TryDecodeAsNil() { - x.Min = 0 - } else { - x.Min = (int64)(r.DecodeInt64()) - } - case "Max": - if r.TryDecodeAsNil() { - x.Max = 0 - } else { - x.Max = (int64)(r.DecodeInt64()) - } - case "Enabled": - if r.TryDecodeAsNil() { - x.Enabled = false - } else { - x.Enabled = (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 *ScalingPolicy) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Target = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Target), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policy = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Policy), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Min = 0 - } else { - x.Min = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Max = 0 - } else { - x.Max = (int64)(r.DecodeInt64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Enabled = false - } else { - x.Enabled = (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 *ScalingPolicyListStub) 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.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.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.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.Target == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Target), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Target\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Target`) - } - r.WriteMapElemValue() - if x.Target == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.Target), 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 *ScalingPolicyListStub) 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 *ScalingPolicyListStub) 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 "Enabled": - if r.TryDecodeAsNil() { - x.Enabled = false - } else { - x.Enabled = (bool)(r.DecodeBool()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Target": - if r.TryDecodeAsNil() { - x.Target = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Target), 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 *ScalingPolicyListStub) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Enabled = false - } else { - x.Enabled = (bool)(r.DecodeBool()) - } - 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.Target = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Target), 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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.RenderTemplates)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RenderTemplates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RenderTemplates`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.RenderTemplates)) - } - } - 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()) - } - case "RenderTemplates": - if r.TryDecodeAsNil() { - x.RenderTemplates = false - } else { - x.RenderTemplates = (bool)(r.DecodeBool()) - } - 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 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.Attempts = 0 - } else { - x.Attempts = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - 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()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.Delay)); yyxt16 != nil { - z.DecExtension(x.Delay, yyxt16) - } else { - x.Delay = (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.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RenderTemplates = false - } else { - x.RenderTemplates = (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 *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(22) - } else { - r.WriteMapStart(22) - } - 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.Scaling == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Scaling == nil { - r.EncodeNil() - } else { - x.Scaling.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Scaling\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Scaling`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.Scaling == nil { - r.EncodeNil() - } else { - x.Scaling.CodecEncodeSelf(e) - } - } - } - var yyn21 bool - if x.RestartPolicy == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - 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 yyn21 { - r.EncodeNil() - } else { - if x.RestartPolicy == nil { - r.EncodeNil() - } else { - x.RestartPolicy.CodecEncodeSelf(e) - } - } - } - var yyn24 bool - if x.Disconnect == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Disconnect == nil { - r.EncodeNil() - } else { - x.Disconnect.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Disconnect\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Disconnect`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Disconnect == nil { - r.EncodeNil() - } else { - x.Disconnect.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 yyn30 bool - if x.EphemeralDisk == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - 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 yyn30 { - 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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - var yyn36 bool - if x.ReschedulePolicy == nil { - yyn36 = true - goto LABEL36 - } - LABEL36: - if yyr2 || yy2arr2 { - if yyn36 { - 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 yyn36 { - 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) - } - } - var yyn48 bool - if x.Consul == nil { - yyn48 = true - goto LABEL48 - } - LABEL48: - if yyr2 || yy2arr2 { - if yyn48 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Consul == nil { - r.EncodeNil() - } else { - x.Consul.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Consul\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Consul`) - } - r.WriteMapElemValue() - if yyn48 { - r.EncodeNil() - } else { - if x.Consul == nil { - r.EncodeNil() - } else { - x.Consul.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) - } - } - } - var yyn57 bool - if x.ShutdownDelay == nil { - yyn57 = true - goto LABEL57 - } - LABEL57: - if yyr2 || yy2arr2 { - if yyn57 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ShutdownDelay == nil { - r.EncodeNil() - } else { - yy58 := *x.ShutdownDelay - if false { - } else if yyxt59 := z.Extension(z.I2Rtid(yy58)); yyxt59 != nil { - z.EncExtension(yy58, yyxt59) - } else { - r.EncodeInt(int64(yy58)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ShutdownDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ShutdownDelay`) - } - r.WriteMapElemValue() - if yyn57 { - r.EncodeNil() - } else { - if x.ShutdownDelay == nil { - r.EncodeNil() - } else { - yy60 := *x.ShutdownDelay - if false { - } else if yyxt61 := z.Extension(z.I2Rtid(yy60)); yyxt61 != nil { - z.EncExtension(yy60, yyxt61) - } else { - r.EncodeInt(int64(yy60)) - } - } - } - } - var yyn62 bool - if x.StopAfterClientDisconnect == nil { - yyn62 = true - goto LABEL62 - } - LABEL62: - if yyr2 || yy2arr2 { - if yyn62 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.StopAfterClientDisconnect == nil { - r.EncodeNil() - } else { - yy63 := *x.StopAfterClientDisconnect - if false { - } else if yyxt64 := z.Extension(z.I2Rtid(yy63)); yyxt64 != nil { - z.EncExtension(yy63, yyxt64) - } else { - r.EncodeInt(int64(yy63)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StopAfterClientDisconnect\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StopAfterClientDisconnect`) - } - r.WriteMapElemValue() - if yyn62 { - r.EncodeNil() - } else { - if x.StopAfterClientDisconnect == nil { - r.EncodeNil() - } else { - yy65 := *x.StopAfterClientDisconnect - if false { - } else if yyxt66 := z.Extension(z.I2Rtid(yy65)); yyxt66 != nil { - z.EncExtension(yy65, yyxt66) - } else { - r.EncodeInt(int64(yy65)) - } - } - } - } - var yyn67 bool - if x.MaxClientDisconnect == nil { - yyn67 = true - goto LABEL67 - } - LABEL67: - if yyr2 || yy2arr2 { - if yyn67 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MaxClientDisconnect == nil { - r.EncodeNil() - } else { - yy68 := *x.MaxClientDisconnect - if false { - } else if yyxt69 := z.Extension(z.I2Rtid(yy68)); yyxt69 != nil { - z.EncExtension(yy68, yyxt69) - } else { - r.EncodeInt(int64(yy68)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxClientDisconnect\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxClientDisconnect`) - } - r.WriteMapElemValue() - if yyn67 { - r.EncodeNil() - } else { - if x.MaxClientDisconnect == nil { - r.EncodeNil() - } else { - yy70 := *x.MaxClientDisconnect - if false { - } else if yyxt71 := z.Extension(z.I2Rtid(yy70)); yyxt71 != nil { - z.EncExtension(yy70, yyxt71) - } else { - r.EncodeInt(int64(yy70)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PreventRescheduleOnLost)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreventRescheduleOnLost\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreventRescheduleOnLost`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PreventRescheduleOnLost)) - } - } - 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 "Scaling": - if r.TryDecodeAsNil() { - if true && x.Scaling != nil { - x.Scaling = nil - } - } else { - if x.Scaling == nil { - x.Scaling = new(ScalingPolicy) - } - - x.Scaling.CodecDecodeSelf(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 "Disconnect": - if r.TryDecodeAsNil() { - if true && x.Disconnect != nil { - x.Disconnect = nil - } - } else { - if x.Disconnect == nil { - x.Disconnect = new(DisconnectStrategy) - } - - x.Disconnect.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 { - h.decMapstringstring((*map[string]string)(&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 "Consul": - if r.TryDecodeAsNil() { - if true && x.Consul != nil { - x.Consul = nil - } - } else { - if x.Consul == nil { - x.Consul = new(Consul) - } - - x.Consul.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) - } - } - 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 yyxt30 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt30 != nil { - z.DecExtension(x.ShutdownDelay, yyxt30) - } else { - *x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - case "StopAfterClientDisconnect": - if r.TryDecodeAsNil() { - if true && x.StopAfterClientDisconnect != nil { - x.StopAfterClientDisconnect = nil - } - } else { - if x.StopAfterClientDisconnect == nil { - x.StopAfterClientDisconnect = new(time.Duration) - } - - if false { - } else if yyxt32 := z.Extension(z.I2Rtid(x.StopAfterClientDisconnect)); yyxt32 != nil { - z.DecExtension(x.StopAfterClientDisconnect, yyxt32) - } else { - *x.StopAfterClientDisconnect = (time.Duration)(r.DecodeInt64()) - } - } - case "MaxClientDisconnect": - if r.TryDecodeAsNil() { - if true && x.MaxClientDisconnect != nil { - x.MaxClientDisconnect = nil - } - } else { - if x.MaxClientDisconnect == nil { - x.MaxClientDisconnect = new(time.Duration) - } - - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(x.MaxClientDisconnect)); yyxt34 != nil { - z.DecExtension(x.MaxClientDisconnect, yyxt34) - } else { - *x.MaxClientDisconnect = (time.Duration)(r.DecodeInt64()) - } - } - case "PreventRescheduleOnLost": - if r.TryDecodeAsNil() { - x.PreventRescheduleOnLost = false - } else { - x.PreventRescheduleOnLost = (bool)(r.DecodeBool()) - } - 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 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.Count = 0 - } else { - x.Count = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - 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) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - 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) - } - 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() { - if true && x.Scaling != nil { - x.Scaling = nil - } - } else { - if x.Scaling == nil { - x.Scaling = new(ScalingPolicy) - } - - x.Scaling.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.RestartPolicy != nil { - x.RestartPolicy = nil - } - } else { - if x.RestartPolicy == nil { - x.RestartPolicy = new(RestartPolicy) - } - - x.RestartPolicy.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.Disconnect != nil { - x.Disconnect = nil - } - } else { - if x.Disconnect == nil { - x.Disconnect = new(DisconnectStrategy) - } - - x.Disconnect.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicePtrtoTask((*[]*Task)(&x.Tasks), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - 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) - } - 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 { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - 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) - } - 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() { - x.Spreads = nil - } else { - if false { - } else { - h.decSlicePtrtoSpread((*[]*Spread)(&x.Spreads), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.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.Consul != nil { - x.Consul = nil - } - } else { - if x.Consul == nil { - x.Consul = new(Consul) - } - - x.Consul.CodecDecodeSelf(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() { - x.Volumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoVolumeRequest((*map[string]*VolumeRequest)(&x.Volumes), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - 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 yyxt63 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt63 != nil { - z.DecExtension(x.ShutdownDelay, yyxt63) - } 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() { - if true && x.StopAfterClientDisconnect != nil { - x.StopAfterClientDisconnect = nil - } - } else { - if x.StopAfterClientDisconnect == nil { - x.StopAfterClientDisconnect = new(time.Duration) - } - - if false { - } else if yyxt65 := z.Extension(z.I2Rtid(x.StopAfterClientDisconnect)); yyxt65 != nil { - z.DecExtension(x.StopAfterClientDisconnect, yyxt65) - } else { - *x.StopAfterClientDisconnect = (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.MaxClientDisconnect != nil { - x.MaxClientDisconnect = nil - } - } else { - if x.MaxClientDisconnect == nil { - x.MaxClientDisconnect = new(time.Duration) - } - - if false { - } else if yyxt67 := z.Extension(z.I2Rtid(x.MaxClientDisconnect)); yyxt67 != nil { - z.DecExtension(x.MaxClientDisconnect, yyxt67) - } else { - *x.MaxClientDisconnect = (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.PreventRescheduleOnLost = false - } else { - x.PreventRescheduleOnLost = (bool)(r.DecodeBool()) - } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj36-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(3) - } else { - r.WriteMapStart(3) - } - 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.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Disabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Disabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Disabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Disabled)) - } - } - 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)) - } - case "Disabled": - if r.TryDecodeAsNil() { - x.Disabled = false - } else { - x.Disabled = (bool)(r.DecodeBool()) - } - 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 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.MaxFiles = 0 - } else { - x.MaxFiles = (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.MaxFileSizeMB = 0 - } else { - x.MaxFileSizeMB = (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.Disabled = false - } else { - x.Disabled = (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 *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(30) - } else { - r.WriteMapStart(30) - } - 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 { - h.encMapstringInterface((map[string]interface{})(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 { - h.encMapstringInterface((map[string]interface{})(x.Config), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Env == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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) - } - } - } - var yyn24 bool - if x.Consul == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Consul == nil { - r.EncodeNil() - } else { - x.Consul.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Consul\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Consul`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Consul == nil { - r.EncodeNil() - } else { - x.Consul.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 yyn36 bool - if x.Resources == nil { - yyn36 = true - goto LABEL36 - } - LABEL36: - if yyr2 || yy2arr2 { - if yyn36 { - 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 yyn36 { - r.EncodeNil() - } else { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } - var yyn39 bool - if x.RestartPolicy == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - 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 yyn39 { - r.EncodeNil() - } else { - if x.RestartPolicy == nil { - r.EncodeNil() - } else { - x.RestartPolicy.CodecEncodeSelf(e) - } - } - } - var yyn42 bool - if x.DispatchPayload == nil { - yyn42 = true - goto LABEL42 - } - LABEL42: - if yyr2 || yy2arr2 { - if yyn42 { - 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 yyn42 { - r.EncodeNil() - } else { - if x.DispatchPayload == nil { - r.EncodeNil() - } else { - x.DispatchPayload.CodecEncodeSelf(e) - } - } - } - var yyn45 bool - if x.Lifecycle == nil { - yyn45 = true - goto LABEL45 - } - LABEL45: - if yyr2 || yy2arr2 { - if yyn45 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Lifecycle == nil { - r.EncodeNil() - } else { - x.Lifecycle.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Lifecycle\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Lifecycle`) - } - r.WriteMapElemValue() - if yyn45 { - r.EncodeNil() - } else { - if x.Lifecycle == nil { - r.EncodeNil() - } else { - x.Lifecycle.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Meta), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt52 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt52 != nil { - z.EncExtension(x.KillTimeout, yyxt52) - } 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 yyxt53 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt53 != nil { - z.EncExtension(x.KillTimeout, yyxt53) - } else { - r.EncodeInt(int64(x.KillTimeout)) - } - } - var yyn54 bool - if x.LogConfig == nil { - yyn54 = true - goto LABEL54 - } - LABEL54: - if yyr2 || yy2arr2 { - if yyn54 { - 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 yyn54 { - 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 yyxt64 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt64 != nil { - z.EncExtension(x.ShutdownDelay, yyxt64) - } 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 yyxt65 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt65 != nil { - z.EncExtension(x.ShutdownDelay, yyxt65) - } 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 x.ScalingPolicies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoScalingPolicy(([]*ScalingPolicy)(x.ScalingPolicies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScalingPolicies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScalingPolicies`) - } - r.WriteMapElemValue() - if x.ScalingPolicies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoScalingPolicy(([]*ScalingPolicy)(x.ScalingPolicies), 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) - } - var yyn78 bool - if x.CSIPluginConfig == nil { - yyn78 = true - goto LABEL78 - } - LABEL78: - if yyr2 || yy2arr2 { - if yyn78 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.CSIPluginConfig == nil { - r.EncodeNil() - } else { - x.CSIPluginConfig.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CSIPluginConfig\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CSIPluginConfig`) - } - r.WriteMapElemValue() - if yyn78 { - r.EncodeNil() - } else { - if x.CSIPluginConfig == nil { - r.EncodeNil() - } else { - x.CSIPluginConfig.CodecEncodeSelf(e) - } - } - } - var yyn81 bool - if x.Identity == nil { - yyn81 = true - goto LABEL81 - } - LABEL81: - if yyr2 || yy2arr2 { - if yyn81 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Identity == nil { - r.EncodeNil() - } else { - x.Identity.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Identity\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Identity`) - } - r.WriteMapElemValue() - if yyn81 { - r.EncodeNil() - } else { - if x.Identity == nil { - r.EncodeNil() - } else { - x.Identity.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Identities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWorkloadIdentity(([]*WorkloadIdentity)(x.Identities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Identities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Identities`) - } - r.WriteMapElemValue() - if x.Identities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWorkloadIdentity(([]*WorkloadIdentity)(x.Identities), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Actions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAction(([]*Action)(x.Actions), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Actions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Actions`) - } - r.WriteMapElemValue() - if x.Actions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAction(([]*Action)(x.Actions), e) - } - } - } - var yyn90 bool - if x.Schedule == nil { - yyn90 = true - goto LABEL90 - } - LABEL90: - if yyr2 || yy2arr2 { - if yyn90 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Schedule == nil { - r.EncodeNil() - } else { - x.Schedule.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Schedule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Schedule`) - } - r.WriteMapElemValue() - if yyn90 { - r.EncodeNil() - } else { - if x.Schedule == nil { - r.EncodeNil() - } else { - x.Schedule.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 { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - case "Env": - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&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 "Consul": - if r.TryDecodeAsNil() { - if true && x.Consul != nil { - x.Consul = nil - } - } else { - if x.Consul == nil { - x.Consul = new(Consul) - } - - x.Consul.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 "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 "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 "Lifecycle": - if r.TryDecodeAsNil() { - if true && x.Lifecycle != nil { - x.Lifecycle = nil - } - } else { - if x.Lifecycle == nil { - x.Lifecycle = new(TaskLifecycleConfig) - } - - x.Lifecycle.CodecDecodeSelf(d) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - case "KillTimeout": - if r.TryDecodeAsNil() { - x.KillTimeout = 0 - } else { - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt28 != nil { - z.DecExtension(x.KillTimeout, yyxt28) - } 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 yyxt34 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt34 != nil { - z.DecExtension(x.ShutdownDelay, yyxt34) - } 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 "ScalingPolicies": - if r.TryDecodeAsNil() { - x.ScalingPolicies = nil - } else { - if false { - } else { - h.decSlicePtrtoScalingPolicy((*[]*ScalingPolicy)(&x.ScalingPolicies), 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) - } - case "CSIPluginConfig": - if r.TryDecodeAsNil() { - if true && x.CSIPluginConfig != nil { - x.CSIPluginConfig = nil - } - } else { - if x.CSIPluginConfig == nil { - x.CSIPluginConfig = new(TaskCSIPluginConfig) - } - - x.CSIPluginConfig.CodecDecodeSelf(d) - } - case "Identity": - if r.TryDecodeAsNil() { - if true && x.Identity != nil { - x.Identity = nil - } - } else { - if x.Identity == nil { - x.Identity = new(WorkloadIdentity) - } - - x.Identity.CodecDecodeSelf(d) - } - case "Identities": - if r.TryDecodeAsNil() { - x.Identities = nil - } else { - if false { - } else { - h.decSlicePtrtoWorkloadIdentity((*[]*WorkloadIdentity)(&x.Identities), d) - } - } - case "Actions": - if r.TryDecodeAsNil() { - x.Actions = nil - } else { - if false { - } else { - h.decSlicePtrtoAction((*[]*Action)(&x.Actions), d) - } - } - case "Schedule": - if r.TryDecodeAsNil() { - if true && x.Schedule != nil { - x.Schedule = nil - } - } else { - if x.Schedule == nil { - x.Schedule = new(TaskSchedule) - } - - x.Schedule.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 yyj48 int - var yyb48 bool - var yyhl48 bool = l >= 0 - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = (string)(r.DecodeString()) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = (string)(r.DecodeString()) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - h.decMapstringInterface((*map[string]interface{})(&x.Config), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Env), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoService((*[]*Service)(&x.Services), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - 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) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Consul != nil { - x.Consul = nil - } - } else { - if x.Consul == nil { - x.Consul = new(Consul) - } - - x.Consul.CodecDecodeSelf(d) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Templates = nil - } else { - if false { - } else { - h.decSlicePtrtoTemplate((*[]*Template)(&x.Templates), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - 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) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - 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) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - 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) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Lifecycle != nil { - x.Lifecycle = nil - } - } else { - if x.Lifecycle == nil { - x.Lifecycle = new(TaskLifecycleConfig) - } - - x.Lifecycle.CodecDecodeSelf(d) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.Meta), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillTimeout = 0 - } else { - if false { - } else if yyxt73 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt73 != nil { - z.DecExtension(x.KillTimeout, yyxt73) - } else { - x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - 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) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Artifacts = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskArtifact((*[]*TaskArtifact)(&x.Artifacts), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ShutdownDelay = 0 - } else { - if false { - } else if yyxt79 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt79 != nil { - z.DecExtension(x.ShutdownDelay, yyxt79) - } else { - x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VolumeMounts = nil - } else { - if false { - } else { - h.decSlicePtrtoVolumeMount((*[]*VolumeMount)(&x.VolumeMounts), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ScalingPolicies = nil - } else { - if false { - } else { - h.decSlicePtrtoScalingPolicy((*[]*ScalingPolicy)(&x.ScalingPolicies), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillSignal = "" - } else { - x.KillSignal = (string)(r.DecodeString()) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind.CodecDecodeSelf(d) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.CSIPluginConfig != nil { - x.CSIPluginConfig = nil - } - } else { - if x.CSIPluginConfig == nil { - x.CSIPluginConfig = new(TaskCSIPluginConfig) - } - - x.CSIPluginConfig.CodecDecodeSelf(d) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Identity != nil { - x.Identity = nil - } - } else { - if x.Identity == nil { - x.Identity = new(WorkloadIdentity) - } - - x.Identity.CodecDecodeSelf(d) - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Identities = nil - } else { - if false { - } else { - h.decSlicePtrtoWorkloadIdentity((*[]*WorkloadIdentity)(&x.Identities), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Actions = nil - } else { - if false { - } else { - h.decSlicePtrtoAction((*[]*Action)(&x.Actions), d) - } - } - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Schedule != nil { - x.Schedule = nil - } - } else { - if x.Schedule == nil { - x.Schedule = new(TaskSchedule) - } - - x.Schedule.CodecDecodeSelf(d) - } - for { - yyj48++ - if yyhl48 { - yyb48 = yyj48 > l - } else { - yyb48 = r.CheckBreak() - } - if yyb48 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj48-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(16) - } else { - r.WriteMapStart(16) - } - 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)) - } - } - } - var yyn18 bool - if x.ChangeScript == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ChangeScript == nil { - r.EncodeNil() - } else { - x.ChangeScript.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ChangeScript\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ChangeScript`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.ChangeScript == nil { - r.EncodeNil() - } else { - x.ChangeScript.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.Splay)); yyxt22 != nil { - z.EncExtension(x.Splay, yyxt22) - } 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 yyxt23 := z.Extension(z.I2Rtid(x.Splay)); yyxt23 != nil { - z.EncExtension(x.Splay, yyxt23) - } 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)) - } - } - } - var yyn27 bool - if x.Uid == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Uid == nil { - r.EncodeNil() - } else { - yy28 := *x.Uid - if false { - } else { - r.EncodeInt(int64(yy28)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Uid\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Uid`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.Uid == nil { - r.EncodeNil() - } else { - yy30 := *x.Uid - if false { - } else { - r.EncodeInt(int64(yy30)) - } - } - } - } - var yyn32 bool - if x.Gid == nil { - yyn32 = true - goto LABEL32 - } - LABEL32: - if yyr2 || yy2arr2 { - if yyn32 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Gid == nil { - r.EncodeNil() - } else { - yy33 := *x.Gid - if false { - } else { - r.EncodeInt(int64(yy33)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Gid\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Gid`) - } - r.WriteMapElemValue() - if yyn32 { - r.EncodeNil() - } else { - if x.Gid == nil { - r.EncodeNil() - } else { - yy35 := *x.Gid - if false { - } else { - r.EncodeInt(int64(yy35)) - } - } - } - } - 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 yyxt47 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt47 != nil { - z.EncExtension(x.VaultGrace, yyxt47) - } 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 yyxt48 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt48 != nil { - z.EncExtension(x.VaultGrace, yyxt48) - } else { - r.EncodeInt(int64(x.VaultGrace)) - } - } - var yyn49 bool - if x.Wait == nil { - yyn49 = true - goto LABEL49 - } - LABEL49: - if yyr2 || yy2arr2 { - if yyn49 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Wait == nil { - r.EncodeNil() - } else { - x.Wait.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Wait\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Wait`) - } - r.WriteMapElemValue() - if yyn49 { - r.EncodeNil() - } else { - if x.Wait == nil { - r.EncodeNil() - } else { - x.Wait.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ErrMissingKey)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ErrMissingKey\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ErrMissingKey`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ErrMissingKey)) - } - } - 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 "ChangeScript": - if r.TryDecodeAsNil() { - if true && x.ChangeScript != nil { - x.ChangeScript = nil - } - } else { - if x.ChangeScript == nil { - x.ChangeScript = new(ChangeScript) - } - - x.ChangeScript.CodecDecodeSelf(d) - } - case "Splay": - if r.TryDecodeAsNil() { - x.Splay = 0 - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.Splay)); yyxt11 != nil { - z.DecExtension(x.Splay, yyxt11) - } else { - x.Splay = (time.Duration)(r.DecodeInt64()) - } - } - case "Perms": - if r.TryDecodeAsNil() { - x.Perms = "" - } else { - x.Perms = (string)(r.DecodeString()) - } - case "Uid": - if r.TryDecodeAsNil() { - if true && x.Uid != nil { - x.Uid = nil - } - } else { - if x.Uid == nil { - x.Uid = new(int) - } - - if false { - } else { - *x.Uid = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - } - case "Gid": - if r.TryDecodeAsNil() { - if true && x.Gid != nil { - x.Gid = nil - } - } else { - if x.Gid == nil { - x.Gid = new(int) - } - - if false { - } else { - *x.Gid = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - } - 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 yyxt21 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt21 != nil { - z.DecExtension(x.VaultGrace, yyxt21) - } else { - x.VaultGrace = (time.Duration)(r.DecodeInt64()) - } - } - case "Wait": - if r.TryDecodeAsNil() { - if true && x.Wait != nil { - x.Wait = nil - } - } else { - if x.Wait == nil { - x.Wait = new(WaitConfig) - } - - x.Wait.CodecDecodeSelf(d) - } - case "ErrMissingKey": - if r.TryDecodeAsNil() { - x.ErrMissingKey = false - } else { - x.ErrMissingKey = (bool)(r.DecodeBool()) - } - 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 yyj24 int - var yyb24 bool - var yyhl24 bool = l >= 0 - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SourcePath = "" - } else { - x.SourcePath = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestPath = "" - } else { - x.DestPath = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EmbeddedTmpl = "" - } else { - x.EmbeddedTmpl = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ChangeScript != nil { - x.ChangeScript = nil - } - } else { - if x.ChangeScript == nil { - x.ChangeScript = new(ChangeScript) - } - - x.ChangeScript.CodecDecodeSelf(d) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Splay = 0 - } else { - if false { - } else if yyxt32 := z.Extension(z.I2Rtid(x.Splay)); yyxt32 != nil { - z.DecExtension(x.Splay, yyxt32) - } else { - x.Splay = (time.Duration)(r.DecodeInt64()) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Perms = "" - } else { - x.Perms = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Uid != nil { - x.Uid = nil - } - } else { - if x.Uid == nil { - x.Uid = new(int) - } - - if false { - } else { - *x.Uid = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Gid != nil { - x.Gid = nil - } - } else { - if x.Gid == nil { - x.Gid = new(int) - } - - if false { - } else { - *x.Gid = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LeftDelim = "" - } else { - x.LeftDelim = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RightDelim = "" - } else { - x.RightDelim = (string)(r.DecodeString()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Envvars = false - } else { - x.Envvars = (bool)(r.DecodeBool()) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultGrace = 0 - } else { - if false { - } else if yyxt42 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt42 != nil { - z.DecExtension(x.VaultGrace, yyxt42) - } else { - x.VaultGrace = (time.Duration)(r.DecodeInt64()) - } - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Wait != nil { - x.Wait = nil - } - } else { - if x.Wait == nil { - x.Wait = new(WaitConfig) - } - - x.Wait.CodecDecodeSelf(d) - } - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ErrMissingKey = false - } else { - x.ErrMissingKey = (bool)(r.DecodeBool()) - } - for { - yyj24++ - if yyhl24 { - yyb24 = yyj24 > l - } else { - yyb24 = r.CheckBreak() - } - if yyb24 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj24-1, "") - } - r.ReadArrayEnd() -} - -func (x *ChangeScript) 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.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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.Args), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Timeout)); yyxt10 != nil { - z.EncExtension(x.Timeout, yyxt10) - } 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 yyxt11 := z.Extension(z.I2Rtid(x.Timeout)); yyxt11 != nil { - z.EncExtension(x.Timeout, yyxt11) - } else { - r.EncodeInt(int64(x.Timeout)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.FailOnError)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailOnError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailOnError`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.FailOnError)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ChangeScript) 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 *ChangeScript) 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 "Command": - if r.TryDecodeAsNil() { - x.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - case "Args": - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), d) - } - } - case "Timeout": - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Timeout)); yyxt8 != nil { - z.DecExtension(x.Timeout, yyxt8) - } else { - x.Timeout = (time.Duration)(r.DecodeInt64()) - } - } - case "FailOnError": - if r.TryDecodeAsNil() { - x.FailOnError = false - } else { - x.FailOnError = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ChangeScript) 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.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Args), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.Timeout)); yyxt15 != nil { - z.DecExtension(x.Timeout, yyxt15) - } else { - x.Timeout = (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.FailOnError = false - } else { - x.FailOnError = (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 *WaitConfig) 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.Min == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Min == nil { - r.EncodeNil() - } else { - yy4 := *x.Min - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(yy4)); yyxt5 != nil { - z.EncExtension(yy4, yyxt5) - } else { - r.EncodeInt(int64(yy4)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Min\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Min`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Min == nil { - r.EncodeNil() - } else { - yy6 := *x.Min - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(yy6)); yyxt7 != nil { - z.EncExtension(yy6, yyxt7) - } else { - r.EncodeInt(int64(yy6)) - } - } - } - } - var yyn8 bool - if x.Max == nil { - yyn8 = true - goto LABEL8 - } - LABEL8: - if yyr2 || yy2arr2 { - if yyn8 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Max == nil { - r.EncodeNil() - } else { - yy9 := *x.Max - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(yy9)); yyxt10 != nil { - z.EncExtension(yy9, yyxt10) - } else { - r.EncodeInt(int64(yy9)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Max\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Max`) - } - r.WriteMapElemValue() - if yyn8 { - r.EncodeNil() - } else { - if x.Max == nil { - r.EncodeNil() - } else { - yy11 := *x.Max - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(yy11)); yyxt12 != nil { - z.EncExtension(yy11, yyxt12) - } else { - r.EncodeInt(int64(yy11)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WaitConfig) 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 *WaitConfig) 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 "Min": - if r.TryDecodeAsNil() { - if true && x.Min != nil { - x.Min = nil - } - } else { - if x.Min == nil { - x.Min = new(time.Duration) - } - - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Min)); yyxt5 != nil { - z.DecExtension(x.Min, yyxt5) - } else { - *x.Min = (time.Duration)(r.DecodeInt64()) - } - } - case "Max": - if r.TryDecodeAsNil() { - if true && x.Max != nil { - x.Max = nil - } - } else { - if x.Max == nil { - x.Max = new(time.Duration) - } - - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Max)); yyxt7 != nil { - z.DecExtension(x.Max, yyxt7) - } else { - *x.Max = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WaitConfig) 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() { - if true && x.Min != nil { - x.Min = nil - } - } else { - if x.Min == nil { - x.Min = new(time.Duration) - } - - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Min)); yyxt10 != nil { - z.DecExtension(x.Min, yyxt10) - } else { - *x.Min = (time.Duration)(r.DecodeInt64()) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Max != nil { - x.Max = nil - } - } else { - if x.Max == nil { - x.Max = new(time.Duration) - } - - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.Max)); yyxt12 != nil { - z.DecExtension(x.Max, yyxt12) - } else { - *x.Max = (time.Duration)(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 AllocStateField) 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 *AllocStateField) 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 = (AllocStateField)(z.C.UintV(r.DecodeUint64(), 8)) - } -} - -func (x *AllocState) 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() - x.Field.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Field\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Field`) - } - r.WriteMapElemValue() - x.Field.CodecEncodeSelf(e) - } - 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 if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Time) - } else if yyxt10 := z.Extension(z.I2Rtid(x.Time)); yyxt10 != nil { - z.EncExtension(x.Time, yyxt10) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Time) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Time) - } else { - z.EncFallback(x.Time) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Time\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Time`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Time) - } else if yyxt11 := z.Extension(z.I2Rtid(x.Time)); yyxt11 != nil { - z.EncExtension(x.Time, yyxt11) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Time) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Time) - } else { - z.EncFallback(x.Time) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocState) 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 *AllocState) 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 "Field": - if r.TryDecodeAsNil() { - x.Field = 0 - } else { - x.Field.CodecDecodeSelf(d) - } - case "Value": - if r.TryDecodeAsNil() { - x.Value = "" - } else { - x.Value = (string)(r.DecodeString()) - } - case "Time": - if r.TryDecodeAsNil() { - x.Time = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Time = r.DecodeTime() - } else if yyxt7 := z.Extension(z.I2Rtid(x.Time)); yyxt7 != nil { - z.DecExtension(x.Time, yyxt7) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Time) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Time) - } else { - z.DecFallback(&x.Time, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocState) 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.Field = 0 - } else { - x.Field.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Value = "" - } else { - x.Value = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Time = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Time = r.DecodeTime() - } else if yyxt12 := z.Extension(z.I2Rtid(x.Time)); yyxt12 != nil { - z.DecExtension(x.Time, yyxt12) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Time) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Time) - } else { - z.DecFallback(&x.Time, false) - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskHandle) 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.Version)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Version\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Version`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Version)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DriverState == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.DriverState)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DriverState\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DriverState`) - } - r.WriteMapElemValue() - if x.DriverState == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.DriverState)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskHandle) 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 *TaskHandle) 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 "Version": - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "DriverState": - if r.TryDecodeAsNil() { - x.DriverState = nil - } else { - if false { - } else { - x.DriverState = r.DecodeBytes(([]byte)(x.DriverState), false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskHandle) 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.Version = 0 - } else { - x.Version = (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.DriverState = nil - } else { - if false { - } else { - x.DriverState = r.DecodeBytes(([]byte)(x.DriverState), 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 *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(9) - } else { - r.WriteMapStart(9) - } - 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) - } - } - } - var yyn24 bool - if x.TaskHandle == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.TaskHandle == nil { - r.EncodeNil() - } else { - x.TaskHandle.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskHandle\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskHandle`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.TaskHandle == nil { - r.EncodeNil() - } else { - x.TaskHandle.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Paused.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Paused\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Paused`) - } - r.WriteMapElemValue() - x.Paused.CodecEncodeSelf(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) - } - } - case "TaskHandle": - if r.TryDecodeAsNil() { - if true && x.TaskHandle != nil { - x.TaskHandle = nil - } - } else { - if x.TaskHandle == nil { - x.TaskHandle = new(TaskHandle) - } - - x.TaskHandle.CodecDecodeSelf(d) - } - case "Paused": - if r.TryDecodeAsNil() { - x.Paused = "" - } else { - x.Paused.CodecDecodeSelf(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 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.State = "" - } else { - x.State = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Failed = false - } else { - x.Failed = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Restarts = 0 - } else { - x.Restarts = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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 yyxt22 := z.Extension(z.I2Rtid(x.LastRestart)); yyxt22 != nil { - z.DecExtension(x.LastRestart, yyxt22) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.LastRestart) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.LastRestart) - } else { - z.DecFallback(&x.LastRestart, false) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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 yyxt24 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt24 != nil { - z.DecExtension(x.StartedAt, yyxt24) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StartedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StartedAt) - } else { - z.DecFallback(&x.StartedAt, false) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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 yyxt26 := z.Extension(z.I2Rtid(x.FinishedAt)); yyxt26 != nil { - z.DecExtension(x.FinishedAt, yyxt26) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.FinishedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.FinishedAt) - } else { - z.DecFallback(&x.FinishedAt, false) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskEvent((*[]*TaskEvent)(&x.Events), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.TaskHandle != nil { - x.TaskHandle = nil - } - } else { - if x.TaskHandle == nil { - x.TaskHandle = new(TaskHandle) - } - - x.TaskHandle.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Paused = "" - } else { - x.Paused.CodecDecodeSelf(d) - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(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 { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringstring((*map[string]string)(&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(7) - } else { - r.WriteMapStart(7) - } - 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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.GetterOptions), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.GetterHeaders == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.GetterHeaders), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GetterHeaders\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GetterHeaders`) - } - r.WriteMapElemValue() - if x.GetterHeaders == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.GetterHeaders), 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 { - r.EncodeBool(bool(x.GetterInsecure)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GetterInsecure\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GetterInsecure`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.GetterInsecure)) - } - } - 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.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Chown)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Chown\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Chown`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Chown)) - } - } - 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 { - h.decMapstringstring((*map[string]string)(&x.GetterOptions), d) - } - } - case "GetterHeaders": - if r.TryDecodeAsNil() { - x.GetterHeaders = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.GetterHeaders), d) - } - } - case "GetterMode": - if r.TryDecodeAsNil() { - x.GetterMode = "" - } else { - x.GetterMode = (string)(r.DecodeString()) - } - case "GetterInsecure": - if r.TryDecodeAsNil() { - x.GetterInsecure = false - } else { - x.GetterInsecure = (bool)(r.DecodeBool()) - } - case "RelativeDest": - if r.TryDecodeAsNil() { - x.RelativeDest = "" - } else { - x.RelativeDest = (string)(r.DecodeString()) - } - case "Chown": - if r.TryDecodeAsNil() { - x.Chown = false - } else { - x.Chown = (bool)(r.DecodeBool()) - } - 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 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.GetterSource = "" - } else { - x.GetterSource = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterOptions = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.GetterOptions), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterHeaders = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.GetterHeaders), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterMode = "" - } else { - x.GetterMode = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterInsecure = false - } else { - x.GetterInsecure = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RelativeDest = "" - } else { - x.RelativeDest = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Chown = false - } else { - x.Chown = (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 *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(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Role))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Role)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Role\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Role`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Role))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Role)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Policies), e) - } - } - } - 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.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cluster\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cluster`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Cluster))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Cluster)) - } - } - } - 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 { - r.EncodeBool(bool(x.DisableFile)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisableFile\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisableFile`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.DisableFile)) - } - } - 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 { - r.EncodeBool(bool(x.AllowTokenExpiration)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowTokenExpiration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowTokenExpiration`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowTokenExpiration)) - } - } - 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 "Role": - if r.TryDecodeAsNil() { - x.Role = "" - } else { - x.Role = (string)(r.DecodeString()) - } - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Cluster": - if r.TryDecodeAsNil() { - x.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - case "Env": - if r.TryDecodeAsNil() { - x.Env = false - } else { - x.Env = (bool)(r.DecodeBool()) - } - case "DisableFile": - if r.TryDecodeAsNil() { - x.DisableFile = false - } else { - x.DisableFile = (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()) - } - case "AllowTokenExpiration": - if r.TryDecodeAsNil() { - x.AllowTokenExpiration = false - } else { - x.AllowTokenExpiration = (bool)(r.DecodeBool()) - } - 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 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.Role = "" - } else { - x.Role = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.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.Cluster = "" - } else { - x.Cluster = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = false - } else { - x.Env = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisableFile = false - } else { - x.DisableFile = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowTokenExpiration = false - } else { - x.AllowTokenExpiration = (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 *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(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.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 false { - } else { - r.EncodeBool(bool(x.IsMultiregion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IsMultiregion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IsMultiregion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IsMultiregion)) - } - } - 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.EncodeInt(int64(x.EvalPriority)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalPriority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalPriority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.EvalPriority)) - } - } - 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 *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 "IsMultiregion": - if r.TryDecodeAsNil() { - x.IsMultiregion = false - } else { - x.IsMultiregion = (bool)(r.DecodeBool()) - } - 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 "EvalPriority": - if r.TryDecodeAsNil() { - x.EvalPriority = 0 - } else { - x.EvalPriority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - 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 *Deployment) 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.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (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.JobSpecModifyIndex = 0 - } else { - x.JobSpecModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IsMultiregion = false - } else { - x.IsMultiregion = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decMapstringPtrtoDeploymentState((*map[string]*DeploymentState)(&x.TaskGroups), d) - } - } - 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() { - x.EvalPriority = 0 - } else { - x.EvalPriority = (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.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.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (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 *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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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 { - h.decSlicestring((*[]string)(&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(4) - } else { - r.WriteMapStart(4) - } - 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.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.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()) - } - case "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - 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 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.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (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 *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(2) - } else { - r.WriteMapStart(2) - } - 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.WriteArrayElem() - x.LastReschedule.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastReschedule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastReschedule`) - } - r.WriteMapElemValue() - x.LastReschedule.CodecEncodeSelf(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) - } - } - case "LastReschedule": - if r.TryDecodeAsNil() { - x.LastReschedule = "" - } else { - x.LastReschedule.CodecDecodeSelf(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 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.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoRescheduleEvent((*[]*RescheduleEvent)(&x.Events), d) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastReschedule = "" - } else { - x.LastReschedule.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 RescheduleTrackerAnnotation) 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 *RescheduleTrackerAnnotation) 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 = (RescheduleTrackerAnnotation)(r.DecodeString()) - } -} - -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(4) - } else { - r.WriteMapStart(4) - } - 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)) - } - } - } - } - var yyn18 bool - if x.NoShutdownDelay == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NoShutdownDelay == nil { - r.EncodeNil() - } else { - yy19 := *x.NoShutdownDelay - if false { - } else { - r.EncodeBool(bool(yy19)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NoShutdownDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NoShutdownDelay`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.NoShutdownDelay == nil { - r.EncodeNil() - } else { - yy21 := *x.NoShutdownDelay - if false { - } else { - r.EncodeBool(bool(yy21)) - } - } - } - } - 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()) - } - } - case "NoShutdownDelay": - if r.TryDecodeAsNil() { - if true && x.NoShutdownDelay != nil { - x.NoShutdownDelay = nil - } - } else { - if x.NoShutdownDelay == nil { - x.NoShutdownDelay = new(bool) - } - - if false { - } else { - *x.NoShutdownDelay = (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 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.Migrate != nil { - x.Migrate = nil - } - } else { - if x.Migrate == nil { - x.Migrate = new(bool) - } - - if false { - } else { - *x.Migrate = (bool)(r.DecodeBool()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - 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()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - 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()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NoShutdownDelay != nil { - x.NoShutdownDelay = nil - } - } else { - if x.NoShutdownDelay == nil { - x.NoShutdownDelay = new(bool) - } - - if false { - } else { - *x.NoShutdownDelay = (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 *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 = [37]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 - len(x.AllocStates) != 0, // AllocStates - x.PreviousAllocation != "", // PreviousAllocation - x.NextAllocation != "", // NextAllocation - x.DeploymentID != "", // DeploymentID - x.DeploymentStatus != nil, // DeploymentStatus - x.RescheduleTracker != nil, // RescheduleTracker - x.NetworkStatus != nil, // NetworkStatus - x.FollowupEvalID != "", // FollowupEvalID - len(x.PreemptedAllocations) != 0, // PreemptedAllocations - x.PreemptedByAllocation != "", // PreemptedByAllocation - len(x.SignedIdentities) != 0, // SignedIdentities - x.SigningKeyID != "", // SigningKeyID - 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(37) - } 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 x.AllocStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocState(([]*AllocState)(x.AllocStates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[20] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocStates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocStates`) - } - r.WriteMapElemValue() - if x.AllocStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocState(([]*AllocState)(x.AllocStates), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[21] { - 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[21] { - 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[22] { - 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[22] { - 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[23] { - 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[23] { - 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 yyn77 bool - if x.DeploymentStatus == nil { - yyn77 = true - goto LABEL77 - } - LABEL77: - if yyr2 || yy2arr2 { - if yyn77 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[24] { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[24] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentStatus`) - } - r.WriteMapElemValue() - if yyn77 { - r.EncodeNil() - } else { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } - } - } - var yyn80 bool - if x.RescheduleTracker == nil { - yyn80 = true - goto LABEL80 - } - LABEL80: - if yyr2 || yy2arr2 { - if yyn80 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[25] { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[25] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RescheduleTracker\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RescheduleTracker`) - } - r.WriteMapElemValue() - if yyn80 { - r.EncodeNil() - } else { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } - } - } - var yyn83 bool - if x.NetworkStatus == nil { - yyn83 = true - goto LABEL83 - } - LABEL83: - if yyr2 || yy2arr2 { - if yyn83 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[26] { - if x.NetworkStatus == nil { - r.EncodeNil() - } else { - x.NetworkStatus.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[26] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NetworkStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NetworkStatus`) - } - r.WriteMapElemValue() - if yyn83 { - r.EncodeNil() - } else { - if x.NetworkStatus == nil { - r.EncodeNil() - } else { - x.NetworkStatus.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[27] { - 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[27] { - 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[28] { - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.PreemptedAllocations), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[28] { - 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 { - h.encSlicestring(([]string)(x.PreemptedAllocations), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[29] { - 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[29] { - 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[30] { - if x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.SignedIdentities), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[30] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SignedIdentities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SignedIdentities`) - } - r.WriteMapElemValue() - if x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.SignedIdentities), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[31] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SigningKeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SigningKeyID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[31] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SigningKeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SigningKeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SigningKeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SigningKeyID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[32] { - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[32] { - 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[33] { - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[33] { - 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[34] { - if false { - } else { - r.EncodeUint(uint64(x.AllocModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[34] { - 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[35] { - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[35] { - 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[36] { - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[36] { - 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 "AllocStates": - if r.TryDecodeAsNil() { - x.AllocStates = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocState((*[]*AllocState)(&x.AllocStates), 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 "NetworkStatus": - if r.TryDecodeAsNil() { - if true && x.NetworkStatus != nil { - x.NetworkStatus = nil - } - } else { - if x.NetworkStatus == nil { - x.NetworkStatus = new(AllocNetworkStatus) - } - - x.NetworkStatus.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 { - h.decSlicestring((*[]string)(&x.PreemptedAllocations), d) - } - } - case "PreemptedByAllocation": - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - case "SignedIdentities": - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.SignedIdentities), d) - } - } - case "SigningKeyID": - if r.TryDecodeAsNil() { - x.SigningKeyID = "" - } else { - x.SigningKeyID = (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 yyj46 int - var yyb46 bool - var yyhl46 bool = l >= 0 - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskResources = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.TaskResources), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocStates = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocState((*[]*AllocState)(&x.AllocStates), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousAllocation = "" - } else { - x.PreviousAllocation = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NetworkStatus != nil { - x.NetworkStatus = nil - } - } else { - if x.NetworkStatus == nil { - x.NetworkStatus = new(AllocNetworkStatus) - } - - x.NetworkStatus.CodecDecodeSelf(d) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.PreemptedAllocations), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.SignedIdentities), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SigningKeyID = "" - } else { - x.SigningKeyID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocModifyIndex = 0 - } else { - x.AllocModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj46-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 = [37]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 - len(x.AllocStates) != 0, // AllocStates - x.PreviousAllocation != "", // PreviousAllocation - x.NextAllocation != "", // NextAllocation - x.DeploymentID != "", // DeploymentID - x.DeploymentStatus != nil, // DeploymentStatus - x.RescheduleTracker != nil, // RescheduleTracker - x.NetworkStatus != nil, // NetworkStatus - x.FollowupEvalID != "", // FollowupEvalID - len(x.PreemptedAllocations) != 0, // PreemptedAllocations - x.PreemptedByAllocation != "", // PreemptedByAllocation - len(x.SignedIdentities) != 0, // SignedIdentities - x.SigningKeyID != "", // SigningKeyID - 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(37) - } 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 x.AllocStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocState(([]*AllocState)(x.AllocStates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[20] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocStates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocStates`) - } - r.WriteMapElemValue() - if x.AllocStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocState(([]*AllocState)(x.AllocStates), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[21] { - 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[21] { - 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[22] { - 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[22] { - 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[23] { - 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[23] { - 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 yyn77 bool - if x.DeploymentStatus == nil { - yyn77 = true - goto LABEL77 - } - LABEL77: - if yyr2 || yy2arr2 { - if yyn77 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[24] { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[24] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentStatus`) - } - r.WriteMapElemValue() - if yyn77 { - r.EncodeNil() - } else { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } - } - } - var yyn80 bool - if x.RescheduleTracker == nil { - yyn80 = true - goto LABEL80 - } - LABEL80: - if yyr2 || yy2arr2 { - if yyn80 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[25] { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[25] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RescheduleTracker\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RescheduleTracker`) - } - r.WriteMapElemValue() - if yyn80 { - r.EncodeNil() - } else { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } - } - } - var yyn83 bool - if x.NetworkStatus == nil { - yyn83 = true - goto LABEL83 - } - LABEL83: - if yyr2 || yy2arr2 { - if yyn83 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[26] { - if x.NetworkStatus == nil { - r.EncodeNil() - } else { - x.NetworkStatus.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[26] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NetworkStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NetworkStatus`) - } - r.WriteMapElemValue() - if yyn83 { - r.EncodeNil() - } else { - if x.NetworkStatus == nil { - r.EncodeNil() - } else { - x.NetworkStatus.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[27] { - 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[27] { - 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[28] { - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.PreemptedAllocations), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[28] { - 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 { - h.encSlicestring(([]string)(x.PreemptedAllocations), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[29] { - 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[29] { - 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[30] { - if x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.SignedIdentities), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[30] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SignedIdentities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SignedIdentities`) - } - r.WriteMapElemValue() - if x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringstring((map[string]string)(x.SignedIdentities), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[31] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SigningKeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SigningKeyID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[31] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SigningKeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SigningKeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SigningKeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SigningKeyID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[32] { - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[32] { - 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[33] { - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[33] { - 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[34] { - if false { - } else { - r.EncodeUint(uint64(x.AllocModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[34] { - 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[35] { - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[35] { - 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[36] { - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[36] { - 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 "AllocStates": - if r.TryDecodeAsNil() { - x.AllocStates = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocState((*[]*AllocState)(&x.AllocStates), 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 "NetworkStatus": - if r.TryDecodeAsNil() { - if true && x.NetworkStatus != nil { - x.NetworkStatus = nil - } - } else { - if x.NetworkStatus == nil { - x.NetworkStatus = new(AllocNetworkStatus) - } - - x.NetworkStatus.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 { - h.decSlicestring((*[]string)(&x.PreemptedAllocations), d) - } - } - case "PreemptedByAllocation": - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - case "SignedIdentities": - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.SignedIdentities), d) - } - } - case "SigningKeyID": - if r.TryDecodeAsNil() { - x.SigningKeyID = "" - } else { - x.SigningKeyID = (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 yyj46 int - var yyb46 bool - var yyhl46 bool = l >= 0 - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskResources = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.TaskResources), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocStates = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocState((*[]*AllocState)(&x.AllocStates), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousAllocation = "" - } else { - x.PreviousAllocation = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - 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) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NetworkStatus != nil { - x.NetworkStatus = nil - } - } else { - if x.NetworkStatus == nil { - x.NetworkStatus = new(AllocNetworkStatus) - } - - x.NetworkStatus.CodecDecodeSelf(d) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.PreemptedAllocations), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decMapstringstring((*map[string]string)(&x.SignedIdentities), d) - } - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SigningKeyID = "" - } else { - x.SigningKeyID = (string)(r.DecodeString()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocModifyIndex = 0 - } else { - x.AllocModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj46++ - if yyhl46 { - yyb46 = yyj46 > l - } else { - yyb46 = r.CheckBreak() - } - if yyb46 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj46-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(27) - } else { - r.WriteMapStart(27) - } - 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)) - } - } - } - var yyn33 bool - if x.AllocatedResources == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.AllocatedResources == nil { - r.EncodeNil() - } else { - x.AllocatedResources.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocatedResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocatedResources`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.AllocatedResources == nil { - r.EncodeNil() - } else { - x.AllocatedResources.CodecEncodeSelf(e) - } - } - } - 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() - yy49 := &x.DesiredTransition - yy49.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredTransition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredTransition`) - } - r.WriteMapElemValue() - yy51 := &x.DesiredTransition - yy51.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 yyn56 bool - if x.DeploymentStatus == nil { - yyn56 = true - goto LABEL56 - } - LABEL56: - if yyr2 || yy2arr2 { - if yyn56 { - 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 yyn56 { - 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)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextAllocation)) - } - } - } else { - 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)) - } - } - } - var yyn65 bool - if x.RescheduleTracker == nil { - yyn65 = true - goto LABEL65 - } - LABEL65: - if yyr2 || yy2arr2 { - if yyn65 { - 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 yyn65 { - 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 { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 "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 "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 "NextAllocation": - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (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 { - h.decSlicestring((*[]string)(&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 yyj33 int - var yyb33 bool - var yyhl33 bool = l >= 0 - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobType = "" - } else { - x.JobType = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - 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) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - 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) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - 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) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.PreemptedAllocations), d) - } - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj33++ - if yyhl33 { - yyb33 = yyj33 > l - } else { - yyb33 = r.CheckBreak() - } - if yyb33 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj33-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocStubFields) 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.Resources)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Resources)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.TaskStates)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskStates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskStates`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.TaskStates)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocStubFields) 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 *AllocStubFields) 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 "Resources": - if r.TryDecodeAsNil() { - x.Resources = false - } else { - x.Resources = (bool)(r.DecodeBool()) - } - case "TaskStates": - if r.TryDecodeAsNil() { - x.TaskStates = false - } else { - x.TaskStates = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocStubFields) 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.Resources = false - } else { - x.Resources = (bool)(r.DecodeBool()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = false - } else { - x.TaskStates = (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 *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(15) - } else { - r.WriteMapStart(15) - } - 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 false { - } else { - r.EncodeInt(int64(x.NodesInPool)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesInPool\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesInPool`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesInPool)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodesAvailable == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(x.NodesAvailable), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ClassFiltered == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(x.ClassFiltered), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ConstraintFiltered == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(x.ClassExhausted), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DimensionExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(x.DimensionExhausted), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.QuotaExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(x.QuotaExhausted), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ResourcesExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResources((map[string]*Resources)(x.ResourcesExhausted), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResourcesExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ResourcesExhausted`) - } - r.WriteMapElemValue() - if x.ResourcesExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResources((map[string]*Resources)(x.ResourcesExhausted), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Scores == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringfloat64((map[string]float64)(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 { - h.encMapstringfloat64((map[string]float64)(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 yyxt43 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt43 != nil { - z.EncExtension(x.AllocationTime, yyxt43) - } 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 yyxt44 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt44 != nil { - z.EncExtension(x.AllocationTime, yyxt44) - } 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 "NodesInPool": - if r.TryDecodeAsNil() { - x.NodesInPool = 0 - } else { - x.NodesInPool = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesAvailable": - if r.TryDecodeAsNil() { - x.NodesAvailable = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.NodesAvailable), d) - } - } - case "ClassFiltered": - if r.TryDecodeAsNil() { - x.ClassFiltered = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.ClassFiltered), d) - } - } - case "ConstraintFiltered": - if r.TryDecodeAsNil() { - x.ConstraintFiltered = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&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 { - h.decMapstringint((*map[string]int)(&x.ClassExhausted), d) - } - } - case "DimensionExhausted": - if r.TryDecodeAsNil() { - x.DimensionExhausted = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.DimensionExhausted), d) - } - } - case "QuotaExhausted": - if r.TryDecodeAsNil() { - x.QuotaExhausted = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.QuotaExhausted), d) - } - } - case "ResourcesExhausted": - if r.TryDecodeAsNil() { - x.ResourcesExhausted = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.ResourcesExhausted), d) - } - } - case "Scores": - if r.TryDecodeAsNil() { - x.Scores = nil - } else { - if false { - } else { - h.decMapstringfloat64((*map[string]float64)(&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 yyxt27 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt27 != nil { - z.DecExtension(x.AllocationTime, yyxt27) - } 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 yyj29 int - var yyb29 bool - var yyhl29 bool = l >= 0 - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesEvaluated = 0 - } else { - x.NodesEvaluated = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesFiltered = 0 - } else { - x.NodesFiltered = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesInPool = 0 - } else { - x.NodesInPool = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesAvailable = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.NodesAvailable), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClassFiltered = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.ClassFiltered), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ConstraintFiltered = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.ConstraintFiltered), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesExhausted = 0 - } else { - x.NodesExhausted = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClassExhausted = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.ClassExhausted), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DimensionExhausted = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.DimensionExhausted), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QuotaExhausted = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.QuotaExhausted), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ResourcesExhausted = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.ResourcesExhausted), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Scores = nil - } else { - if false { - } else { - h.decMapstringfloat64((*map[string]float64)(&x.Scores), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ScoreMetaData = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeScoreMeta((*[]*NodeScoreMeta)(&x.ScoreMetaData), d) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocationTime = 0 - } else { - if false { - } else if yyxt53 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt53 != nil { - z.DecExtension(x.AllocationTime, yyxt53) - } else { - x.AllocationTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CoalescedFailures = 0 - } else { - x.CoalescedFailures = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj29++ - if yyhl29 { - yyb29 = yyj29 > l - } else { - yyb29 = r.CheckBreak() - } - if yyb29 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj29-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 { - h.encMapstringfloat64((map[string]float64)(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 { - h.encMapstringfloat64((map[string]float64)(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 { - h.decMapstringfloat64((*map[string]float64)(&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 { - h.decMapstringfloat64((*map[string]float64)(&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 *AllocNetworkStatus) 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.InterfaceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterfaceName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InterfaceName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InterfaceName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterfaceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterfaceName)) - } - } - } - 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.AddressIPv6))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AddressIPv6)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AddressIPv6\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AddressIPv6`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AddressIPv6))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AddressIPv6)) - } - } - } - var yyn12 bool - if x.DNS == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DNS == nil { - r.EncodeNil() - } else { - x.DNS.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DNS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DNS`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.DNS == nil { - r.EncodeNil() - } else { - x.DNS.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocNetworkStatus) 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 *AllocNetworkStatus) 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 "InterfaceName": - if r.TryDecodeAsNil() { - x.InterfaceName = "" - } else { - x.InterfaceName = (string)(r.DecodeString()) - } - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - case "AddressIPv6": - if r.TryDecodeAsNil() { - x.AddressIPv6 = "" - } else { - x.AddressIPv6 = (string)(r.DecodeString()) - } - case "DNS": - if r.TryDecodeAsNil() { - if true && x.DNS != nil { - x.DNS = nil - } - } else { - if x.DNS == nil { - x.DNS = new(DNSConfig) - } - - x.DNS.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocNetworkStatus) 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.InterfaceName = "" - } else { - x.InterfaceName = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AddressIPv6 = "" - } else { - x.AddressIPv6 = (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.DNS != nil { - x.DNS = nil - } - } else { - if x.DNS == nil { - x.DNS = new(DNSConfig) - } - - x.DNS.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 *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 = [30]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.RelatedEvals) != 0, // RelatedEvals - 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(30) - } 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.RelatedEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluationStub(([]*EvaluationStub)(x.RelatedEvals), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[17] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RelatedEvals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RelatedEvals`) - } - r.WriteMapElemValue() - if x.RelatedEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluationStub(([]*EvaluationStub)(x.RelatedEvals), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[18] { - if x.FailedTGAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocMetric((map[string]*AllocMetric)(x.FailedTGAllocs), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[18] { - 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[19] { - if x.ClassEligibility == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringbool((map[string]bool)(x.ClassEligibility), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[19] { - 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 { - h.encMapstringbool((map[string]bool)(x.ClassEligibility), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[20] { - 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[20] { - 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[21] { - if false { - } else { - r.EncodeBool(bool(x.EscapedComputedClass)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[21] { - 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[22] { - if false { - } else { - r.EncodeBool(bool(x.AnnotatePlan)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[22] { - 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[23] { - if x.QueuedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(x.QueuedAllocations), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[23] { - 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 { - h.encMapstringint((map[string]int)(x.QueuedAllocations), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[24] { - 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[24] { - 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[25] { - if false { - } else { - r.EncodeUint(uint64(x.SnapshotIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[25] { - 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[26] { - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[26] { - 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[27] { - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[27] { - 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[28] { - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[28] { - 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[29] { - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[29] { - 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 "RelatedEvals": - if r.TryDecodeAsNil() { - x.RelatedEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluationStub((*[]*EvaluationStub)(&x.RelatedEvals), d) - } - } - 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 { - h.decMapstringbool((*map[string]bool)(&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 { - h.decMapstringint((*map[string]int)(&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 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.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.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.TriggeredBy = "" - } else { - x.TriggeredBy = (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() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - 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.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - 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() { - 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.Wait = 0 - } else { - if false { - } else if yyxt54 := z.Extension(z.I2Rtid(x.Wait)); yyxt54 != nil { - z.DecExtension(x.Wait, yyxt54) - } else { - x.Wait = (time.Duration)(r.DecodeInt64()) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - 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 yyxt56 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt56 != nil { - z.DecExtension(x.WaitUntil, yyxt56) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.WaitUntil) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.WaitUntil) - } else { - z.DecFallback(&x.WaitUntil, false) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextEval = "" - } else { - x.NextEval = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousEval = "" - } else { - x.PreviousEval = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BlockedEval = "" - } else { - x.BlockedEval = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RelatedEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluationStub((*[]*EvaluationStub)(&x.RelatedEvals), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailedTGAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocMetric((*map[string]*AllocMetric)(&x.FailedTGAllocs), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClassEligibility = nil - } else { - if false { - } else { - h.decMapstringbool((*map[string]bool)(&x.ClassEligibility), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QuotaLimitReached = "" - } else { - x.QuotaLimitReached = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EscapedComputedClass = false - } else { - x.EscapedComputedClass = (bool)(r.DecodeBool()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AnnotatePlan = false - } else { - x.AnnotatePlan = (bool)(r.DecodeBool()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueuedAllocations = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&x.QueuedAllocations), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LeaderACL = "" - } else { - x.LeaderACL = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SnapshotIndex = 0 - } else { - x.SnapshotIndex = (uint64)(r.DecodeUint64()) - } - 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.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 *EvaluationStub) 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.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 { - 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 { - 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.TriggeredBy))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TriggeredBy)) - } - } - } else { - 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 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.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.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.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.WaitUntil) - } else if yyxt34 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt34 != nil { - z.EncExtension(x.WaitUntil, yyxt34) - } 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.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 yyxt35 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt35 != nil { - z.EncExtension(x.WaitUntil, yyxt35) - } 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextEval)) - } - } - } else { - 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousEval)) - } - } - } else { - 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BlockedEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BlockedEval)) - } - } - } else { - 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 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 *EvaluationStub) 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 *EvaluationStub) 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 "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - 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 "WaitUntil": - if r.TryDecodeAsNil() { - x.WaitUntil = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.WaitUntil = r.DecodeTime() - } else if yyxt15 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt15 != nil { - z.DecExtension(x.WaitUntil, yyxt15) - } 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 "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 *EvaluationStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj23 int - var yyb23 bool - var yyhl23 bool = l >= 0 - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TriggeredBy = "" - } else { - x.TriggeredBy = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - 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 yyxt35 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt35 != nil { - z.DecExtension(x.WaitUntil, yyxt35) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.WaitUntil) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.WaitUntil) - } else { - z.DecFallback(&x.WaitUntil, false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextEval = "" - } else { - x.NextEval = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousEval = "" - } else { - x.PreviousEval = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BlockedEval = "" - } else { - x.BlockedEval = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj23-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(9) - } else { - r.WriteMapStart(9) - } - 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 x.RejectedNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.RejectedNodes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RejectedNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RejectedNodes`) - } - r.WriteMapElemValue() - if x.RejectedNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.RejectedNodes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.IneligibleNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.IneligibleNodes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IneligibleNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IneligibleNodes`) - } - r.WriteMapElemValue() - if x.IneligibleNodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.IneligibleNodes), 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 "RejectedNodes": - if r.TryDecodeAsNil() { - x.RejectedNodes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.RejectedNodes), d) - } - } - case "IneligibleNodes": - if r.TryDecodeAsNil() { - x.IneligibleNodes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.IneligibleNodes), 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeUpdate = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeUpdate), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeAllocation = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeAllocation), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - 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) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodePreemptions), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RejectedNodes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.RejectedNodes), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IneligibleNodes = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.IneligibleNodes), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RefreshIndex = 0 - } else { - x.RefreshIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocIndex = 0 - } else { - x.AllocIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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 { - h.encMapstringstring((map[string]string)(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 { - h.encMapstringstring((map[string]string)(x.Messages), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Keys == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringint((map[string]int)(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 { - h.encMapstringint((map[string]int)(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 { - h.decMapstringstring((*map[string]string)(&x.Messages), d) - } - } - case "Keys": - if r.TryDecodeAsNil() { - x.Keys = nil - } else { - if false { - } else { - h.decMapstringint((*map[string]int)(&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 { - h.decMapstringstring((*map[string]string)(&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 { - h.decMapstringint((*map[string]int)(&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(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.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) - } - } - } - } - var yyn15 bool - if x.JobACL == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.JobACL == nil { - r.EncodeNil() - } else { - x.JobACL.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobACL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobACL`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.JobACL == nil { - r.EncodeNil() - } else { - x.JobACL.CodecEncodeSelf(e) - } - } - } - 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(pkg6_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 "JobACL": - if r.TryDecodeAsNil() { - if true && x.JobACL != nil { - x.JobACL = nil - } - } else { - if x.JobACL == nil { - x.JobACL = new(JobACL) - } - - x.JobACL.CodecDecodeSelf(d) - } - 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 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.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Rules = "" - } else { - x.Rules = (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.RulesJSON != nil { - x.RulesJSON = nil - } - } else { - if x.RulesJSON == nil { - x.RulesJSON = new(pkg6_acl.Policy) - } - - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.RulesJSON)); yyxt19 != nil { - z.DecExtension(x.RulesJSON, yyxt19) - } else { - z.DecFallback(x.RulesJSON, false) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.JobACL != nil { - x.JobACL = nil - } - } else { - if x.JobACL == nil { - x.JobACL = new(JobACL) - } - - x.JobACL.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobACL) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Group\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Group`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Group))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Group)) - } - } - } - 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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobACL) 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 *JobACL) 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 "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 "Group": - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobACL) 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.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.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (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 *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(12) - } else { - r.WriteMapStart(12) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(13) - } else { - r.WriteMapStart(13) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 { - h.decSlicestring((*[]string)(&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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Names = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Names), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLPolicyListStub((*[]*ACLPolicyListStub)(&x.Policies), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Policy != nil { - x.Policy = nil - } - } else { - if x.Policy == nil { - x.Policy = new(ACLPolicy) - } - - x.Policy.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Policies = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLPolicy((*map[string]*ACLPolicy)(&x.Policies), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Names = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Names), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLPolicy((*[]*ACLPolicy)(&x.Policies), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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 if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x) - } 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.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 { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Policies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Roles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLTokenRoleLink(([]*ACLTokenRoleLink)(x.Roles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Roles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Roles`) - } - r.WriteMapElemValue() - if x.Roles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLTokenRoleLink(([]*ACLTokenRoleLink)(x.Roles), 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 yyxt28 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt28 != nil { - z.EncExtension(x.CreateTime, yyxt28) - } 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 yyxt29 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt29 != nil { - z.EncExtension(x.CreateTime, yyxt29) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.CreateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.CreateTime) - } else { - z.EncFallback(x.CreateTime) - } - } - var yyn30 bool - if x.ExpirationTime == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ExpirationTime == nil { - r.EncodeNil() - } else { - yy31 := *x.ExpirationTime - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(yy31) - } else if yyxt32 := z.Extension(z.I2Rtid(yy31)); yyxt32 != nil { - z.EncExtension(yy31, yyxt32) - } else if z.EncBinary() { - z.EncBinaryMarshal(yy31) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(yy31) - } else { - z.EncFallback(yy31) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExpirationTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExpirationTime`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.ExpirationTime == nil { - r.EncodeNil() - } else { - yy33 := *x.ExpirationTime - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(yy33) - } else if yyxt34 := z.Extension(z.I2Rtid(yy33)); yyxt34 != nil { - z.EncExtension(yy33, yyxt34) - } else if z.EncBinary() { - z.EncBinaryMarshal(yy33) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(yy33) - } else { - z.EncFallback(yy33) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt36 := z.Extension(z.I2Rtid(x.ExpirationTTL)); yyxt36 != nil { - z.EncExtension(x.ExpirationTTL, yyxt36) - } else { - r.EncodeInt(int64(x.ExpirationTTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExpirationTTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExpirationTTL`) - } - r.WriteMapElemValue() - if false { - } else if yyxt37 := z.Extension(z.I2Rtid(x.ExpirationTTL)); yyxt37 != nil { - z.EncExtension(x.ExpirationTTL, yyxt37) - } else { - r.EncodeInt(int64(x.ExpirationTTL)) - } - } - 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 if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x) - } 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 { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - case "Roles": - if r.TryDecodeAsNil() { - x.Roles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenRoleLink((*[]*ACLTokenRoleLink)(&x.Roles), 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 yyxt16 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt16 != nil { - z.DecExtension(x.CreateTime, yyxt16) - } 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 "ExpirationTime": - if r.TryDecodeAsNil() { - if true && x.ExpirationTime != nil { - x.ExpirationTime = nil - } - } else { - if x.ExpirationTime == nil { - x.ExpirationTime = new(time.Time) - } - - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - *x.ExpirationTime = r.DecodeTime() - } else if yyxt18 := z.Extension(z.I2Rtid(x.ExpirationTime)); yyxt18 != nil { - z.DecExtension(x.ExpirationTime, yyxt18) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(x.ExpirationTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.ExpirationTime) - } else { - z.DecFallback(x.ExpirationTime, false) - } - } - case "ExpirationTTL": - if r.TryDecodeAsNil() { - x.ExpirationTTL = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.ExpirationTTL)); yyxt20 != nil { - z.DecExtension(x.ExpirationTTL, yyxt20) - } else { - x.ExpirationTTL = (time.Duration)(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()) - } - 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 yyj23 int - var yyb23 bool - var yyhl23 bool = l >= 0 - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Roles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenRoleLink((*[]*ACLTokenRoleLink)(&x.Roles), d) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - 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 yyxt36 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt36 != nil { - z.DecExtension(x.CreateTime, yyxt36) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ExpirationTime != nil { - x.ExpirationTime = nil - } - } else { - if x.ExpirationTime == nil { - x.ExpirationTime = new(time.Time) - } - - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - *x.ExpirationTime = r.DecodeTime() - } else if yyxt38 := z.Extension(z.I2Rtid(x.ExpirationTime)); yyxt38 != nil { - z.DecExtension(x.ExpirationTime, yyxt38) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(x.ExpirationTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.ExpirationTime) - } else { - z.DecFallback(x.ExpirationTime, false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExpirationTTL = 0 - } else { - if false { - } else if yyxt40 := z.Extension(z.I2Rtid(x.ExpirationTTL)); yyxt40 != nil { - z.DecExtension(x.ExpirationTTL, yyxt40) - } else { - x.ExpirationTTL = (time.Duration)(r.DecodeInt64()) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj23-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(11) - } else { - r.WriteMapStart(11) - } - 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 { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Policies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Roles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLTokenRoleLink(([]*ACLTokenRoleLink)(x.Roles), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Roles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Roles`) - } - r.WriteMapElemValue() - if x.Roles == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLTokenRoleLink(([]*ACLTokenRoleLink)(x.Roles), 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) - } - } - var yyn27 bool - if x.ExpirationTime == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ExpirationTime == nil { - r.EncodeNil() - } else { - yy28 := *x.ExpirationTime - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(yy28) - } else if yyxt29 := z.Extension(z.I2Rtid(yy28)); yyxt29 != nil { - z.EncExtension(yy28, yyxt29) - } else if z.EncBinary() { - z.EncBinaryMarshal(yy28) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(yy28) - } else { - z.EncFallback(yy28) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExpirationTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExpirationTime`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.ExpirationTime == nil { - r.EncodeNil() - } else { - yy30 := *x.ExpirationTime - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(yy30) - } else if yyxt31 := z.Extension(z.I2Rtid(yy30)); yyxt31 != nil { - z.EncExtension(yy30, yyxt31) - } else if z.EncBinary() { - z.EncBinaryMarshal(yy30) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(yy30) - } else { - z.EncFallback(yy30) - } - } - } - } - 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 { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - case "Roles": - if r.TryDecodeAsNil() { - x.Roles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenRoleLink((*[]*ACLTokenRoleLink)(&x.Roles), 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 yyxt15 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt15 != nil { - z.DecExtension(x.CreateTime, yyxt15) - } 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 "ExpirationTime": - if r.TryDecodeAsNil() { - if true && x.ExpirationTime != nil { - x.ExpirationTime = nil - } - } else { - if x.ExpirationTime == nil { - x.ExpirationTime = new(time.Time) - } - - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - *x.ExpirationTime = r.DecodeTime() - } else if yyxt17 := z.Extension(z.I2Rtid(x.ExpirationTime)); yyxt17 != nil { - z.DecExtension(x.ExpirationTime, yyxt17) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(x.ExpirationTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.ExpirationTime) - } else { - z.DecFallback(x.ExpirationTime, 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 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.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - 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.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Roles = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenRoleLink((*[]*ACLTokenRoleLink)(&x.Roles), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - 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 yyxt32 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt32 != nil { - z.DecExtension(x.CreateTime, yyxt32) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ExpirationTime != nil { - x.ExpirationTime = nil - } - } else { - if x.ExpirationTime == nil { - x.ExpirationTime = new(time.Time) - } - - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - *x.ExpirationTime = r.DecodeTime() - } else if yyxt34 := z.Extension(z.I2Rtid(x.ExpirationTime)); yyxt34 != nil { - z.DecExtension(x.ExpirationTime, yyxt34) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(x.ExpirationTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.ExpirationTime) - } else { - z.DecFallback(x.ExpirationTime, false) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.GlobalOnly = false - } else { - x.GlobalOnly = (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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.AccessorID = "" - } else { - x.AccessorID = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(13) - } else { - r.WriteMapStart(13) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AccessorIDS == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 { - h.decSlicestring((*[]string)(&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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorIDS = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AccessorIDS), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenListStub((*[]*ACLTokenListStub)(&x.Tokens), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.Tokens = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLToken((*map[string]*ACLToken)(&x.Tokens), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(13) - } else { - r.WriteMapStart(13) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 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.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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - 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 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.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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AccessorIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.AccessorIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AccessorIDs), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(8) - } else { - r.WriteMapStart(8) - } - 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.BootstrapSecret))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BootstrapSecret)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BootstrapSecret\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BootstrapSecret`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BootstrapSecret))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BootstrapSecret)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "BootstrapSecret": - if r.TryDecodeAsNil() { - x.BootstrapSecret = "" - } else { - x.BootstrapSecret = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ResetIndex = 0 - } else { - x.ResetIndex = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BootstrapSecret = "" - } else { - x.BootstrapSecret = (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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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(6) - } else { - r.WriteMapStart(6) - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 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.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLToken((*[]*ACLToken)(&x.Tokens), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *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 *OneTimeToken) 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.OneTimeSecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OneTimeSecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OneTimeSecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OneTimeSecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OneTimeSecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OneTimeSecretID)) - } - } - } - 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().TimeNotBuiltin { - r.EncodeTime(x.ExpiresAt) - } else if yyxt10 := z.Extension(z.I2Rtid(x.ExpiresAt)); yyxt10 != nil { - z.EncExtension(x.ExpiresAt, yyxt10) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ExpiresAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ExpiresAt) - } else { - z.EncFallback(x.ExpiresAt) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExpiresAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExpiresAt`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ExpiresAt) - } else if yyxt11 := z.Extension(z.I2Rtid(x.ExpiresAt)); yyxt11 != nil { - z.EncExtension(x.ExpiresAt, yyxt11) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ExpiresAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ExpiresAt) - } else { - z.EncFallback(x.ExpiresAt) - } - } - 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 *OneTimeToken) 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 *OneTimeToken) 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 "OneTimeSecretID": - if r.TryDecodeAsNil() { - x.OneTimeSecretID = "" - } else { - x.OneTimeSecretID = (string)(r.DecodeString()) - } - case "AccessorID": - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - case "ExpiresAt": - if r.TryDecodeAsNil() { - x.ExpiresAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ExpiresAt = r.DecodeTime() - } else if yyxt7 := z.Extension(z.I2Rtid(x.ExpiresAt)); yyxt7 != nil { - z.DecExtension(x.ExpiresAt, yyxt7) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ExpiresAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ExpiresAt) - } else { - z.DecFallback(&x.ExpiresAt, 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 *OneTimeToken) 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.OneTimeSecretID = "" - } else { - x.OneTimeSecretID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExpiresAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ExpiresAt = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.ExpiresAt)); yyxt14 != nil { - z.DecExtension(x.ExpiresAt, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ExpiresAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ExpiresAt) - } else { - z.DecFallback(&x.ExpiresAt, 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 *OneTimeTokenUpsertRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *OneTimeTokenUpsertRequest) 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 *OneTimeTokenUpsertRequest) 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.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenUpsertRequest) 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenUpsertResponse) 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.OneTimeToken == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.OneTimeToken == nil { - r.EncodeNil() - } else { - x.OneTimeToken.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OneTimeToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OneTimeToken`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.OneTimeToken == nil { - r.EncodeNil() - } else { - x.OneTimeToken.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 *OneTimeTokenUpsertResponse) 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 *OneTimeTokenUpsertResponse) 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 "OneTimeToken": - if r.TryDecodeAsNil() { - if true && x.OneTimeToken != nil { - x.OneTimeToken = nil - } - } else { - if x.OneTimeToken == nil { - x.OneTimeToken = new(OneTimeToken) - } - - x.OneTimeToken.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 *OneTimeTokenUpsertResponse) 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.OneTimeToken != nil { - x.OneTimeToken = nil - } - } else { - if x.OneTimeToken == nil { - x.OneTimeToken = new(OneTimeToken) - } - - x.OneTimeToken.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 *OneTimeTokenExchangeRequest) 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.OneTimeSecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OneTimeSecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"OneTimeSecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `OneTimeSecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.OneTimeSecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.OneTimeSecretID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *OneTimeTokenExchangeRequest) 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 *OneTimeTokenExchangeRequest) 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 "OneTimeSecretID": - if r.TryDecodeAsNil() { - x.OneTimeSecretID = "" - } else { - x.OneTimeSecretID = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenExchangeRequest) 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.OneTimeSecretID = "" - } else { - x.OneTimeSecretID = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenExchangeResponse) 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.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.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *OneTimeTokenExchangeResponse) 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 *OneTimeTokenExchangeResponse) 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.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *OneTimeTokenExchangeResponse) 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.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.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 *OneTimeTokenDeleteRequest) 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.AccessorIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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 { - h.encSlicestring(([]string)(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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *OneTimeTokenDeleteRequest) 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 *OneTimeTokenDeleteRequest) 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 { - h.decSlicestring((*[]string)(&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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenDeleteRequest) 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.AccessorIDs = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AccessorIDs), d) - } - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenExpireRequest) 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().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt4 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt4 != nil { - z.EncExtension(x.Timestamp, yyxt4) - } 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 yyxt5 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt5 != nil { - z.EncExtension(x.Timestamp, yyxt5) - } 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 { - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *OneTimeTokenExpireRequest) 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 *OneTimeTokenExpireRequest) 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 "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt5 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt5 != nil { - z.DecExtension(x.Timestamp, yyxt5) - } 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 "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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *OneTimeTokenExpireRequest) 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.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt13 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt13 != nil { - z.DecExtension(x.Timestamp, yyxt13) - } 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.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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *RpcError) 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.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)) - } - } - } - 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(codecSelferCcUTF8100, `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 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 *RpcError) 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 "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 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.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 TaskScheduleState) 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 *TaskScheduleState) 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 = (TaskScheduleState)(r.DecodeString()) - } -} - -func (x *TaskSchedule) 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) - } - var yyn3 bool - if x.Cron == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Cron == nil { - r.EncodeNil() - } else { - x.Cron.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cron\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cron`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Cron == nil { - r.EncodeNil() - } else { - x.Cron.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskSchedule) 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 *TaskSchedule) 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 "Cron": - if r.TryDecodeAsNil() { - if true && x.Cron != nil { - x.Cron = nil - } - } else { - if x.Cron == nil { - x.Cron = new(TaskScheduleCron) - } - - x.Cron.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskSchedule) 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() { - if true && x.Cron != nil { - x.Cron = nil - } - } else { - if x.Cron == nil { - x.Cron = new(TaskScheduleCron) - } - - x.Cron.CodecDecodeSelf(d) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskScheduleCron) 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.Start))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Start)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Start\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Start`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Start))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Start)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.End))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.End)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"End\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `End`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.End))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.End)) - } - } - } - 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 *TaskScheduleCron) 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 *TaskScheduleCron) 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 "Start": - if r.TryDecodeAsNil() { - x.Start = "" - } else { - x.Start = (string)(r.DecodeString()) - } - case "End": - if r.TryDecodeAsNil() { - x.End = "" - } else { - x.End = (string)(r.DecodeString()) - } - 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 *TaskScheduleCron) 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.Start = "" - } else { - x.Start = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.End = "" - } else { - x.End = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timezone = "" - } else { - x.Timezone = (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 *VariableMetadata) 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.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.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)) - } - } - } - var yyn9 bool - if x.Lock == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Lock == nil { - r.EncodeNil() - } else { - x.Lock.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Lock\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Lock`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Lock == nil { - r.EncodeNil() - } else { - x.Lock.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.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.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.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 *VariableMetadata) 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 *VariableMetadata) 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 "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Lock": - if r.TryDecodeAsNil() { - if true && x.Lock != nil { - x.Lock = nil - } - } else { - if x.Lock == nil { - x.Lock = new(VariableLock) - } - - x.Lock.CodecDecodeSelf(d) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - 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 *VariableMetadata) 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.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.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Lock != nil { - x.Lock = nil - } - } else { - if x.Lock == nil { - x.Lock = new(VariableLock) - } - - x.Lock.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.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *VariableEncrypted) 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.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.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)) - } - } - } - var yyn9 bool - if x.VariableMetadata.Lock == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Lock == nil { - r.EncodeNil() - } else { - x.Lock.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Lock\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Lock`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Lock == nil { - r.EncodeNil() - } else { - x.Lock.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.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.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.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.WriteArrayElem() - if x.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Data)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Data\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Data`) - } - r.WriteMapElemValue() - if x.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Data)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VariableEncrypted) 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 *VariableEncrypted) 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 "Namespace": - if r.TryDecodeAsNil() { - x.VariableMetadata.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.VariableMetadata.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Lock": - if r.TryDecodeAsNil() { - if true && x.VariableMetadata.Lock != nil { - x.VariableMetadata.Lock = nil - } - } else { - if x.VariableMetadata.Lock == nil { - x.VariableMetadata.Lock = new(VariableLock) - } - - x.Lock.CodecDecodeSelf(d) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyTime": - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - case "Data": - if r.TryDecodeAsNil() { - x.VariableData.Data = nil - } else { - if false { - } else { - x.Data = r.DecodeBytes(([]byte)(x.Data), false) - } - } - case "KeyID": - if r.TryDecodeAsNil() { - x.VariableData.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariableEncrypted) 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.VariableMetadata.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.VariableMetadata.Path = "" - } else { - x.Path = (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.VariableMetadata.Lock != nil { - x.VariableMetadata.Lock = nil - } - } else { - if x.VariableMetadata.Lock == nil { - x.VariableMetadata.Lock = new(VariableLock) - } - - x.Lock.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableData.Data = nil - } else { - if false { - } else { - x.Data = r.DecodeBytes(([]byte)(x.Data), false) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableData.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *VariableData) 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.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Data)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Data\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Data`) - } - r.WriteMapElemValue() - if x.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Data)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KeyID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KeyID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KeyID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KeyID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VariableData) 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 *VariableData) 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 "Data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - if false { - } else { - x.Data = r.DecodeBytes(([]byte)(x.Data), false) - } - } - case "KeyID": - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariableData) 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.Data = nil - } else { - if false { - } else { - x.Data = r.DecodeBytes(([]byte)(x.Data), false) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KeyID = "" - } else { - x.KeyID = (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 *VariableDecrypted) 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.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.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)) - } - } - } - var yyn9 bool - if x.VariableMetadata.Lock == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Lock == nil { - r.EncodeNil() - } else { - x.Lock.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Lock\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Lock`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Lock == nil { - r.EncodeNil() - } else { - x.Lock.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.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.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.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.WriteArrayElem() - if x.Items == nil { - r.EncodeNil() - } else { - x.Items.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Items\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Items`) - } - r.WriteMapElemValue() - if x.Items == nil { - r.EncodeNil() - } else { - x.Items.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VariableDecrypted) 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 *VariableDecrypted) 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 "Namespace": - if r.TryDecodeAsNil() { - x.VariableMetadata.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.VariableMetadata.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Lock": - if r.TryDecodeAsNil() { - if true && x.VariableMetadata.Lock != nil { - x.VariableMetadata.Lock = nil - } - } else { - if x.VariableMetadata.Lock == nil { - x.VariableMetadata.Lock = new(VariableLock) - } - - x.Lock.CodecDecodeSelf(d) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyTime": - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - case "Items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - x.Items.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariableDecrypted) 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.VariableMetadata.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.VariableMetadata.Path = "" - } else { - x.Path = (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.VariableMetadata.Lock != nil { - x.VariableMetadata.Lock = nil - } - } else { - if x.VariableMetadata.Lock == nil { - x.VariableMetadata.Lock = new(VariableLock) - } - - x.Lock.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VariableMetadata.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Items = nil - } else { - x.Items.CodecDecodeSelf(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 VariableItems) 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.encVariableItems((VariableItems)(x), e) - } - } -} - -func (x *VariableItems) 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.decVariableItems((*VariableItems)(x), d) - } -} - -func (x *VariableLock) 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 if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x) - } 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.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 yyxt7 := z.Extension(z.I2Rtid(x.TTL)); yyxt7 != nil { - z.EncExtension(x.TTL, yyxt7) - } else { - r.EncodeInt(int64(x.TTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TTL`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.TTL)); yyxt8 != nil { - z.EncExtension(x.TTL, yyxt8) - } else { - r.EncodeInt(int64(x.TTL)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LockDelay)); yyxt10 != nil { - z.EncExtension(x.LockDelay, yyxt10) - } else { - r.EncodeInt(int64(x.LockDelay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LockDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LockDelay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LockDelay)); yyxt11 != nil { - z.EncExtension(x.LockDelay, yyxt11) - } else { - r.EncodeInt(int64(x.LockDelay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VariableLock) 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 if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(x) - } 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 *VariableLock) 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 "TTL": - if r.TryDecodeAsNil() { - x.TTL = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.TTL)); yyxt6 != nil { - z.DecExtension(x.TTL, yyxt6) - } else { - x.TTL = (time.Duration)(r.DecodeInt64()) - } - } - case "LockDelay": - if r.TryDecodeAsNil() { - x.LockDelay = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LockDelay)); yyxt8 != nil { - z.DecExtension(x.LockDelay, yyxt8) - } else { - x.LockDelay = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariableLock) 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.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TTL = 0 - } else { - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.TTL)); yyxt12 != nil { - z.DecExtension(x.TTL, yyxt12) - } else { - x.TTL = (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.LockDelay = 0 - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LockDelay)); yyxt14 != nil { - z.DecExtension(x.LockDelay, yyxt14) - } else { - x.LockDelay = (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 *VariablesQuota) 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.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.EncodeInt(int64(x.Size)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Size\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Size`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Size)) - } - } - 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 *VariablesQuota) 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 *VariablesQuota) 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 "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Size": - if r.TryDecodeAsNil() { - x.Size = 0 - } else { - x.Size = (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()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariablesQuota) 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.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.Size = 0 - } else { - x.Size = (int64)(r.DecodeInt64()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x VarOp) 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 *VarOp) 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 = (VarOp)(r.DecodeString()) - } -} - -func (x VarOpResult) 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 *VarOpResult) 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 = (VarOpResult)(r.DecodeString()) - } -} - -func (x *VariablesApplyRequest) 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() - x.Op.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Op\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Op`) - } - r.WriteMapElemValue() - x.Op.CodecEncodeSelf(e) - } - var yyn6 bool - if x.Var == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Var == nil { - r.EncodeNil() - } else { - x.Var.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Var\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Var`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Var == nil { - r.EncodeNil() - } else { - x.Var.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *VariablesApplyRequest) 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 *VariablesApplyRequest) 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 "Op": - if r.TryDecodeAsNil() { - x.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - case "Var": - if r.TryDecodeAsNil() { - if true && x.Var != nil { - x.Var = nil - } - } else { - if x.Var == nil { - x.Var = new(VariableDecrypted) - } - - x.Var.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *VariablesApplyRequest) 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.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Var != nil { - x.Var = nil - } - } else { - if x.Var == nil { - x.Var = new(VariableDecrypted) - } - - x.Var.CodecDecodeSelf(d) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *VariablesApplyResponse) 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() - x.Op.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Op\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Op`) - } - r.WriteMapElemValue() - x.Op.CodecEncodeSelf(e) - } - var yyn6 bool - if x.Input == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Input == nil { - r.EncodeNil() - } else { - x.Input.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Input\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Input`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Input == nil { - r.EncodeNil() - } else { - x.Input.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Result.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Result\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Result`) - } - r.WriteMapElemValue() - x.Result.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Error == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(x.Error) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if x.Error == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(x.Error) - } - } - } - var yyn15 bool - if x.Conflict == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Conflict == nil { - r.EncodeNil() - } else { - x.Conflict.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Conflict\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Conflict`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.Conflict == nil { - r.EncodeNil() - } else { - x.Conflict.CodecEncodeSelf(e) - } - } - } - var yyn18 bool - if x.Output == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Output == nil { - r.EncodeNil() - } else { - x.Output.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Output\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Output`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.Output == nil { - r.EncodeNil() - } else { - x.Output.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 *VariablesApplyResponse) 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 *VariablesApplyResponse) 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 "Op": - if r.TryDecodeAsNil() { - x.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - case "Input": - if r.TryDecodeAsNil() { - if true && x.Input != nil { - x.Input = nil - } - } else { - if x.Input == nil { - x.Input = new(VariableDecrypted) - } - - x.Input.CodecDecodeSelf(d) - } - case "Result": - if r.TryDecodeAsNil() { - x.Result = "" - } else { - x.Result.CodecDecodeSelf(d) - } - case "Error": - if r.TryDecodeAsNil() { - x.Error = nil - } else { - if false { - } else { - z.DecFallback(&x.Error, true) - } - } - case "Conflict": - if r.TryDecodeAsNil() { - if true && x.Conflict != nil { - x.Conflict = nil - } - } else { - if x.Conflict == nil { - x.Conflict = new(VariableDecrypted) - } - - x.Conflict.CodecDecodeSelf(d) - } - case "Output": - if r.TryDecodeAsNil() { - if true && x.Output != nil { - x.Output = nil - } - } else { - if x.Output == nil { - x.Output = new(VariableDecrypted) - } - - x.Output.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 *VariablesApplyResponse) 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.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Input != nil { - x.Input = nil - } - } else { - if x.Input == nil { - x.Input = new(VariableDecrypted) - } - - x.Input.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Result = "" - } else { - x.Result.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Error = nil - } else { - if false { - } else { - z.DecFallback(&x.Error, true) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Conflict != nil { - x.Conflict = nil - } - } else { - if x.Conflict == nil { - x.Conflict = new(VariableDecrypted) - } - - x.Conflict.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Output != nil { - x.Output = nil - } - } else { - if x.Output == nil { - x.Output = new(VariableDecrypted) - } - - x.Output.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (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 *VarApplyStateRequest) 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() - x.Op.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Op\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Op`) - } - r.WriteMapElemValue() - x.Op.CodecEncodeSelf(e) - } - var yyn6 bool - if x.Var == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Var == nil { - r.EncodeNil() - } else { - x.Var.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Var\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Var`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Var == nil { - r.EncodeNil() - } else { - x.Var.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *VarApplyStateRequest) 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 *VarApplyStateRequest) 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 "Op": - if r.TryDecodeAsNil() { - x.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - case "Var": - if r.TryDecodeAsNil() { - if true && x.Var != nil { - x.Var = nil - } - } else { - if x.Var == nil { - x.Var = new(VariableEncrypted) - } - - x.Var.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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *VarApplyStateRequest) 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.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Var != nil { - x.Var = nil - } - } else { - if x.Var == nil { - x.Var = new(VariableEncrypted) - } - - x.Var.CodecDecodeSelf(d) - } - 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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *VarApplyStateResponse) 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.Op.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Op\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Op`) - } - r.WriteMapElemValue() - x.Op.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Result.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Result\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Result`) - } - r.WriteMapElemValue() - x.Result.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Error == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(x.Error) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if x.Error == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(x.Error) - } - } - } - var yyn12 bool - if x.Conflict == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Conflict == nil { - r.EncodeNil() - } else { - x.Conflict.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Conflict\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Conflict`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Conflict == nil { - r.EncodeNil() - } else { - x.Conflict.CodecEncodeSelf(e) - } - } - } - var yyn15 bool - if x.WrittenSVMeta == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.WrittenSVMeta == nil { - r.EncodeNil() - } else { - x.WrittenSVMeta.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WrittenSVMeta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WrittenSVMeta`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.WrittenSVMeta == nil { - r.EncodeNil() - } else { - x.WrittenSVMeta.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 *VarApplyStateResponse) 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 *VarApplyStateResponse) 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 "Op": - if r.TryDecodeAsNil() { - x.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - case "Result": - if r.TryDecodeAsNil() { - x.Result = "" - } else { - x.Result.CodecDecodeSelf(d) - } - case "Error": - if r.TryDecodeAsNil() { - x.Error = nil - } else { - if false { - } else { - z.DecFallback(&x.Error, true) - } - } - case "Conflict": - if r.TryDecodeAsNil() { - if true && x.Conflict != nil { - x.Conflict = nil - } - } else { - if x.Conflict == nil { - x.Conflict = new(VariableEncrypted) - } - - x.Conflict.CodecDecodeSelf(d) - } - case "WrittenSVMeta": - if r.TryDecodeAsNil() { - if true && x.WrittenSVMeta != nil { - x.WrittenSVMeta = nil - } - } else { - if x.WrittenSVMeta == nil { - x.WrittenSVMeta = new(VariableMetadata) - } - - x.WrittenSVMeta.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 *VarApplyStateResponse) 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.Op = "" - } else { - x.Op.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Result = "" - } else { - x.Result.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Error = nil - } else { - if false { - } else { - z.DecFallback(&x.Error, true) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Conflict != nil { - x.Conflict = nil - } - } else { - if x.Conflict == nil { - x.Conflict = new(VariableEncrypted) - } - - x.Conflict.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.WrittenSVMeta != nil { - x.WrittenSVMeta = nil - } - } else { - if x.WrittenSVMeta == nil { - x.WrittenSVMeta = new(VariableMetadata) - } - - x.WrittenSVMeta.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (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 *VariablesListRequest) 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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *VariablesListRequest) 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 *VariablesListRequest) 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *VariablesListRequest) 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.QueryOptions.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.QueryOptions.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.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - 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()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.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 *VariablesListResponse) 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.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVariableMetadata(([]*VariableMetadata)(x.Data), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Data\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Data`) - } - r.WriteMapElemValue() - if x.Data == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVariableMetadata(([]*VariableMetadata)(x.Data), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VariablesListResponse) 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 *VariablesListResponse) 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 "Data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - if false { - } else { - h.decSlicePtrtoVariableMetadata((*[]*VariableMetadata)(&x.Data), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariablesListResponse) 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.Data = nil - } else { - if false { - } else { - h.decSlicePtrtoVariableMetadata((*[]*VariableMetadata)(&x.Data), 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 yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } 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()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *VariablesReadRequest) 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.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.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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *VariablesReadRequest) 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 *VariablesReadRequest) 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 "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 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *VariablesReadRequest) 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.Path = "" - } else { - x.Path = (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.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 yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } 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.Filter = "" - } else { - x.Filter = (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.PerPage = 0 - } else { - x.PerPage = (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.QueryOptions.NextToken = "" - } else { - x.NextToken = (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.Reverse = false - } else { - x.Reverse = (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.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 *VariablesReadResponse) 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.Data == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Data == nil { - r.EncodeNil() - } else { - x.Data.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Data\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Data`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Data == nil { - r.EncodeNil() - } else { - x.Data.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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VariablesReadResponse) 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 *VariablesReadResponse) 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 "Data": - if r.TryDecodeAsNil() { - if true && x.Data != nil { - x.Data = nil - } - } else { - if x.Data == nil { - x.Data = new(VariableDecrypted) - } - - x.Data.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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VariablesReadResponse) 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.Data != nil { - x.Data = nil - } - } else { - if x.Data == nil { - x.Data = new(VariableDecrypted) - } - - x.Data.CodecDecodeSelf(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 yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.DecExtension(x.LastContact, yyxt14) - } 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()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (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 *VariablesRenewLockRequest) 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.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.LockID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LockID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LockID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LockID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LockID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LockID)) - } - } - } - 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdempotencyToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdempotencyToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdempotencyToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdempotencyToken)) - } - } - } - 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 *VariablesRenewLockRequest) 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 *VariablesRenewLockRequest) 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 "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "LockID": - if r.TryDecodeAsNil() { - x.LockID = "" - } else { - x.LockID = (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 "IdempotencyToken": - if r.TryDecodeAsNil() { - x.WriteRequest.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *VariablesRenewLockRequest) 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.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LockID = "" - } else { - x.LockID = (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.IdempotencyToken = "" - } else { - x.IdempotencyToken = (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 *VariablesRenewLockResponse) 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.VarMeta == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.VarMeta == nil { - r.EncodeNil() - } else { - x.VarMeta.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VarMeta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VarMeta`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.VarMeta == nil { - r.EncodeNil() - } else { - x.VarMeta.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 *VariablesRenewLockResponse) 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 *VariablesRenewLockResponse) 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 "VarMeta": - if r.TryDecodeAsNil() { - if true && x.VarMeta != nil { - x.VarMeta = nil - } - } else { - if x.VarMeta == nil { - x.VarMeta = new(VariableMetadata) - } - - x.VarMeta.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 *VariablesRenewLockResponse) 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.VarMeta != nil { - x.VarMeta = nil - } - } else { - if x.VarMeta == nil { - x.VarMeta = new(VariableMetadata) - } - - x.VarMeta.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 *VaultTokenData) 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.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.EncodeInt(int64(x.TTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TTL`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.TTL)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Renewable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Renewable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Renewable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Renewable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(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.encSlicestring(([]string)(x.Policies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Role))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Role)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Role\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Role`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Role))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Role)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NamespacePath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NamespacePath)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NamespacePath\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NamespacePath`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NamespacePath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NamespacePath)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VaultTokenData) 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 *VaultTokenData) 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 "CreationTTL": - if r.TryDecodeAsNil() { - x.CreationTTL = 0 - } else { - x.CreationTTL = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "TTL": - if r.TryDecodeAsNil() { - x.TTL = 0 - } else { - x.TTL = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Renewable": - if r.TryDecodeAsNil() { - x.Renewable = false - } else { - x.Renewable = (bool)(r.DecodeBool()) - } - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - case "Role": - if r.TryDecodeAsNil() { - x.Role = "" - } else { - x.Role = (string)(r.DecodeString()) - } - case "NamespacePath": - if r.TryDecodeAsNil() { - x.NamespacePath = "" - } else { - x.NamespacePath = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VaultTokenData) 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.CreationTTL = 0 - } else { - x.CreationTTL = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TTL = 0 - } else { - x.TTL = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Renewable = false - } else { - x.Renewable = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Policies), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Role = "" - } else { - x.Role = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NamespacePath = "" - } else { - x.NamespacePath = (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 *VaultTokenRoleData) 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.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.ExplicitMaxTtl)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExplicitMaxTtl\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExplicitMaxTtl`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ExplicitMaxTtl)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.TokenExplicitMaxTtl)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TokenExplicitMaxTtl\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TokenExplicitMaxTtl`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.TokenExplicitMaxTtl)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Orphan)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Orphan\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Orphan`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Orphan)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Period)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Period\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Period`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Period)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.TokenPeriod)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TokenPeriod\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TokenPeriod`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.TokenPeriod)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Renewable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Renewable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Renewable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Renewable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DisallowedPolicies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DisallowedPolicies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisallowedPolicies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisallowedPolicies`) - } - r.WriteMapElemValue() - if x.DisallowedPolicies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.DisallowedPolicies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllowedEntityAliases == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.AllowedEntityAliases), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowedEntityAliases\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowedEntityAliases`) - } - r.WriteMapElemValue() - if x.AllowedEntityAliases == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.AllowedEntityAliases), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllowedPolicies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.AllowedPolicies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowedPolicies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowedPolicies`) - } - r.WriteMapElemValue() - if x.AllowedPolicies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.AllowedPolicies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VaultTokenRoleData) 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 *VaultTokenRoleData) 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 "ExplicitMaxTtl": - if r.TryDecodeAsNil() { - x.ExplicitMaxTtl = 0 - } else { - x.ExplicitMaxTtl = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "TokenExplicitMaxTtl": - if r.TryDecodeAsNil() { - x.TokenExplicitMaxTtl = 0 - } else { - x.TokenExplicitMaxTtl = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Orphan": - if r.TryDecodeAsNil() { - x.Orphan = false - } else { - x.Orphan = (bool)(r.DecodeBool()) - } - case "Period": - if r.TryDecodeAsNil() { - x.Period = 0 - } else { - x.Period = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "TokenPeriod": - if r.TryDecodeAsNil() { - x.TokenPeriod = 0 - } else { - x.TokenPeriod = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Renewable": - if r.TryDecodeAsNil() { - x.Renewable = false - } else { - x.Renewable = (bool)(r.DecodeBool()) - } - case "DisallowedPolicies": - if r.TryDecodeAsNil() { - x.DisallowedPolicies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DisallowedPolicies), d) - } - } - case "AllowedEntityAliases": - if r.TryDecodeAsNil() { - x.AllowedEntityAliases = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllowedEntityAliases), d) - } - } - case "AllowedPolicies": - if r.TryDecodeAsNil() { - x.AllowedPolicies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllowedPolicies), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VaultTokenRoleData) 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.ExplicitMaxTtl = 0 - } else { - x.ExplicitMaxTtl = (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.TokenExplicitMaxTtl = 0 - } else { - x.TokenExplicitMaxTtl = (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.Orphan = false - } else { - x.Orphan = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Period = 0 - } else { - x.Period = (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.TokenPeriod = 0 - } else { - x.TokenPeriod = (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.Renewable = false - } else { - x.Renewable = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisallowedPolicies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.DisallowedPolicies), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowedEntityAliases = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllowedEntityAliases), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowedPolicies = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.AllowedPolicies), d) - } - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-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(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.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.WriteArrayElem() - x.AccessMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessMode`) - } - r.WriteMapElemValue() - x.AccessMode.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.AttachmentMode.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AttachmentMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AttachmentMode`) - } - r.WriteMapElemValue() - x.AttachmentMode.CodecEncodeSelf(e) - } - var yyn21 bool - if x.MountOptions == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MountOptions == nil { - r.EncodeNil() - } else { - x.MountOptions.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MountOptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MountOptions`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.MountOptions == nil { - r.EncodeNil() - } else { - x.MountOptions.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PerAlloc)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerAlloc\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerAlloc`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PerAlloc)) - } - } - 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()) - } - case "AccessMode": - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - case "AttachmentMode": - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - case "MountOptions": - if r.TryDecodeAsNil() { - if true && x.MountOptions != nil { - x.MountOptions = nil - } - } else { - if x.MountOptions == nil { - x.MountOptions = new(CSIMountOptions) - } - - x.MountOptions.CodecDecodeSelf(d) - } - case "PerAlloc": - if r.TryDecodeAsNil() { - x.PerAlloc = false - } else { - x.PerAlloc = (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 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.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.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Source = "" - } else { - x.Source = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessMode = "" - } else { - x.AccessMode.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AttachmentMode = "" - } else { - x.AttachmentMode.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.MountOptions != nil { - x.MountOptions = nil - } - } else { - if x.MountOptions == nil { - x.MountOptions = new(CSIMountOptions) - } - - x.MountOptions.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PerAlloc = false - } else { - x.PerAlloc = (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 *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(5) - } else { - r.WriteMapStart(5) - } - 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SELinuxLabel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SELinuxLabel)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SELinuxLabel\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SELinuxLabel`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SELinuxLabel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SELinuxLabel)) - } - } - } - 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()) - } - case "SELinuxLabel": - if r.TryDecodeAsNil() { - x.SELinuxLabel = "" - } else { - x.SELinuxLabel = (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 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.Volume = "" - } else { - x.Volume = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Destination = "" - } else { - x.Destination = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PropagationMode = "" - } else { - x.PropagationMode = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SELinuxLabel = "" - } else { - x.SELinuxLabel = (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 *IdentityClaimsBuilder) 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 *IdentityClaimsBuilder) 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 *IdentityClaimsBuilder) 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 *IdentityClaimsBuilder) 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 *WorkloadIdentity) 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 x.Audience == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Audience), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Audience\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Audience`) - } - r.WriteMapElemValue() - if x.Audience == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicestring(([]string)(x.Audience), e) - } - } - } - 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 { - 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 { - r.EncodeBool(bool(x.File)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"File\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `File`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.File)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filepath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filepath)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filepath\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filepath`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filepath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filepath)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServiceName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServiceName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServiceName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServiceName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.TTL)); yyxt28 != nil { - z.EncExtension(x.TTL, yyxt28) - } else { - r.EncodeInt(int64(x.TTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TTL`) - } - r.WriteMapElemValue() - if false { - } else if yyxt29 := z.Extension(z.I2Rtid(x.TTL)); yyxt29 != nil { - z.EncExtension(x.TTL, yyxt29) - } else { - r.EncodeInt(int64(x.TTL)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WorkloadIdentity) 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 *WorkloadIdentity) 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 "Audience": - if r.TryDecodeAsNil() { - x.Audience = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Audience), d) - } - } - 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 "Env": - if r.TryDecodeAsNil() { - x.Env = false - } else { - x.Env = (bool)(r.DecodeBool()) - } - case "File": - if r.TryDecodeAsNil() { - x.File = false - } else { - x.File = (bool)(r.DecodeBool()) - } - case "Filepath": - if r.TryDecodeAsNil() { - x.Filepath = "" - } else { - x.Filepath = (string)(r.DecodeString()) - } - case "ServiceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = (string)(r.DecodeString()) - } - case "TTL": - if r.TryDecodeAsNil() { - x.TTL = 0 - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.TTL)); yyxt14 != nil { - z.DecExtension(x.TTL, yyxt14) - } else { - x.TTL = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WorkloadIdentity) 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.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Audience = nil - } else { - if false { - } else { - h.decSlicestring((*[]string)(&x.Audience), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = false - } else { - x.Env = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.File = false - } else { - x.File = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Filepath = "" - } else { - x.Filepath = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TTL = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.TTL)); yyxt26 != nil { - z.DecExtension(x.TTL, yyxt26) - } else { - x.TTL = (time.Duration)(r.DecodeInt64()) - } - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *WorkloadIdentityRequest) 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.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdentityName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdentityName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.WorkloadType.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadType`) - } - r.WriteMapElemValue() - x.WorkloadType.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InterpolatedWorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InterpolatedWorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WorkloadIdentityRequest) 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 *WorkloadIdentityRequest) 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 "IdentityName": - if r.TryDecodeAsNil() { - x.WIHandle.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - case "WorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WIHandle.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - case "WorkloadType": - if r.TryDecodeAsNil() { - x.WIHandle.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - case "InterpolatedWorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WIHandle.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WorkloadIdentityRequest) 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.WIHandle.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WIHandle.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WIHandle.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WIHandle.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (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 *SignedWorkloadIdentity) 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.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.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdentityName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdentityName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.WorkloadType.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadType`) - } - r.WriteMapElemValue() - x.WorkloadType.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InterpolatedWorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InterpolatedWorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JWT))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JWT)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JWT\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JWT`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JWT))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JWT)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Expiration) - } else if yyxt22 := z.Extension(z.I2Rtid(x.Expiration)); yyxt22 != nil { - z.EncExtension(x.Expiration, yyxt22) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Expiration) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Expiration) - } else { - z.EncFallback(x.Expiration) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Expiration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Expiration`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Expiration) - } else if yyxt23 := z.Extension(z.I2Rtid(x.Expiration)); yyxt23 != nil { - z.EncExtension(x.Expiration, yyxt23) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Expiration) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Expiration) - } else { - z.EncFallback(x.Expiration) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SignedWorkloadIdentity) 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 *SignedWorkloadIdentity) 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.WorkloadIdentityRequest.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "IdentityName": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - case "WorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - case "WorkloadType": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - case "InterpolatedWorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (string)(r.DecodeString()) - } - case "JWT": - if r.TryDecodeAsNil() { - x.JWT = "" - } else { - x.JWT = (string)(r.DecodeString()) - } - case "Expiration": - if r.TryDecodeAsNil() { - x.Expiration = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Expiration = r.DecodeTime() - } else if yyxt11 := z.Extension(z.I2Rtid(x.Expiration)); yyxt11 != nil { - z.DecExtension(x.Expiration, yyxt11) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Expiration) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Expiration) - } else { - z.DecFallback(&x.Expiration, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SignedWorkloadIdentity) 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.WorkloadIdentityRequest.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JWT = "" - } else { - x.JWT = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Expiration = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Expiration = r.DecodeTime() - } else if yyxt20 := z.Extension(z.I2Rtid(x.Expiration)); yyxt20 != nil { - z.DecExtension(x.Expiration, yyxt20) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Expiration) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Expiration) - } else { - z.DecFallback(&x.Expiration, false) - } - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *WorkloadIdentityRejection) 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.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdentityName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdentityName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.WorkloadType.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadType`) - } - r.WriteMapElemValue() - x.WorkloadType.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InterpolatedWorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InterpolatedWorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Reason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Reason)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reason\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reason`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Reason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Reason)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WorkloadIdentityRejection) 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 *WorkloadIdentityRejection) 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.WorkloadIdentityRequest.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "IdentityName": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - case "WorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - case "WorkloadType": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - case "InterpolatedWorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (string)(r.DecodeString()) - } - case "Reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WorkloadIdentityRejection) 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.WorkloadIdentityRequest.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.WorkloadIdentityRequest.WIHandle.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentityRequest.WIHandle.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = (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 *AllocIdentitiesRequest) 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 x.Identities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWorkloadIdentityRequest(([]*WorkloadIdentityRequest)(x.Identities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Identities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Identities`) - } - r.WriteMapElemValue() - if x.Identities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWorkloadIdentityRequest(([]*WorkloadIdentityRequest)(x.Identities), 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 { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Filter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Filter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Filter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Filter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PerPage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PerPage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PerPage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reverse\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reverse`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Reverse)) - } - } - 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 *AllocIdentitiesRequest) 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 *AllocIdentitiesRequest) 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 "Identities": - if r.TryDecodeAsNil() { - x.Identities = nil - } else { - if false { - } else { - h.decSlicePtrtoWorkloadIdentityRequest((*[]*WorkloadIdentityRequest)(&x.Identities), 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 "Filter": - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - case "PerPage": - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - case "Reverse": - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - 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 *AllocIdentitiesRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj19 int - var yyb19 bool - var yyhl19 bool = l >= 0 - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Identities = nil - } else { - if false { - } else { - h.decSlicePtrtoWorkloadIdentityRequest((*[]*WorkloadIdentityRequest)(&x.Identities), d) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.DecExtension(x.MaxQueryTime, yyxt26) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Filter = "" - } else { - x.Filter = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.PerPage = 0 - } else { - x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Reverse = false - } else { - x.Reverse = (bool)(r.DecodeBool()) - } - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj19++ - if yyhl19 { - yyb19 = yyj19 > l - } else { - yyb19 = r.CheckBreak() - } - if yyb19 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj19-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocIdentitiesResponse) 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.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSignedWorkloadIdentity(([]*SignedWorkloadIdentity)(x.SignedIdentities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SignedIdentities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SignedIdentities`) - } - r.WriteMapElemValue() - if x.SignedIdentities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSignedWorkloadIdentity(([]*SignedWorkloadIdentity)(x.SignedIdentities), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Rejections == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWorkloadIdentityRejection(([]*WorkloadIdentityRejection)(x.Rejections), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Rejections\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Rejections`) - } - r.WriteMapElemValue() - if x.Rejections == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoWorkloadIdentityRejection(([]*WorkloadIdentityRejection)(x.Rejections), 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.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocIdentitiesResponse) 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 *AllocIdentitiesResponse) 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 "SignedIdentities": - if r.TryDecodeAsNil() { - x.SignedIdentities = nil - } else { - if false { - } else { - h.decSlicePtrtoSignedWorkloadIdentity((*[]*SignedWorkloadIdentity)(&x.SignedIdentities), d) - } - } - case "Rejections": - if r.TryDecodeAsNil() { - x.Rejections = nil - } else { - if false { - } else { - h.decSlicePtrtoWorkloadIdentityRejection((*[]*WorkloadIdentityRejection)(&x.Rejections), 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()) - } - case "NextToken": - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocIdentitiesResponse) 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.SignedIdentities = nil - } else { - if false { - } else { - h.decSlicePtrtoSignedWorkloadIdentity((*[]*SignedWorkloadIdentity)(&x.SignedIdentities), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Rejections = nil - } else { - if false { - } else { - h.decSlicePtrtoWorkloadIdentityRejection((*[]*WorkloadIdentityRejection)(&x.Rejections), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.DecExtension(x.LastContact, yyxt20) - } else { - x.LastContact = (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.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.NextToken = "" - } else { - x.NextToken = (string)(r.DecodeString()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x WorkloadType) 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.EncodeInt(int64(x)) - } -} - -func (x *WorkloadType) 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 = (WorkloadType)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } -} - -func (x *WIHandle) 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.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IdentityName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IdentityName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IdentityName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IdentityName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.WorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.WorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.WorkloadType.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WorkloadType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WorkloadType`) - } - r.WriteMapElemValue() - x.WorkloadType.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InterpolatedWorkloadIdentifier\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InterpolatedWorkloadIdentifier`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InterpolatedWorkloadIdentifier))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InterpolatedWorkloadIdentifier)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WIHandle) 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 *WIHandle) 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 "IdentityName": - if r.TryDecodeAsNil() { - x.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - case "WorkloadIdentifier": - if r.TryDecodeAsNil() { - x.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - case "WorkloadType": - if r.TryDecodeAsNil() { - x.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - case "InterpolatedWorkloadIdentifier": - if r.TryDecodeAsNil() { - x.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WIHandle) 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.IdentityName = "" - } else { - x.IdentityName = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadIdentifier = "" - } else { - x.WorkloadIdentifier = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WorkloadType = 0 - } else { - x.WorkloadType.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.InterpolatedWorkloadIdentifier = "" - } else { - x.InterpolatedWorkloadIdentifier = (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) encSlicePtrtoACLRolePolicyLink(v []*ACLRolePolicyLink, 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) decSlicePtrtoACLRolePolicyLink(v *[]*ACLRolePolicyLink, 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 = []*ACLRolePolicyLink{} - 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([]*ACLRolePolicyLink, 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([]*ACLRolePolicyLink, 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(ACLRolePolicyLink) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLRolePolicyLink, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoACLRole(v []*ACLRole, 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) decSlicePtrtoACLRole(v *[]*ACLRole, 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 = []*ACLRole{} - 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([]*ACLRole, 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([]*ACLRole, 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(ACLRole) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLRole, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -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) encSlicePtrtoACLRoleListStub(v []*ACLRoleListStub, 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) decSlicePtrtoACLRoleListStub(v *[]*ACLRoleListStub, 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 = []*ACLRoleListStub{} - 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([]*ACLRoleListStub, 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([]*ACLRoleListStub, 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(ACLRoleListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLRoleListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoACLRole(v map[string]*ACLRole, 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) decMapstringPtrtoACLRole(v *map[string]*ACLRole, 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]*ACLRole, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ACLRole - 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(ACLRole) - } - 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) encMapstringstring(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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyv1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyv1)) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringstring(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, 32) - yyv1 = make(map[string]string, yyrl1) - *v = yyv1 - } - var yymk1 string - 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 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - 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) 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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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) encSlicePtrtoACLAuthMethodStub(v []*ACLAuthMethodStub, 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) decSlicePtrtoACLAuthMethodStub(v *[]*ACLAuthMethodStub, 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 = []*ACLAuthMethodStub{} - 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([]*ACLAuthMethodStub, 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([]*ACLAuthMethodStub, 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(ACLAuthMethodStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLAuthMethodStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoACLAuthMethod(v map[string]*ACLAuthMethod, 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) decMapstringPtrtoACLAuthMethod(v *map[string]*ACLAuthMethod, 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]*ACLAuthMethod, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ACLAuthMethod - 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(ACLAuthMethod) - } - 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) encSlicePtrtoACLAuthMethod(v []*ACLAuthMethod, 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) decSlicePtrtoACLAuthMethod(v *[]*ACLAuthMethod, 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 = []*ACLAuthMethod{} - 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([]*ACLAuthMethod, 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([]*ACLAuthMethod, 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(ACLAuthMethod) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLAuthMethod, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoACLBindingRule(v []*ACLBindingRule, 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) decSlicePtrtoACLBindingRule(v *[]*ACLBindingRule, 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 = []*ACLBindingRule{} - 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([]*ACLBindingRule, 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([]*ACLBindingRule, 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(ACLBindingRule) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLBindingRule, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoACLBindingRuleListStub(v []*ACLBindingRuleListStub, 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) decSlicePtrtoACLBindingRuleListStub(v *[]*ACLBindingRuleListStub, 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 = []*ACLBindingRuleListStub{} - 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([]*ACLBindingRuleListStub, 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([]*ACLBindingRuleListStub, 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(ACLBindingRuleListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLBindingRuleListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoACLBindingRule(v map[string]*ACLBindingRule, 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) decMapstringPtrtoACLBindingRule(v *map[string]*ACLBindingRule, 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]*ACLBindingRule, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ACLBindingRule - 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(ACLBindingRule) - } - 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) encSlicePtrtoJobAction(v []*JobAction, 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) decSlicePtrtoJobAction(v *[]*JobAction, 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 = []*JobAction{} - 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([]*JobAction, 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([]*JobAction, 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(JobAction) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*JobAction, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoServiceRegistration(v []*ServiceRegistration, 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) decSlicePtrtoServiceRegistration(v *[]*ServiceRegistration, 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 = []*ServiceRegistration{} - 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([]*ServiceRegistration, 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([]*ServiceRegistration, 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(ServiceRegistration) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ServiceRegistration, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSliceServerHealth(v []ServerHealth, 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) decSliceServerHealth(v *[]ServerHealth, 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 = []ServerHealth{} - 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, 136) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]ServerHealth, 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, 136) - } else { - yyrl1 = 8 - } - yyv1 = make([]ServerHealth, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, ServerHealth{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = ServerHealth{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]ServerHealth, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringAutopilotZone(v map[string]AutopilotZone, 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) decMapstringAutopilotZone(v *map[string]AutopilotZone, 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, 72) - yyv1 = make(map[string]AutopilotZone, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 AutopilotZone - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = AutopilotZone{} - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapstringAutopilotZoneUpgradeVersions(v map[string]AutopilotZoneUpgradeVersions, 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) decMapstringAutopilotZoneUpgradeVersions(v *map[string]AutopilotZoneUpgradeVersions, 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, 112) - yyv1 = make(map[string]AutopilotZoneUpgradeVersions, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 AutopilotZoneUpgradeVersions - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = AutopilotZoneUpgradeVersions{} - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -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) encMapstringPtrtoConsulIngressConfigEntry(v map[string]*ConsulIngressConfigEntry, 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) decMapstringPtrtoConsulIngressConfigEntry(v *map[string]*ConsulIngressConfigEntry, 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]*ConsulIngressConfigEntry, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ConsulIngressConfigEntry - 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(ConsulIngressConfigEntry) - } - 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) encMapstringPtrtoConsulTerminatingConfigEntry(v map[string]*ConsulTerminatingConfigEntry, 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) decMapstringPtrtoConsulTerminatingConfigEntry(v *map[string]*ConsulTerminatingConfigEntry, 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]*ConsulTerminatingConfigEntry, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ConsulTerminatingConfigEntry - 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(ConsulTerminatingConfigEntry) - } - 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) encSliceuint16(v []uint16, 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 { - r.EncodeUint(uint64(yyv1)) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSliceuint16(v *[]uint16, 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 = []uint16{} - 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, 2) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]uint16, 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, 2) - } else { - yyrl1 = 8 - } - yyv1 = make([]uint16, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, 0) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = 0 - } else { - yyv1[yyj1] = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]uint16, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encCSISecrets(v CSISecrets, 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyv1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyv1)) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decCSISecrets(v *CSISecrets, 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, 32) - yyv1 = make(map[string]string, yyrl1) - *v = yyv1 - } - var yymk1 string - 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 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - 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) encSlicePtrtoCSITopology(v []*CSITopology, 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) decSlicePtrtoCSITopology(v *[]*CSITopology, 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 = []*CSITopology{} - 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([]*CSITopology, 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([]*CSITopology, 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(CSITopology) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSITopology, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoCSIVolumeCapability(v []*CSIVolumeCapability, 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) decSlicePtrtoCSIVolumeCapability(v *[]*CSIVolumeCapability, 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 = []*CSIVolumeCapability{} - 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([]*CSIVolumeCapability, 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([]*CSIVolumeCapability, 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(CSIVolumeCapability) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSIVolumeCapability, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoAllocation(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 { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoAllocation(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, 24) - yyv1 = make(map[string]*Allocation, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *Allocation - 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(Allocation) - } - 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) encMapstringPtrtoCSIVolumeClaim(v map[string]*CSIVolumeClaim, 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) decMapstringPtrtoCSIVolumeClaim(v *map[string]*CSIVolumeClaim, 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]*CSIVolumeClaim, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *CSIVolumeClaim - 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(CSIVolumeClaim) - } - 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) encSlicePtrtoCSIVolume(v []*CSIVolume, 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) decSlicePtrtoCSIVolume(v *[]*CSIVolume, 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 = []*CSIVolume{} - 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([]*CSIVolume, 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([]*CSIVolume, 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(CSIVolume) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSIVolume, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSliceCSIVolumeClaimRequest(v []CSIVolumeClaimRequest, 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) decSliceCSIVolumeClaimRequest(v *[]CSIVolumeClaimRequest, 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 = []CSIVolumeClaimRequest{} - 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, 200) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]CSIVolumeClaimRequest, 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, 200) - } else { - yyrl1 = 8 - } - yyv1 = make([]CSIVolumeClaimRequest, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, CSIVolumeClaimRequest{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = CSIVolumeClaimRequest{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]CSIVolumeClaimRequest, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoCSIVolListStub(v []*CSIVolListStub, 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) decSlicePtrtoCSIVolListStub(v *[]*CSIVolListStub, 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 = []*CSIVolListStub{} - 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([]*CSIVolListStub, 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([]*CSIVolListStub, 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(CSIVolListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSIVolListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoCSIVolumeExternalStub(v []*CSIVolumeExternalStub, 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) decSlicePtrtoCSIVolumeExternalStub(v *[]*CSIVolumeExternalStub, 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 = []*CSIVolumeExternalStub{} - 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([]*CSIVolumeExternalStub, 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([]*CSIVolumeExternalStub, 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(CSIVolumeExternalStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSIVolumeExternalStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoCSISnapshot(v []*CSISnapshot, 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) decSlicePtrtoCSISnapshot(v *[]*CSISnapshot, 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 = []*CSISnapshot{} - 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([]*CSISnapshot, 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([]*CSISnapshot, 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(CSISnapshot) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSISnapshot, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoCSIInfo(v map[string]*CSIInfo, 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) decMapstringPtrtoCSIInfo(v *map[string]*CSIInfo, 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]*CSIInfo, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *CSIInfo - 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(CSIInfo) - } - 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) encJobNamespacedDescriptions(v JobNamespacedDescriptions, 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) decJobNamespacedDescriptions(v *JobNamespacedDescriptions, 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[string]JobDescription, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 JobDescription - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = JobDescription{} - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encJobDescriptions(v JobDescriptions, 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) decJobDescriptions(v *JobDescriptions, 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]JobNamespacedDescriptions, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 JobNamespacedDescriptions - 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) encSlicePtrtoCSIPluginListStub(v []*CSIPluginListStub, 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) decSlicePtrtoCSIPluginListStub(v *[]*CSIPluginListStub, 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 = []*CSIPluginListStub{} - 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([]*CSIPluginListStub, 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([]*CSIPluginListStub, 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(CSIPluginListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*CSIPluginListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -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) encMapstringint(v map[string]int, 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 false { - } else { - r.EncodeInt(int64(yyv1)) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringint(v *map[string]int, 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]int, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 int - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1 = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = 0 - } - } else if 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) encMapstringuint64(v map[string]uint64, 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 false { - } else { - r.EncodeUint(uint64(yyv1)) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringuint64(v *map[string]uint64, 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]uint64, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 uint64 - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1 = (uint64)(r.DecodeUint64()) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = 0 - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -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) encMapTopicSlicestring(v map[Topic][]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 { - h.encSlicestring(([]string)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapTopicSlicestring(v *map[Topic][]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[Topic][]string, yyrl1) - *v = yyv1 - } - var yymk1 Topic - 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 { - h.decSlicestring((*[]string)(&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) encSliceEvent(v []Event, 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) decSliceEvent(v *[]Event, 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 = []Event{} - 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, 112) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]Event, 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, 112) - } else { - yyrl1 = 8 - } - yyv1 = make([]Event, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, Event{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = Event{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]Event, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encTerminalByNodeByName(v TerminalByNodeByName, 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.encMapstringPtrtoAllocation((map[string]*Allocation)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decTerminalByNodeByName(v *TerminalByNodeByName, 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]map[string]*Allocation, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 map[string]*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.decMapstringPtrtoAllocation((*map[string]*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) 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) encSliceNamespacedID(v []NamespacedID, 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) decSliceNamespacedID(v *[]NamespacedID, 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 = []NamespacedID{} - 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([]NamespacedID, 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([]NamespacedID, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, NamespacedID{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = NamespacedID{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]NamespacedID, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSliceJobStatusesJob(v []JobStatusesJob, 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) decSliceJobStatusesJob(v *[]JobStatusesJob, 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 = []JobStatusesJob{} - 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, 240) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]JobStatusesJob, 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, 240) - } else { - yyrl1 = 8 - } - yyv1 = make([]JobStatusesJob, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, JobStatusesJob{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = JobStatusesJob{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]JobStatusesJob, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSliceJobStatusesAlloc(v []JobStatusesAlloc, 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) decSliceJobStatusesAlloc(v *[]JobStatusesAlloc, 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 = []JobStatusesAlloc{} - 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, 112) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]JobStatusesAlloc, 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, 112) - } else { - yyrl1 = 8 - } - yyv1 = make([]JobStatusesAlloc, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, JobStatusesAlloc{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = JobStatusesAlloc{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]JobStatusesAlloc, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoWrappedKey(v []*WrappedKey, 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) decSlicePtrtoWrappedKey(v *[]*WrappedKey, 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 = []*WrappedKey{} - 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([]*WrappedKey, 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([]*WrappedKey, 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(WrappedKey) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*WrappedKey, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoRootKeyMeta(v []*RootKeyMeta, 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) decSlicePtrtoRootKeyMeta(v *[]*RootKeyMeta, 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 = []*RootKeyMeta{} - 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([]*RootKeyMeta, 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([]*RootKeyMeta, 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(RootKeyMeta) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*RootKeyMeta, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoKeyringPublicKey(v []*KeyringPublicKey, 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) decSlicePtrtoKeyringPublicKey(v *[]*KeyringPublicKey, 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 = []*KeyringPublicKey{} - 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([]*KeyringPublicKey, 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([]*KeyringPublicKey, 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(KeyringPublicKey) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*KeyringPublicKey, 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) encSlicePtrtoNodeNetworkResource(v []*NodeNetworkResource, 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) decSlicePtrtoNodeNetworkResource(v *[]*NodeNetworkResource, 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 = []*NodeNetworkResource{} - 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([]*NodeNetworkResource, 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([]*NodeNetworkResource, 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(NodeNetworkResource) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeNetworkResource, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringSliceNodeNetworkAddress(v map[string][]NodeNetworkAddress, 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.encSliceNodeNetworkAddress(([]NodeNetworkAddress)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringSliceNodeNetworkAddress(v *map[string][]NodeNetworkAddress, 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][]NodeNetworkAddress, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 []NodeNetworkAddress - 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.decSliceNodeNetworkAddress((*[]NodeNetworkAddress)(&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) encSliceNodeNetworkAddress(v []NodeNetworkAddress, 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) decSliceNodeNetworkAddress(v *[]NodeNetworkAddress, 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 = []NodeNetworkAddress{} - 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, 80) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]NodeNetworkAddress, 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, 80) - } else { - yyrl1 = 8 - } - yyv1 = make([]NodeNetworkAddress, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, NodeNetworkAddress{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = NodeNetworkAddress{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]NodeNetworkAddress, 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) encMapstringPtrtostring(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 { - yy3 := *yyv1 - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yy3))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yy3)) - } - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtostring(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, 24) - yyv1 = make(map[string]*string, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *string - 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(string) - } - if false { - } else { - *yymv1 = (string)(r.DecodeString()) - } - } - - 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) encSlicePtrtoNodePool(v []*NodePool, 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) decSlicePtrtoNodePool(v *[]*NodePool, 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 = []*NodePool{} - 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([]*NodePool, 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([]*NodePool, 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(NodePool) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodePool, 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) 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) 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) 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 { - h.encSlicestring(([]string)(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 { - h.decSlicestring((*[]string)(&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) encMapContextSliceFuzzyMatch(v map[Context][]FuzzyMatch, 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 { - h.encSliceFuzzyMatch(([]FuzzyMatch)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapContextSliceFuzzyMatch(v *map[Context][]FuzzyMatch, 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][]FuzzyMatch, yyrl1) - *v = yyv1 - } - var yymk1 Context - var yymv1 []FuzzyMatch - 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 { - h.decSliceFuzzyMatch((*[]FuzzyMatch)(&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) encSliceFuzzyMatch(v []FuzzyMatch, 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) decSliceFuzzyMatch(v *[]FuzzyMatch, 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 = []FuzzyMatch{} - 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, 40) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]FuzzyMatch, 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, 40) - } else { - yyrl1 = 8 - } - yyv1 = make([]FuzzyMatch, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, FuzzyMatch{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = FuzzyMatch{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]FuzzyMatch, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoSITokenAccessor(v []*SITokenAccessor, 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) decSlicePtrtoSITokenAccessor(v *[]*SITokenAccessor, 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 = []*SITokenAccessor{} - 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([]*SITokenAccessor, 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([]*SITokenAccessor, 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(SITokenAccessor) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*SITokenAccessor, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoServiceRegistrationListStub(v []*ServiceRegistrationListStub, 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) decSlicePtrtoServiceRegistrationListStub(v *[]*ServiceRegistrationListStub, 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 = []*ServiceRegistrationListStub{} - 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([]*ServiceRegistrationListStub, 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([]*ServiceRegistrationListStub, 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(ServiceRegistrationListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ServiceRegistrationListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoServiceRegistrationStub(v []*ServiceRegistrationStub, 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) decSlicePtrtoServiceRegistrationStub(v *[]*ServiceRegistrationStub, 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 = []*ServiceRegistrationStub{} - 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([]*ServiceRegistrationStub, 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([]*ServiceRegistrationStub, 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(ServiceRegistrationStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ServiceRegistrationStub, 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) encMapstringInterface(v map[string]interface{}, 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.EncFallback(yyv1) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringInterface(v *map[string]interface{}, 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, 32) - yyv1 = make(map[string]interface{}, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 interface{} - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - if !yybh1.InterfaceReset { - 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.DecFallback(&yymv1, true) - } - } - - 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) 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) 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, 176) - 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, 176) - } 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) encSliceConsulExposePath(v []ConsulExposePath, 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) decSliceConsulExposePath(v *[]ConsulExposePath, 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 = []ConsulExposePath{} - 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, 56) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]ConsulExposePath, 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, 56) - } else { - yyrl1 = 8 - } - yyv1 = make([]ConsulExposePath, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, ConsulExposePath{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = ConsulExposePath{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]ConsulExposePath, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoConsulGatewayBindAddress(v map[string]*ConsulGatewayBindAddress, 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) decMapstringPtrtoConsulGatewayBindAddress(v *map[string]*ConsulGatewayBindAddress, 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]*ConsulGatewayBindAddress, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ConsulGatewayBindAddress - 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(ConsulGatewayBindAddress) - } - 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) encSlicePtrtoConsulIngressService(v []*ConsulIngressService, 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) decSlicePtrtoConsulIngressService(v *[]*ConsulIngressService, 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 = []*ConsulIngressService{} - 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([]*ConsulIngressService, 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([]*ConsulIngressService, 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(ConsulIngressService) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ConsulIngressService, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoConsulIngressListener(v []*ConsulIngressListener, 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) decSlicePtrtoConsulIngressListener(v *[]*ConsulIngressListener, 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 = []*ConsulIngressListener{} - 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([]*ConsulIngressListener, 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([]*ConsulIngressListener, 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(ConsulIngressListener) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ConsulIngressListener, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoConsulLinkedService(v []*ConsulLinkedService, 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) decSlicePtrtoConsulLinkedService(v *[]*ConsulLinkedService, 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 = []*ConsulLinkedService{} - 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([]*ConsulLinkedService, 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([]*ConsulLinkedService, 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(ConsulLinkedService) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ConsulLinkedService, 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) 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) 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) encSlicePtrtoScalingPolicyListStub(v []*ScalingPolicyListStub, 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) decSlicePtrtoScalingPolicyListStub(v *[]*ScalingPolicyListStub, 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 = []*ScalingPolicyListStub{} - 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([]*ScalingPolicyListStub, 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([]*ScalingPolicyListStub, 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(ScalingPolicyListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ScalingPolicyListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -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) encMapstringPtrtoTaskGroupScaleStatus(v map[string]*TaskGroupScaleStatus, 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) decMapstringPtrtoTaskGroupScaleStatus(v *map[string]*TaskGroupScaleStatus, 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]*TaskGroupScaleStatus, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *TaskGroupScaleStatus - 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(TaskGroupScaleStatus) - } - 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) encSlicePtrtoScalingEvent(v []*ScalingEvent, 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) decSlicePtrtoScalingEvent(v *[]*ScalingEvent, 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 = []*ScalingEvent{} - 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([]*ScalingEvent, 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([]*ScalingEvent, 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(ScalingEvent) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ScalingEvent, 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) encSliceSignedWorkloadIdentity(v []SignedWorkloadIdentity, 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) decSliceSignedWorkloadIdentity(v *[]SignedWorkloadIdentity, 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 = []SignedWorkloadIdentity{} - 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, 112) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]SignedWorkloadIdentity, 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, 112) - } else { - yyrl1 = 8 - } - yyv1 = make([]SignedWorkloadIdentity, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, SignedWorkloadIdentity{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = SignedWorkloadIdentity{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]SignedWorkloadIdentity, 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) encMapstringPtrtoClientHostNetworkConfig(v map[string]*ClientHostNetworkConfig, 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) decMapstringPtrtoClientHostNetworkConfig(v *map[string]*ClientHostNetworkConfig, 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]*ClientHostNetworkConfig, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ClientHostNetworkConfig - 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(ClientHostNetworkConfig) - } - 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) encAllocatedPorts(v AllocatedPorts, 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) decAllocatedPorts(v *AllocatedPorts, 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 = []AllocatedPortMapping{} - 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, 64) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]AllocatedPortMapping, 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, 64) - } else { - yyrl1 = 8 - } - yyv1 = make([]AllocatedPortMapping, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, AllocatedPortMapping{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = AllocatedPortMapping{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]AllocatedPortMapping, 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, 64) - 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, 64) - } 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]*pkg3_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]*pkg3_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]*pkg3_structs.Attribute, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *pkg3_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(pkg3_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) encMapstringPtrtoTaskLifecycleConfig(v map[string]*TaskLifecycleConfig, 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) decMapstringPtrtoTaskLifecycleConfig(v *map[string]*TaskLifecycleConfig, 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]*TaskLifecycleConfig, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *TaskLifecycleConfig - 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(TaskLifecycleConfig) - } - 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) encSlicePtrtoJobUILink(v []*JobUILink, 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) decSlicePtrtoJobUILink(v *[]*JobUILink, 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 = []*JobUILink{} - 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([]*JobUILink, 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([]*JobUILink, 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(JobUILink) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*JobUILink, 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, 72) - yyv1 = make(map[string]TaskGroupSummary, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 TaskGroupSummary - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - 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) encSlicePtrtoMultiregionRegion(v []*MultiregionRegion, 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) decSlicePtrtoMultiregionRegion(v *[]*MultiregionRegion, 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 = []*MultiregionRegion{} - 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([]*MultiregionRegion, 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([]*MultiregionRegion, 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(MultiregionRegion) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*MultiregionRegion, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoNamespace(v []*Namespace, 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) decSlicePtrtoNamespace(v *[]*Namespace, 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 = []*Namespace{} - 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([]*Namespace, 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([]*Namespace, 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(Namespace) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Namespace, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoNamespace(v map[string]*Namespace, 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) decMapstringPtrtoNamespace(v *map[string]*Namespace, 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]*Namespace, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *Namespace - 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(Namespace) - } - 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) encMapstringSlicePtrtoScalingEvent(v map[string][]*ScalingEvent, 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.encSlicePtrtoScalingEvent(([]*ScalingEvent)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringSlicePtrtoScalingEvent(v *map[string][]*ScalingEvent, 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][]*ScalingEvent, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 []*ScalingEvent - 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.decSlicePtrtoScalingEvent((*[]*ScalingEvent)(&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) 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) encSlicePtrtoScalingPolicy(v []*ScalingPolicy, 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) decSlicePtrtoScalingPolicy(v *[]*ScalingPolicy, 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 = []*ScalingPolicy{} - 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([]*ScalingPolicy, 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([]*ScalingPolicy, 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(ScalingPolicy) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ScalingPolicy, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoWorkloadIdentity(v []*WorkloadIdentity, 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) decSlicePtrtoWorkloadIdentity(v *[]*WorkloadIdentity, 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 = []*WorkloadIdentity{} - 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([]*WorkloadIdentity, 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([]*WorkloadIdentity, 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(WorkloadIdentity) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*WorkloadIdentity, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoAction(v []*Action, 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) decSlicePtrtoAction(v *[]*Action, 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 = []*Action{} - 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([]*Action, 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([]*Action, 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(Action) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Action, 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) encSlicePtrtoAllocState(v []*AllocState, 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) decSlicePtrtoAllocState(v *[]*AllocState, 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 = []*AllocState{} - 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([]*AllocState, 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([]*AllocState, 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(AllocState) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*AllocState, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringfloat64(v map[string]float64, 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 false { - } else { - r.EncodeFloat64(float64(yyv1)) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringfloat64(v *map[string]float64, 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]float64, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 float64 - 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 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1 = (float64)(r.DecodeFloat64()) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = 0 - } - } else if 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) encSlicePtrtoEvaluationStub(v []*EvaluationStub, 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) decSlicePtrtoEvaluationStub(v *[]*EvaluationStub, 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 = []*EvaluationStub{} - 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([]*EvaluationStub, 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([]*EvaluationStub, 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(EvaluationStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*EvaluationStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringbool(v map[string]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() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(yyv1)) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringbool(v *map[string]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[string]bool, yyrl1) - *v = yyv1 - } - var yymk1 string - 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 = (string)(r.DecodeString()) - } - - 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) 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) encSlicePtrtoACLTokenRoleLink(v []*ACLTokenRoleLink, 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) decSlicePtrtoACLTokenRoleLink(v *[]*ACLTokenRoleLink, 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 = []*ACLTokenRoleLink{} - 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([]*ACLTokenRoleLink, 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([]*ACLTokenRoleLink, 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(ACLTokenRoleLink) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLTokenRoleLink, 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 - } -} - -func (x codecSelfer100) encVariableItems(v VariableItems, 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 false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyv1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyv1)) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decVariableItems(v *VariableItems, 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, 32) - yyv1 = make(map[string]string, yyrl1) - *v = yyv1 - } - var yymk1 string - 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 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - 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) encSlicePtrtoVariableMetadata(v []*VariableMetadata, 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) decSlicePtrtoVariableMetadata(v *[]*VariableMetadata, 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 = []*VariableMetadata{} - 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([]*VariableMetadata, 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([]*VariableMetadata, 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(VariableMetadata) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*VariableMetadata, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoWorkloadIdentityRequest(v []*WorkloadIdentityRequest, 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) decSlicePtrtoWorkloadIdentityRequest(v *[]*WorkloadIdentityRequest, 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 = []*WorkloadIdentityRequest{} - 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([]*WorkloadIdentityRequest, 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([]*WorkloadIdentityRequest, 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(WorkloadIdentityRequest) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*WorkloadIdentityRequest, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoSignedWorkloadIdentity(v []*SignedWorkloadIdentity, 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) decSlicePtrtoSignedWorkloadIdentity(v *[]*SignedWorkloadIdentity, 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 = []*SignedWorkloadIdentity{} - 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([]*SignedWorkloadIdentity, 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([]*SignedWorkloadIdentity, 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(SignedWorkloadIdentity) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*SignedWorkloadIdentity, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoWorkloadIdentityRejection(v []*WorkloadIdentityRejection, 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) decSlicePtrtoWorkloadIdentityRejection(v *[]*WorkloadIdentityRejection, 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 = []*WorkloadIdentityRejection{} - 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([]*WorkloadIdentityRejection, 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([]*WorkloadIdentityRejection, 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(WorkloadIdentityRejection) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*WorkloadIdentityRejection, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} diff --git a/version/version.go b/version/version.go index 50a2af096fa..74108e67ba0 100644 --- a/version/version.go +++ b/version/version.go @@ -19,12 +19,12 @@ var ( GitDescribe string // The main version number that is being run at the moment. - Version = "9.9.9999" + Version = "9.9.10000" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. - VersionPrerelease = "" + VersionPrerelease = "dev" // VersionMetadata is metadata further describing the build type. VersionMetadata = ""