Regenerate files

pull/6/head
Wojciech Tyczynski 2015-11-05 10:25:35 +01:00
parent ebf4086a92
commit 58062bc347
11 changed files with 17365 additions and 7774 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,10 +31,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -45,10 +53,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -76,18 +84,21 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(18)
} else {
var yynn2 int = 16
yynn2 = 16
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -100,7 +111,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -110,6 +123,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -122,7 +136,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -132,6 +148,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym10 := z.EncBinary()
_ = yym10
if false {
@ -139,7 +156,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("bindAddress"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym11 := z.EncBinary()
_ = yym11
if false {
@ -148,6 +167,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym13 := z.EncBinary()
_ = yym13
if false {
@ -155,7 +175,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeBool(bool(x.CleanupIPTables))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("cleanupIPTables"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
@ -164,6 +186,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym16 := z.EncBinary()
_ = yym16
if false {
@ -171,7 +194,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym17 := z.EncBinary()
_ = yym17
if false {
@ -180,6 +205,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym19 := z.EncBinary()
_ = yym19
if false {
@ -187,7 +213,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.HealthzPort))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("healthzPort"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym20 := z.EncBinary()
_ = yym20
if false {
@ -196,6 +224,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym22 := z.EncBinary()
_ = yym22
if false {
@ -203,7 +232,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym23 := z.EncBinary()
_ = yym23
if false {
@ -212,6 +243,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym25 := z.EncBinary()
_ = yym25
if false {
@ -219,7 +251,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.IPTablesSyncePeriodSeconds))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("iptablesSyncPeriodSeconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym26 := z.EncBinary()
_ = yym26
if false {
@ -228,6 +262,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym28 := z.EncBinary()
_ = yym28
if false {
@ -235,7 +270,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.KubeAPIBurst))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym29 := z.EncBinary()
_ = yym29
if false {
@ -244,6 +281,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym31 := z.EncBinary()
_ = yym31
if false {
@ -251,7 +289,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.KubeAPIQPS))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym32 := z.EncBinary()
_ = yym32
if false {
@ -260,6 +300,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym34 := z.EncBinary()
_ = yym34
if false {
@ -267,7 +308,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kubeconfigPath"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym35 := z.EncBinary()
_ = yym35
if false {
@ -276,6 +319,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym37 := z.EncBinary()
_ = yym37
if false {
@ -283,7 +327,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeBool(bool(x.MasqueradeAll))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("masqueradeAll"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym38 := z.EncBinary()
_ = yym38
if false {
@ -292,6 +338,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym40 := z.EncBinary()
_ = yym40
if false {
@ -299,7 +346,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Master))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("master"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym41 := z.EncBinary()
_ = yym41
if false {
@ -308,6 +357,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.OOMScoreAdj == nil {
r.EncodeNil()
} else {
@ -320,7 +370,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.OOMScoreAdj == nil {
r.EncodeNil()
} else {
@ -334,12 +386,16 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
x.Mode.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("mode"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
x.Mode.CodecEncodeSelf(e)
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym49 := z.EncBinary()
_ = yym49
if false {
@ -347,7 +403,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.PortRange))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("portRange"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym50 := z.EncBinary()
_ = yym50
if false {
@ -356,6 +414,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym52 := z.EncBinary()
_ = yym52
if false {
@ -363,7 +422,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("resourceContainer"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym53 := z.EncBinary()
_ = yym53
if false {
@ -372,6 +433,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym55 := z.EncBinary()
_ = yym55
if false {
@ -379,7 +441,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.UDPTimeoutMilliseconds))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("udpTimeoutMilliseconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym56 := z.EncBinary()
_ = yym56
if false {
@ -387,8 +451,10 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.UDPTimeoutMilliseconds))
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -403,17 +469,18 @@ func (x *KubeProxyConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct58 := r.ContainerType()
if yyct58 == codecSelferValueTypeMap1234 {
yyl58 := r.ReadMapStart()
if yyl58 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl58, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct58 == codecSelferValueTypeArray1234 {
yyl58 := r.ReadArrayStart()
if yyl58 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl58, d)
}
@ -440,8 +507,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Deco
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys59Slc = r.DecodeBytes(yys59Slc, true, true)
yys59 := string(yys59Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys59 {
case "kind":
if r.TryDecodeAsNil() {
@ -565,9 +634,7 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Deco
z.DecStructFieldNotFound(-1, yys59)
} // end switch yys59
} // end for yyj59
if !yyhl59 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -584,9 +651,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -599,9 +667,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -614,9 +683,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.BindAddress = ""
} else {
@ -629,9 +699,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CleanupIPTables = false
} else {
@ -644,9 +715,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.HealthzBindAddress = ""
} else {
@ -659,9 +731,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.HealthzPort = 0
} else {
@ -674,9 +747,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.HostnameOverride = ""
} else {
@ -689,9 +763,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.IPTablesSyncePeriodSeconds = 0
} else {
@ -704,9 +779,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.KubeAPIBurst = 0
} else {
@ -719,9 +795,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.KubeAPIQPS = 0
} else {
@ -734,9 +811,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.KubeconfigPath = ""
} else {
@ -749,9 +827,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.MasqueradeAll = false
} else {
@ -764,9 +843,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Master = ""
} else {
@ -779,9 +859,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.OOMScoreAdj != nil {
x.OOMScoreAdj = nil
@ -804,9 +885,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Mode = ""
} else {
@ -819,9 +901,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.PortRange = ""
} else {
@ -834,9 +917,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ResourceContainer = ""
} else {
@ -849,9 +933,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.UDPTimeoutMilliseconds = 0
} else {
@ -867,9 +952,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
if yyb79 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj79-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x ProxyMode) CodecEncodeSelf(e *codec1978.Encoder) {

View File

@ -31,10 +31,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -45,10 +53,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -76,18 +84,21 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(18)
} else {
var yynn2 int = 16
yynn2 = 16
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -100,7 +111,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -110,6 +123,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -122,7 +136,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -132,6 +148,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym10 := z.EncBinary()
_ = yym10
if false {
@ -139,7 +156,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("bindAddress"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym11 := z.EncBinary()
_ = yym11
if false {
@ -148,6 +167,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym13 := z.EncBinary()
_ = yym13
if false {
@ -155,7 +175,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeBool(bool(x.CleanupIPTables))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("cleanupIPTables"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
@ -164,6 +186,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym16 := z.EncBinary()
_ = yym16
if false {
@ -171,7 +194,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym17 := z.EncBinary()
_ = yym17
if false {
@ -180,6 +205,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym19 := z.EncBinary()
_ = yym19
if false {
@ -187,7 +213,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.HealthzPort))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("healthzPort"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym20 := z.EncBinary()
_ = yym20
if false {
@ -196,6 +224,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym22 := z.EncBinary()
_ = yym22
if false {
@ -203,7 +232,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym23 := z.EncBinary()
_ = yym23
if false {
@ -212,6 +243,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym25 := z.EncBinary()
_ = yym25
if false {
@ -219,7 +251,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.IPTablesSyncePeriodSeconds))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("iptablesSyncPeriodSeconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym26 := z.EncBinary()
_ = yym26
if false {
@ -228,6 +262,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym28 := z.EncBinary()
_ = yym28
if false {
@ -235,7 +270,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.KubeAPIBurst))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym29 := z.EncBinary()
_ = yym29
if false {
@ -244,6 +281,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym31 := z.EncBinary()
_ = yym31
if false {
@ -251,7 +289,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.KubeAPIQPS))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym32 := z.EncBinary()
_ = yym32
if false {
@ -260,6 +300,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym34 := z.EncBinary()
_ = yym34
if false {
@ -267,7 +308,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kubeconfigPath"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym35 := z.EncBinary()
_ = yym35
if false {
@ -276,6 +319,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym37 := z.EncBinary()
_ = yym37
if false {
@ -283,7 +327,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeBool(bool(x.MasqueradeAll))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("masqueradeAll"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym38 := z.EncBinary()
_ = yym38
if false {
@ -292,6 +338,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym40 := z.EncBinary()
_ = yym40
if false {
@ -299,7 +346,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Master))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("master"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym41 := z.EncBinary()
_ = yym41
if false {
@ -308,6 +357,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.OOMScoreAdj == nil {
r.EncodeNil()
} else {
@ -320,7 +370,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.OOMScoreAdj == nil {
r.EncodeNil()
} else {
@ -334,12 +386,16 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
x.Mode.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("mode"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
x.Mode.CodecEncodeSelf(e)
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym49 := z.EncBinary()
_ = yym49
if false {
@ -347,7 +403,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.PortRange))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("portRange"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym50 := z.EncBinary()
_ = yym50
if false {
@ -356,6 +414,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym52 := z.EncBinary()
_ = yym52
if false {
@ -363,7 +422,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("resourceContainer"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym53 := z.EncBinary()
_ = yym53
if false {
@ -372,6 +433,7 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym55 := z.EncBinary()
_ = yym55
if false {
@ -379,7 +441,9 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.UDPTimeoutMilliseconds))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("udpTimeoutMilliseconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym56 := z.EncBinary()
_ = yym56
if false {
@ -387,8 +451,10 @@ func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.UDPTimeoutMilliseconds))
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -403,17 +469,18 @@ func (x *KubeProxyConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct58 := r.ContainerType()
if yyct58 == codecSelferValueTypeMap1234 {
yyl58 := r.ReadMapStart()
if yyl58 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl58, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct58 == codecSelferValueTypeArray1234 {
yyl58 := r.ReadArrayStart()
if yyl58 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl58, d)
}
@ -440,8 +507,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Deco
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys59Slc = r.DecodeBytes(yys59Slc, true, true)
yys59 := string(yys59Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys59 {
case "kind":
if r.TryDecodeAsNil() {
@ -565,9 +634,7 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Deco
z.DecStructFieldNotFound(-1, yys59)
} // end switch yys59
} // end for yyj59
if !yyhl59 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -584,9 +651,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -599,9 +667,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -614,9 +683,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.BindAddress = ""
} else {
@ -629,9 +699,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CleanupIPTables = false
} else {
@ -644,9 +715,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.HealthzBindAddress = ""
} else {
@ -659,9 +731,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.HealthzPort = 0
} else {
@ -674,9 +747,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.HostnameOverride = ""
} else {
@ -689,9 +763,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.IPTablesSyncePeriodSeconds = 0
} else {
@ -704,9 +779,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.KubeAPIBurst = 0
} else {
@ -719,9 +795,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.KubeAPIQPS = 0
} else {
@ -734,9 +811,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.KubeconfigPath = ""
} else {
@ -749,9 +827,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.MasqueradeAll = false
} else {
@ -764,9 +843,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Master = ""
} else {
@ -779,9 +859,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.OOMScoreAdj != nil {
x.OOMScoreAdj = nil
@ -804,9 +885,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Mode = ""
} else {
@ -819,9 +901,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.PortRange = ""
} else {
@ -834,9 +917,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ResourceContainer = ""
} else {
@ -849,9 +933,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
yyb79 = r.CheckBreak()
}
if yyb79 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.UDPTimeoutMilliseconds = 0
} else {
@ -867,9 +952,10 @@ func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.De
if yyb79 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj79-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x ProxyMode) CodecEncodeSelf(e *codec1978.Encoder) {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,10 +31,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -45,10 +53,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -76,18 +84,21 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
} else {
var yynn2 int = 0
yynn2 = 0
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -100,7 +111,9 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -110,6 +123,7 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -122,7 +136,9 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -131,8 +147,10 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -147,17 +165,18 @@ func (x *RawNode) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct10 := r.ContainerType()
if yyct10 == codecSelferValueTypeMap1234 {
yyl10 := r.ReadMapStart()
if yyl10 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl10, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct10 == codecSelferValueTypeArray1234 {
yyl10 := r.ReadArrayStart()
if yyl10 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl10, d)
}
@ -184,8 +203,10 @@ func (x *RawNode) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys11Slc = r.DecodeBytes(yys11Slc, true, true)
yys11 := string(yys11Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys11 {
case "kind":
if r.TryDecodeAsNil() {
@ -203,9 +224,7 @@ func (x *RawNode) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys11)
} // end switch yys11
} // end for yyj11
if !yyhl11 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -222,9 +241,10 @@ func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb14 = r.CheckBreak()
}
if yyb14 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -237,9 +257,10 @@ func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb14 = r.CheckBreak()
}
if yyb14 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -255,9 +276,10 @@ func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb14 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj14-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
@ -279,18 +301,21 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr18 bool = false
yyq18[0] = x.Kind != ""
yyq18[1] = x.APIVersion != ""
var yynn18 int
if yyr18 || yy2arr18 {
r.EncodeArrayStart(2)
} else {
var yynn18 int = 0
yynn18 = 0
for _, b := range yyq18 {
if b {
yynn18++
}
}
r.EncodeMapStart(yynn18)
yynn18 = 0
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq18[0] {
yym20 := z.EncBinary()
_ = yym20
@ -303,7 +328,9 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq18[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym21 := z.EncBinary()
_ = yym21
if false {
@ -313,6 +340,7 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq18[1] {
yym23 := z.EncBinary()
_ = yym23
@ -325,7 +353,9 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq18[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym24 := z.EncBinary()
_ = yym24
if false {
@ -334,8 +364,10 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep18 {
r.EncodeEnd()
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -350,17 +382,18 @@ func (x *RawPod) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct26 := r.ContainerType()
if yyct26 == codecSelferValueTypeMap1234 {
yyl26 := r.ReadMapStart()
if yyl26 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl26, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct26 == codecSelferValueTypeArray1234 {
yyl26 := r.ReadArrayStart()
if yyl26 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl26, d)
}
@ -387,8 +420,10 @@ func (x *RawPod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys27Slc = r.DecodeBytes(yys27Slc, true, true)
yys27 := string(yys27Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys27 {
case "kind":
if r.TryDecodeAsNil() {
@ -406,9 +441,7 @@ func (x *RawPod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys27)
} // end switch yys27
} // end for yyj27
if !yyhl27 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -425,9 +458,10 @@ func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb30 = r.CheckBreak()
}
if yyb30 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -440,9 +474,10 @@ func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb30 = r.CheckBreak()
}
if yyb30 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -458,7 +493,8 @@ func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb30 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj30-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View File

@ -31,10 +31,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -45,10 +53,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -76,18 +84,21 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
} else {
var yynn2 int = 0
yynn2 = 0
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -100,7 +111,9 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -110,6 +123,7 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -122,7 +136,9 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -131,8 +147,10 @@ func (x *RawNode) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -147,17 +165,18 @@ func (x *RawNode) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct10 := r.ContainerType()
if yyct10 == codecSelferValueTypeMap1234 {
yyl10 := r.ReadMapStart()
if yyl10 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl10, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct10 == codecSelferValueTypeArray1234 {
yyl10 := r.ReadArrayStart()
if yyl10 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl10, d)
}
@ -184,8 +203,10 @@ func (x *RawNode) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys11Slc = r.DecodeBytes(yys11Slc, true, true)
yys11 := string(yys11Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys11 {
case "kind":
if r.TryDecodeAsNil() {
@ -203,9 +224,7 @@ func (x *RawNode) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys11)
} // end switch yys11
} // end for yyj11
if !yyhl11 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -222,9 +241,10 @@ func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb14 = r.CheckBreak()
}
if yyb14 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -237,9 +257,10 @@ func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb14 = r.CheckBreak()
}
if yyb14 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -255,9 +276,10 @@ func (x *RawNode) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb14 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj14-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
@ -279,18 +301,21 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr18 bool = false
yyq18[0] = x.Kind != ""
yyq18[1] = x.APIVersion != ""
var yynn18 int
if yyr18 || yy2arr18 {
r.EncodeArrayStart(2)
} else {
var yynn18 int = 0
yynn18 = 0
for _, b := range yyq18 {
if b {
yynn18++
}
}
r.EncodeMapStart(yynn18)
yynn18 = 0
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq18[0] {
yym20 := z.EncBinary()
_ = yym20
@ -303,7 +328,9 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq18[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym21 := z.EncBinary()
_ = yym21
if false {
@ -313,6 +340,7 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq18[1] {
yym23 := z.EncBinary()
_ = yym23
@ -325,7 +353,9 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq18[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym24 := z.EncBinary()
_ = yym24
if false {
@ -334,8 +364,10 @@ func (x *RawPod) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep18 {
r.EncodeEnd()
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -350,17 +382,18 @@ func (x *RawPod) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct26 := r.ContainerType()
if yyct26 == codecSelferValueTypeMap1234 {
yyl26 := r.ReadMapStart()
if yyl26 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl26, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct26 == codecSelferValueTypeArray1234 {
yyl26 := r.ReadArrayStart()
if yyl26 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl26, d)
}
@ -387,8 +420,10 @@ func (x *RawPod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys27Slc = r.DecodeBytes(yys27Slc, true, true)
yys27 := string(yys27Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys27 {
case "kind":
if r.TryDecodeAsNil() {
@ -406,9 +441,7 @@ func (x *RawPod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys27)
} // end switch yys27
} // end for yyj27
if !yyhl27 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -425,9 +458,10 @@ func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb30 = r.CheckBreak()
}
if yyb30 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -440,9 +474,10 @@ func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb30 = r.CheckBreak()
}
if yyb30 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -458,7 +493,8 @@ func (x *RawPod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb30 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj30-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View File

@ -34,10 +34,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -48,10 +56,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -84,18 +92,21 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
yyq2[1] = x.APIVersion != ""
yyq2[3] = x.Other != ""
yyq2[4] = len(x.Labels) != 0
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(5)
} else {
var yynn2 int = 1
yynn2 = 1
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -108,7 +119,9 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -118,6 +131,7 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -130,7 +144,9 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -140,14 +156,18 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta
yy11.CodecEncodeSelf(e)
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] {
yym13 := z.EncBinary()
_ = yym13
@ -160,7 +180,9 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("other"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
@ -170,6 +192,7 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[4] {
if x.Labels == nil {
r.EncodeNil()
@ -186,7 +209,9 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("labels"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Labels == nil {
r.EncodeNil()
} else {
@ -199,8 +224,10 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -215,17 +242,18 @@ func (x *Simple) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct19 := r.ContainerType()
if yyct19 == codecSelferValueTypeMap1234 {
yyl19 := r.ReadMapStart()
if yyl19 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl19, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct19 == codecSelferValueTypeArray1234 {
yyl19 := r.ReadArrayStart()
if yyl19 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl19, d)
}
@ -252,8 +280,10 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys20Slc = r.DecodeBytes(yys20Slc, true, true)
yys20 := string(yys20Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys20 {
case "kind":
if r.TryDecodeAsNil() {
@ -296,9 +326,7 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys20)
} // end switch yys20
} // end for yyj20
if !yyhl20 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -315,9 +343,10 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb27 = r.CheckBreak()
}
if yyb27 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -330,9 +359,10 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb27 = r.CheckBreak()
}
if yyb27 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -345,9 +375,10 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb27 = r.CheckBreak()
}
if yyb27 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{}
} else {
@ -361,9 +392,10 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb27 = r.CheckBreak()
}
if yyb27 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Other = ""
} else {
@ -376,9 +408,10 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb27 = r.CheckBreak()
}
if yyb27 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
@ -400,9 +433,10 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb27 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj27-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
@ -426,18 +460,21 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
yyq35[1] = x.APIVersion != ""
yyq35[3] = x.Other != ""
yyq35[4] = len(x.Labels) != 0
var yynn35 int
if yyr35 || yy2arr35 {
r.EncodeArrayStart(5)
} else {
var yynn35 int = 1
yynn35 = 1
for _, b := range yyq35 {
if b {
yynn35++
}
}
r.EncodeMapStart(yynn35)
yynn35 = 0
}
if yyr35 || yy2arr35 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[0] {
yym37 := z.EncBinary()
_ = yym37
@ -450,7 +487,9 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq35[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym38 := z.EncBinary()
_ = yym38
if false {
@ -460,6 +499,7 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr35 || yy2arr35 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[1] {
yym40 := z.EncBinary()
_ = yym40
@ -472,7 +512,9 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq35[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym41 := z.EncBinary()
_ = yym41
if false {
@ -482,14 +524,18 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr35 || yy2arr35 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy43 := &x.ObjectMeta
yy43.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy44 := &x.ObjectMeta
yy44.CodecEncodeSelf(e)
}
if yyr35 || yy2arr35 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[3] {
yym46 := z.EncBinary()
_ = yym46
@ -502,7 +548,9 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq35[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("other"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym47 := z.EncBinary()
_ = yym47
if false {
@ -512,6 +560,7 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr35 || yy2arr35 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[4] {
if x.Labels == nil {
r.EncodeNil()
@ -528,7 +577,9 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq35[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("labels"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Labels == nil {
r.EncodeNil()
} else {
@ -541,8 +592,10 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep35 {
r.EncodeEnd()
if yyr35 || yy2arr35 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -557,17 +610,18 @@ func (x *SimpleRoot) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct52 := r.ContainerType()
if yyct52 == codecSelferValueTypeMap1234 {
yyl52 := r.ReadMapStart()
if yyl52 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl52, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct52 == codecSelferValueTypeArray1234 {
yyl52 := r.ReadArrayStart()
if yyl52 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl52, d)
}
@ -594,8 +648,10 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys53Slc = r.DecodeBytes(yys53Slc, true, true)
yys53 := string(yys53Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys53 {
case "kind":
if r.TryDecodeAsNil() {
@ -638,9 +694,7 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys53)
} // end switch yys53
} // end for yyj53
if !yyhl53 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -657,9 +711,10 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb60 = r.CheckBreak()
}
if yyb60 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -672,9 +727,10 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb60 = r.CheckBreak()
}
if yyb60 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -687,9 +743,10 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb60 = r.CheckBreak()
}
if yyb60 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{}
} else {
@ -703,9 +760,10 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb60 = r.CheckBreak()
}
if yyb60 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Other = ""
} else {
@ -718,9 +776,10 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb60 = r.CheckBreak()
}
if yyb60 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
@ -742,9 +801,10 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb60 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj60-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
@ -766,18 +826,21 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr68 bool = false
yyq68[0] = x.Kind != ""
yyq68[1] = x.APIVersion != ""
var yynn68 int
if yyr68 || yy2arr68 {
r.EncodeArrayStart(5)
} else {
var yynn68 int = 3
yynn68 = 3
for _, b := range yyq68 {
if b {
yynn68++
}
}
r.EncodeMapStart(yynn68)
yynn68 = 0
}
if yyr68 || yy2arr68 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq68[0] {
yym70 := z.EncBinary()
_ = yym70
@ -790,7 +853,9 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq68[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym71 := z.EncBinary()
_ = yym71
if false {
@ -800,6 +865,7 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr68 || yy2arr68 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq68[1] {
yym73 := z.EncBinary()
_ = yym73
@ -812,7 +878,9 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq68[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym74 := z.EncBinary()
_ = yym74
if false {
@ -822,6 +890,7 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr68 || yy2arr68 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym76 := z.EncBinary()
_ = yym76
if false {
@ -829,7 +898,9 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Param1))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("param1"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym77 := z.EncBinary()
_ = yym77
if false {
@ -838,6 +909,7 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr68 || yy2arr68 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym79 := z.EncBinary()
_ = yym79
if false {
@ -845,7 +917,9 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Param2))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("param2"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym80 := z.EncBinary()
_ = yym80
if false {
@ -854,6 +928,7 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr68 || yy2arr68 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym82 := z.EncBinary()
_ = yym82
if false {
@ -861,7 +936,9 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Path))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("atAPath"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym83 := z.EncBinary()
_ = yym83
if false {
@ -869,8 +946,10 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Path))
}
}
if yysep68 {
r.EncodeEnd()
if yyr68 || yy2arr68 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -885,17 +964,18 @@ func (x *SimpleGetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct85 := r.ContainerType()
if yyct85 == codecSelferValueTypeMap1234 {
yyl85 := r.ReadMapStart()
if yyl85 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl85, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct85 == codecSelferValueTypeArray1234 {
yyl85 := r.ReadArrayStart()
if yyl85 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl85, d)
}
@ -922,8 +1002,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys86Slc = r.DecodeBytes(yys86Slc, true, true)
yys86 := string(yys86Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys86 {
case "kind":
if r.TryDecodeAsNil() {
@ -959,9 +1041,7 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys86)
} // end switch yys86
} // end for yyj86
if !yyhl86 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -978,9 +1058,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
yyb92 = r.CheckBreak()
}
if yyb92 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -993,9 +1074,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
yyb92 = r.CheckBreak()
}
if yyb92 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -1008,9 +1090,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
yyb92 = r.CheckBreak()
}
if yyb92 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Param1 = ""
} else {
@ -1023,9 +1106,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
yyb92 = r.CheckBreak()
}
if yyb92 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Param2 = ""
} else {
@ -1038,9 +1122,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
yyb92 = r.CheckBreak()
}
if yyb92 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Path = ""
} else {
@ -1056,9 +1141,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
if yyb92 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj92-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
@ -1081,18 +1167,21 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
yyq99[0] = x.Kind != ""
yyq99[1] = x.APIVersion != ""
yyq99[3] = len(x.Items) != 0
var yynn99 int
if yyr99 || yy2arr99 {
r.EncodeArrayStart(4)
} else {
var yynn99 int = 1
yynn99 = 1
for _, b := range yyq99 {
if b {
yynn99++
}
}
r.EncodeMapStart(yynn99)
yynn99 = 0
}
if yyr99 || yy2arr99 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq99[0] {
yym101 := z.EncBinary()
_ = yym101
@ -1105,7 +1194,9 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq99[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym102 := z.EncBinary()
_ = yym102
if false {
@ -1115,6 +1206,7 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr99 || yy2arr99 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq99[1] {
yym104 := z.EncBinary()
_ = yym104
@ -1127,7 +1219,9 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq99[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym105 := z.EncBinary()
_ = yym105
if false {
@ -1137,6 +1231,7 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr99 || yy2arr99 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy107 := &x.ListMeta
yym108 := z.EncBinary()
_ = yym108
@ -1146,7 +1241,9 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncFallback(yy107)
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy109 := &x.ListMeta
yym110 := z.EncBinary()
_ = yym110
@ -1157,6 +1254,7 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr99 || yy2arr99 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq99[3] {
if x.Items == nil {
r.EncodeNil()
@ -1173,7 +1271,9 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq99[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("items"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Items == nil {
r.EncodeNil()
} else {
@ -1186,8 +1286,10 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep99 {
r.EncodeEnd()
if yyr99 || yy2arr99 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -1202,17 +1304,18 @@ func (x *SimpleList) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct115 := r.ContainerType()
if yyct115 == codecSelferValueTypeMap1234 {
yyl115 := r.ReadMapStart()
if yyl115 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl115, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct115 == codecSelferValueTypeArray1234 {
yyl115 := r.ReadArrayStart()
if yyl115 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl115, d)
}
@ -1239,8 +1342,10 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys116Slc = r.DecodeBytes(yys116Slc, true, true)
yys116 := string(yys116Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys116 {
case "kind":
if r.TryDecodeAsNil() {
@ -1283,9 +1388,7 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys116)
} // end switch yys116
} // end for yyj116
if !yyhl116 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -1302,9 +1405,10 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb123 = r.CheckBreak()
}
if yyb123 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -1317,9 +1421,10 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb123 = r.CheckBreak()
}
if yyb123 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -1332,9 +1437,10 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb123 = r.CheckBreak()
}
if yyb123 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{}
} else {
@ -1354,9 +1460,10 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb123 = r.CheckBreak()
}
if yyb123 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Items = nil
} else {
@ -1378,9 +1485,10 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb123 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj123-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) encSliceSimple(v []Simple, e *codec1978.Encoder) {
@ -1389,10 +1497,11 @@ func (x codecSelfer1234) encSliceSimple(v []Simple, e *codec1978.Encoder) {
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv130 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy131 := &yyv130
yy131.CodecEncodeSelf(e)
}
r.EncodeEnd()
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
@ -1402,39 +1511,44 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
yyv132 := *v
yyh132, yyl132 := z.DecSliceHelperStart()
var yyrr132, yyrl132 int
var yyc132, yyrt132 bool
_, _, _ = yyc132, yyrt132, yyrl132
yyrr132 = yyl132
if yyv132 == nil {
if yyrl132, yyrt132 = z.DecInferLen(yyl132, z.DecBasicHandle().MaxInitLen, 216); yyrt132 {
yyrr132 = yyrl132
}
yyv132 = make([]Simple, yyrl132)
yyc132 = true
}
var yyc132 bool
if yyl132 == 0 {
if len(yyv132) != 0 {
if yyv132 == nil {
yyv132 = []Simple{}
yyc132 = true
} else if len(yyv132) != 0 {
yyv132 = yyv132[:0]
yyc132 = true
}
} else if yyl132 > 0 {
var yyrr132, yyrl132 int
var yyrt132 bool
if yyl132 > cap(yyv132) {
yyrl132, yyrt132 = z.DecInferLen(yyl132, z.DecBasicHandle().MaxInitLen, 216)
yyv132 = make([]Simple, yyrl132)
yyc132 = true
yyrg132 := len(yyv132) > 0
yyv2132 := yyv132
yyrl132, yyrt132 = z.DecInferLen(yyl132, z.DecBasicHandle().MaxInitLen, 216)
if yyrt132 {
if yyrl132 <= cap(yyv132) {
yyv132 = yyv132[:yyrl132]
} else {
yyv132 = make([]Simple, yyrl132)
}
} else {
yyv132 = make([]Simple, yyrl132)
}
yyc132 = true
yyrr132 = len(yyv132)
if yyrg132 {
copy(yyv132, yyv2132)
}
} else if yyl132 != len(yyv132) {
yyv132 = yyv132[:yyl132]
yyc132 = true
}
yyj132 := 0
for ; yyj132 < yyrr132; yyj132++ {
yyh132.ElemContainerState(yyj132)
if r.TryDecodeAsNil() {
yyv132[yyj132] = Simple{}
} else {
@ -1446,6 +1560,7 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
if yyrt132 {
for ; yyj132 < yyl132; yyj132++ {
yyv132 = append(yyv132, Simple{})
yyh132.ElemContainerState(yyj132)
if r.TryDecodeAsNil() {
yyv132[yyj132] = Simple{}
} else {
@ -1457,12 +1572,14 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
}
} else {
for yyj132 := 0; !r.CheckBreak(); yyj132++ {
yyj132 := 0
for ; !r.CheckBreak(); yyj132++ {
if yyj132 >= len(yyv132) {
yyv132 = append(yyv132, Simple{}) // var yyz132 Simple
yyc132 = true
}
yyh132.ElemContainerState(yyj132)
if yyj132 < len(yyv132) {
if r.TryDecodeAsNil() {
yyv132[yyj132] = Simple{}
@ -1476,10 +1593,16 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
}
}
yyh132.End()
if yyj132 < len(yyv132) {
yyv132 = yyv132[:yyj132]
yyc132 = true
} else if yyj132 == 0 && yyv132 == nil {
yyv132 = []Simple{}
yyc132 = true
}
}
yyh132.End()
if yyc132 {
*v = yyv132
}
}

View File

@ -34,10 +34,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -48,10 +56,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -83,18 +91,21 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
yyq2[2] = true
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(7)
} else {
var yynn2 int = 4
yynn2 = 4
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -107,7 +118,9 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -117,6 +130,7 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -129,7 +143,9 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -139,6 +155,7 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e)
@ -147,12 +164,15 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta
yy11.CodecEncodeSelf(e)
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym13 := z.EncBinary()
_ = yym13
if false {
@ -160,7 +180,9 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string(x.Key))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Key"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
@ -169,6 +191,7 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Map == nil {
r.EncodeNil()
} else {
@ -180,7 +203,9 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Map"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Map == nil {
r.EncodeNil()
} else {
@ -193,6 +218,7 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.StringList == nil {
r.EncodeNil()
} else {
@ -204,7 +230,9 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("StringList"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.StringList == nil {
r.EncodeNil()
} else {
@ -217,6 +245,7 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.IntList == nil {
r.EncodeNil()
} else {
@ -228,7 +257,9 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("IntList"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.IntList == nil {
r.EncodeNil()
} else {
@ -240,8 +271,10 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -256,17 +289,18 @@ func (x *TestStruct) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct25 := r.ContainerType()
if yyct25 == codecSelferValueTypeMap1234 {
yyl25 := r.ReadMapStart()
if yyl25 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl25, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct25 == codecSelferValueTypeArray1234 {
yyl25 := r.ReadArrayStart()
if yyl25 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl25, d)
}
@ -293,8 +327,10 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys26Slc = r.DecodeBytes(yys26Slc, true, true)
yys26 := string(yys26Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys26 {
case "kind":
if r.TryDecodeAsNil() {
@ -361,9 +397,7 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys26)
} // end switch yys26
} // end for yyj26
if !yyhl26 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -380,9 +414,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -395,9 +430,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -410,9 +446,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{}
} else {
@ -426,9 +463,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Key = ""
} else {
@ -441,9 +479,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Map = nil
} else {
@ -462,9 +501,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.StringList = nil
} else {
@ -483,9 +523,10 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb37 = r.CheckBreak()
}
if yyb37 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.IntList = nil
} else {
@ -507,7 +548,8 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb37 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj37-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View File

@ -34,10 +34,18 @@ import (
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
@ -48,10 +56,10 @@ var (
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 4 {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
4, codec1978.GenVersion, file)
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
@ -82,18 +90,21 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(4)
} else {
var yynn2 int = 2
yynn2 = 2
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
@ -106,7 +117,9 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
@ -116,6 +129,7 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
@ -128,7 +142,9 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
@ -138,14 +154,18 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta
yy11.CodecEncodeSelf(e)
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym13 := z.EncBinary()
_ = yym13
if false {
@ -153,7 +173,9 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.Value))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("value"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
@ -161,8 +183,10 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeInt(int64(x.Value))
}
}
if yysep2 {
r.EncodeEnd()
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
@ -177,17 +201,18 @@ func (x *TestResource) CodecDecodeSelf(d *codec1978.Decoder) {
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
if r.IsContainerType(codecSelferValueTypeMap1234) {
yyct16 := r.ContainerType()
if yyct16 == codecSelferValueTypeMap1234 {
yyl16 := r.ReadMapStart()
if yyl16 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl16, d)
}
} else if r.IsContainerType(codecSelferValueTypeArray1234) {
} else if yyct16 == codecSelferValueTypeArray1234 {
yyl16 := r.ReadArrayStart()
if yyl16 == 0 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl16, d)
}
@ -214,8 +239,10 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys17Slc = r.DecodeBytes(yys17Slc, true, true)
yys17 := string(yys17Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys17 {
case "kind":
if r.TryDecodeAsNil() {
@ -246,9 +273,7 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecStructFieldNotFound(-1, yys17)
} // end switch yys17
} // end for yyj17
if !yyhl17 {
r.ReadEnd()
}
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
@ -265,9 +290,10 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
@ -280,9 +306,10 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
@ -295,9 +322,10 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{}
} else {
@ -311,9 +339,10 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Value = 0
} else {
@ -329,7 +358,8 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if yyb22 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj22-1, "")
}
r.ReadEnd()
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}