Commit 1752cf22 authored by Eric Tune's avatar Eric Tune

Merge pull request #17940 from soltysh/job_deadline

Added ActiveDeadlineSeconds to jobs
parents a45c8786 327c1044
...@@ -3223,6 +3223,11 @@ ...@@ -3223,6 +3223,11 @@
"format": "int32", "format": "int32",
"description": "Completions specifies the desired number of successfully finished pods the job should be run with. Defaults to 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md" "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Defaults to 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md"
}, },
"activeDeadlineSeconds": {
"type": "integer",
"format": "int64",
"description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer"
},
"selector": { "selector": {
"$ref": "v1beta1.LabelSelector", "$ref": "v1beta1.LabelSelector",
"description": "Selector is a label query over pods that should match the pod count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors" "description": "Selector is a label query over pods that should match the pod count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors"
......
...@@ -158,7 +158,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -158,7 +158,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] { if yyq2[2] {
yy10 := &x.ObjectMeta yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e) yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else { } else {
r.EncodeNil() r.EncodeNil()
} }
...@@ -167,8 +173,14 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -167,8 +173,14 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta yy12 := &x.ObjectMeta
yy11.CodecEncodeSelf(e) yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
} }
} }
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
...@@ -184,25 +196,25 @@ func (x *TestType) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -184,25 +196,25 @@ func (x *TestType) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym12 := z.DecBinary() yym14 := z.DecBinary()
_ = yym12 _ = yym14
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct13 := r.ContainerType() yyct15 := r.ContainerType()
if yyct13 == codecSelferValueTypeMap1234 { if yyct15 == codecSelferValueTypeMap1234 {
yyl13 := r.ReadMapStart() yyl15 := r.ReadMapStart()
if yyl13 == 0 { if yyl15 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl13, d) x.codecDecodeSelfFromMap(yyl15, d)
} }
} else if yyct13 == codecSelferValueTypeArray1234 { } else if yyct15 == codecSelferValueTypeArray1234 {
yyl13 := r.ReadArrayStart() yyl15 := r.ReadArrayStart()
if yyl13 == 0 { if yyl15 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl13, d) x.codecDecodeSelfFromArray(yyl15, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -214,12 +226,12 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -214,12 +226,12 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys14Slc = z.DecScratchBuffer() // default slice to decode into var yys16Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys14Slc _ = yys16Slc
var yyhl14 bool = l >= 0 var yyhl16 bool = l >= 0
for yyj14 := 0; ; yyj14++ { for yyj16 := 0; ; yyj16++ {
if yyhl14 { if yyhl16 {
if yyj14 >= l { if yyj16 >= l {
break break
} }
} else { } else {
...@@ -228,10 +240,10 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -228,10 +240,10 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys14Slc = r.DecodeBytes(yys14Slc, true, true) yys16Slc = r.DecodeBytes(yys16Slc, true, true)
yys14 := string(yys14Slc) yys16 := string(yys16Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys14 { switch yys16 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -248,13 +260,19 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -248,13 +260,19 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv17 := &x.ObjectMeta yyv19 := &x.ObjectMeta
yyv17.CodecDecodeSelf(d) yym20 := z.DecBinary()
_ = yym20
if false {
} else if z.HasExtensions() && z.DecExt(yyv19) {
} else {
z.DecFallback(yyv19, false)
}
} }
default: default:
z.DecStructFieldNotFound(-1, yys14) z.DecStructFieldNotFound(-1, yys16)
} // end switch yys14 } // end switch yys16
} // end for yyj14 } // end for yyj16
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -262,16 +280,16 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -262,16 +280,16 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj18 int var yyj21 int
var yyb18 bool var yyb21 bool
var yyhl18 bool = l >= 0 var yyhl21 bool = l >= 0
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -281,13 +299,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -281,13 +299,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -297,13 +315,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -297,13 +315,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -311,21 +329,27 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -311,21 +329,27 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv21 := &x.ObjectMeta yyv24 := &x.ObjectMeta
yyv21.CodecDecodeSelf(d) yym25 := z.DecBinary()
_ = yym25
if false {
} else if z.HasExtensions() && z.DecExt(yyv24) {
} else {
z.DecFallback(yyv24, false)
}
} }
for { for {
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj18-1, "") z.DecStructFieldNotFound(yyj21-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -337,37 +361,37 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -337,37 +361,37 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
if x == nil { if x == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym22 := z.EncBinary() yym26 := z.EncBinary()
_ = yym22 _ = yym26
if false { if false {
} else if z.HasExtensions() && z.EncExt(x) { } else if z.HasExtensions() && z.EncExt(x) {
} else { } else {
yysep23 := !z.EncBinary() yysep27 := !z.EncBinary()
yy2arr23 := z.EncBasicHandle().StructToArray yy2arr27 := z.EncBasicHandle().StructToArray
var yyq23 [4]bool var yyq27 [4]bool
_, _, _ = yysep23, yyq23, yy2arr23 _, _, _ = yysep27, yyq27, yy2arr27
const yyr23 bool = false const yyr27 bool = false
yyq23[0] = x.Kind != "" yyq27[0] = x.Kind != ""
yyq23[1] = x.APIVersion != "" yyq27[1] = x.APIVersion != ""
yyq23[2] = true yyq27[2] = true
var yynn23 int var yynn27 int
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
r.EncodeArrayStart(4) r.EncodeArrayStart(4)
} else { } else {
yynn23 = 1 yynn27 = 1
for _, b := range yyq23 { for _, b := range yyq27 {
if b { if b {
yynn23++ yynn27++
} }
} }
r.EncodeMapStart(yynn23) r.EncodeMapStart(yynn27)
yynn23 = 0 yynn27 = 0
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq23[0] { if yyq27[0] {
yym25 := z.EncBinary() yym29 := z.EncBinary()
_ = yym25 _ = yym29
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
...@@ -376,23 +400,23 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -376,23 +400,23 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq23[0] { if yyq27[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind")) r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym26 := z.EncBinary() yym30 := z.EncBinary()
_ = yym26 _ = yym30
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq23[1] { if yyq27[1] {
yym28 := z.EncBinary() yym32 := z.EncBinary()
_ = yym28 _ = yym32
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
...@@ -401,54 +425,54 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -401,54 +425,54 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq23[1] { if yyq27[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym29 := z.EncBinary() yym33 := z.EncBinary()
_ = yym29 _ = yym33
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq23[2] { if yyq27[2] {
yy31 := &x.ListMeta yy35 := &x.ListMeta
yym32 := z.EncBinary() yym36 := z.EncBinary()
_ = yym32 _ = yym36
if false { if false {
} else if z.HasExtensions() && z.EncExt(yy31) { } else if z.HasExtensions() && z.EncExt(yy35) {
} else { } else {
z.EncFallback(yy31) z.EncFallback(yy35)
} }
} else { } else {
r.EncodeNil() r.EncodeNil()
} }
} else { } else {
if yyq23[2] { if yyq27[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy33 := &x.ListMeta yy37 := &x.ListMeta
yym34 := z.EncBinary() yym38 := z.EncBinary()
_ = yym34 _ = yym38
if false { if false {
} else if z.HasExtensions() && z.EncExt(yy33) { } else if z.HasExtensions() && z.EncExt(yy37) {
} else { } else {
z.EncFallback(yy33) z.EncFallback(yy37)
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil { if x.Items == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym36 := z.EncBinary() yym40 := z.EncBinary()
_ = yym36 _ = yym40
if false { if false {
} else { } else {
h.encSliceTestType(([]TestType)(x.Items), e) h.encSliceTestType(([]TestType)(x.Items), e)
...@@ -461,15 +485,15 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -461,15 +485,15 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Items == nil { if x.Items == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym37 := z.EncBinary() yym41 := z.EncBinary()
_ = yym37 _ = yym41
if false { if false {
} else { } else {
h.encSliceTestType(([]TestType)(x.Items), e) h.encSliceTestType(([]TestType)(x.Items), e)
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234) z.EncSendContainerState(codecSelfer_containerMapEnd1234)
...@@ -482,25 +506,25 @@ func (x *TestTypeList) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -482,25 +506,25 @@ func (x *TestTypeList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym38 := z.DecBinary() yym42 := z.DecBinary()
_ = yym38 _ = yym42
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct39 := r.ContainerType() yyct43 := r.ContainerType()
if yyct39 == codecSelferValueTypeMap1234 { if yyct43 == codecSelferValueTypeMap1234 {
yyl39 := r.ReadMapStart() yyl43 := r.ReadMapStart()
if yyl39 == 0 { if yyl43 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl39, d) x.codecDecodeSelfFromMap(yyl43, d)
} }
} else if yyct39 == codecSelferValueTypeArray1234 { } else if yyct43 == codecSelferValueTypeArray1234 {
yyl39 := r.ReadArrayStart() yyl43 := r.ReadArrayStart()
if yyl39 == 0 { if yyl43 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl39, d) x.codecDecodeSelfFromArray(yyl43, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -512,12 +536,12 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -512,12 +536,12 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys40Slc = z.DecScratchBuffer() // default slice to decode into var yys44Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys40Slc _ = yys44Slc
var yyhl40 bool = l >= 0 var yyhl44 bool = l >= 0
for yyj40 := 0; ; yyj40++ { for yyj44 := 0; ; yyj44++ {
if yyhl40 { if yyhl44 {
if yyj40 >= l { if yyj44 >= l {
break break
} }
} else { } else {
...@@ -526,10 +550,10 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -526,10 +550,10 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys40Slc = r.DecodeBytes(yys40Slc, true, true) yys44Slc = r.DecodeBytes(yys44Slc, true, true)
yys40 := string(yys40Slc) yys44 := string(yys44Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys40 { switch yys44 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -546,31 +570,31 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -546,31 +570,31 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{} x.ListMeta = pkg1_unversioned.ListMeta{}
} else { } else {
yyv43 := &x.ListMeta yyv47 := &x.ListMeta
yym44 := z.DecBinary() yym48 := z.DecBinary()
_ = yym44 _ = yym48
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv43) { } else if z.HasExtensions() && z.DecExt(yyv47) {
} else { } else {
z.DecFallback(yyv43, false) z.DecFallback(yyv47, false)
} }
} }
case "items": case "items":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Items = nil x.Items = nil
} else { } else {
yyv45 := &x.Items yyv49 := &x.Items
yym46 := z.DecBinary() yym50 := z.DecBinary()
_ = yym46 _ = yym50
if false { if false {
} else { } else {
h.decSliceTestType((*[]TestType)(yyv45), d) h.decSliceTestType((*[]TestType)(yyv49), d)
} }
} }
default: default:
z.DecStructFieldNotFound(-1, yys40) z.DecStructFieldNotFound(-1, yys44)
} // end switch yys40 } // end switch yys44
} // end for yyj40 } // end for yyj44
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -578,16 +602,16 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -578,16 +602,16 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj47 int var yyj51 int
var yyb47 bool var yyb51 bool
var yyhl47 bool = l >= 0 var yyhl51 bool = l >= 0
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -597,13 +621,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -597,13 +621,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -613,13 +637,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -613,13 +637,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -627,22 +651,22 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -627,22 +651,22 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{} x.ListMeta = pkg1_unversioned.ListMeta{}
} else { } else {
yyv50 := &x.ListMeta yyv54 := &x.ListMeta
yym51 := z.DecBinary() yym55 := z.DecBinary()
_ = yym51 _ = yym55
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv50) { } else if z.HasExtensions() && z.DecExt(yyv54) {
} else { } else {
z.DecFallback(yyv50, false) z.DecFallback(yyv54, false)
} }
} }
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -650,26 +674,26 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -650,26 +674,26 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Items = nil x.Items = nil
} else { } else {
yyv52 := &x.Items yyv56 := &x.Items
yym53 := z.DecBinary() yym57 := z.DecBinary()
_ = yym53 _ = yym57
if false { if false {
} else { } else {
h.decSliceTestType((*[]TestType)(yyv52), d) h.decSliceTestType((*[]TestType)(yyv56), d)
} }
} }
for { for {
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj47-1, "") z.DecStructFieldNotFound(yyj51-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -679,10 +703,10 @@ func (x codecSelfer1234) encSliceTestType(v []TestType, e *codec1978.Encoder) { ...@@ -679,10 +703,10 @@ func (x codecSelfer1234) encSliceTestType(v []TestType, e *codec1978.Encoder) {
z, r := codec1978.GenHelperEncoder(e) z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r _, _, _ = h, z, r
r.EncodeArrayStart(len(v)) r.EncodeArrayStart(len(v))
for _, yyv54 := range v { for _, yyv58 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy55 := &yyv54 yy59 := &yyv58
yy55.CodecEncodeSelf(e) yy59.CodecEncodeSelf(e)
} }
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -692,83 +716,83 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) { ...@@ -692,83 +716,83 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) {
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yyv56 := *v yyv60 := *v
yyh56, yyl56 := z.DecSliceHelperStart() yyh60, yyl60 := z.DecSliceHelperStart()
var yyc56 bool var yyc60 bool
if yyl56 == 0 { if yyl60 == 0 {
if yyv56 == nil { if yyv60 == nil {
yyv56 = []TestType{} yyv60 = []TestType{}
yyc56 = true yyc60 = true
} else if len(yyv56) != 0 { } else if len(yyv60) != 0 {
yyv56 = yyv56[:0] yyv60 = yyv60[:0]
yyc56 = true yyc60 = true
} }
} else if yyl56 > 0 { } else if yyl60 > 0 {
var yyrr56, yyrl56 int var yyrr60, yyrl60 int
var yyrt56 bool var yyrt60 bool
if yyl56 > cap(yyv56) { if yyl60 > cap(yyv60) {
yyrg56 := len(yyv56) > 0 yyrg60 := len(yyv60) > 0
yyv256 := yyv56 yyv260 := yyv60
yyrl56, yyrt56 = z.DecInferLen(yyl56, z.DecBasicHandle().MaxInitLen, 192) yyrl60, yyrt60 = z.DecInferLen(yyl60, z.DecBasicHandle().MaxInitLen, 192)
if yyrt56 { if yyrt60 {
if yyrl56 <= cap(yyv56) { if yyrl60 <= cap(yyv60) {
yyv56 = yyv56[:yyrl56] yyv60 = yyv60[:yyrl60]
} else { } else {
yyv56 = make([]TestType, yyrl56) yyv60 = make([]TestType, yyrl60)
} }
} else { } else {
yyv56 = make([]TestType, yyrl56) yyv60 = make([]TestType, yyrl60)
} }
yyc56 = true yyc60 = true
yyrr56 = len(yyv56) yyrr60 = len(yyv60)
if yyrg56 { if yyrg60 {
copy(yyv56, yyv256) copy(yyv60, yyv260)
} }
} else if yyl56 != len(yyv56) { } else if yyl60 != len(yyv60) {
yyv56 = yyv56[:yyl56] yyv60 = yyv60[:yyl60]
yyc56 = true yyc60 = true
} }
yyj56 := 0 yyj60 := 0
for ; yyj56 < yyrr56; yyj56++ { for ; yyj60 < yyrr60; yyj60++ {
yyh56.ElemContainerState(yyj56) yyh60.ElemContainerState(yyj60)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv56[yyj56] = TestType{} yyv60[yyj60] = TestType{}
} else { } else {
yyv57 := &yyv56[yyj56] yyv61 := &yyv60[yyj60]
yyv57.CodecDecodeSelf(d) yyv61.CodecDecodeSelf(d)
} }
} }
if yyrt56 { if yyrt60 {
for ; yyj56 < yyl56; yyj56++ { for ; yyj60 < yyl60; yyj60++ {
yyv56 = append(yyv56, TestType{}) yyv60 = append(yyv60, TestType{})
yyh56.ElemContainerState(yyj56) yyh60.ElemContainerState(yyj60)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv56[yyj56] = TestType{} yyv60[yyj60] = TestType{}
} else { } else {
yyv58 := &yyv56[yyj56] yyv62 := &yyv60[yyj60]
yyv58.CodecDecodeSelf(d) yyv62.CodecDecodeSelf(d)
} }
} }
} }
} else { } else {
yyj56 := 0 yyj60 := 0
for ; !r.CheckBreak(); yyj56++ { for ; !r.CheckBreak(); yyj60++ {
if yyj56 >= len(yyv56) { if yyj60 >= len(yyv60) {
yyv56 = append(yyv56, TestType{}) // var yyz56 TestType yyv60 = append(yyv60, TestType{}) // var yyz60 TestType
yyc56 = true yyc60 = true
} }
yyh56.ElemContainerState(yyj56) yyh60.ElemContainerState(yyj60)
if yyj56 < len(yyv56) { if yyj60 < len(yyv60) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv56[yyj56] = TestType{} yyv60[yyj60] = TestType{}
} else { } else {
yyv59 := &yyv56[yyj56] yyv63 := &yyv60[yyj60]
yyv59.CodecDecodeSelf(d) yyv63.CodecDecodeSelf(d)
} }
} else { } else {
...@@ -776,16 +800,16 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) { ...@@ -776,16 +800,16 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) {
} }
} }
if yyj56 < len(yyv56) { if yyj60 < len(yyv60) {
yyv56 = yyv56[:yyj56] yyv60 = yyv60[:yyj60]
yyc56 = true yyc60 = true
} else if yyj56 == 0 && yyv56 == nil { } else if yyj60 == 0 && yyv60 == nil {
yyv56 = []TestType{} yyv60 = []TestType{}
yyc56 = true yyc60 = true
} }
} }
yyh56.End() yyh60.End()
if yyc56 { if yyc60 {
*v = yyv56 *v = yyv60
} }
} }
...@@ -158,7 +158,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -158,7 +158,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] { if yyq2[2] {
yy10 := &x.ObjectMeta yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e) yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else { } else {
r.EncodeNil() r.EncodeNil()
} }
...@@ -167,8 +173,14 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -167,8 +173,14 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta yy12 := &x.ObjectMeta
yy11.CodecEncodeSelf(e) yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
} }
} }
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
...@@ -184,25 +196,25 @@ func (x *TestType) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -184,25 +196,25 @@ func (x *TestType) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym12 := z.DecBinary() yym14 := z.DecBinary()
_ = yym12 _ = yym14
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct13 := r.ContainerType() yyct15 := r.ContainerType()
if yyct13 == codecSelferValueTypeMap1234 { if yyct15 == codecSelferValueTypeMap1234 {
yyl13 := r.ReadMapStart() yyl15 := r.ReadMapStart()
if yyl13 == 0 { if yyl15 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl13, d) x.codecDecodeSelfFromMap(yyl15, d)
} }
} else if yyct13 == codecSelferValueTypeArray1234 { } else if yyct15 == codecSelferValueTypeArray1234 {
yyl13 := r.ReadArrayStart() yyl15 := r.ReadArrayStart()
if yyl13 == 0 { if yyl15 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl13, d) x.codecDecodeSelfFromArray(yyl15, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -214,12 +226,12 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -214,12 +226,12 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys14Slc = z.DecScratchBuffer() // default slice to decode into var yys16Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys14Slc _ = yys16Slc
var yyhl14 bool = l >= 0 var yyhl16 bool = l >= 0
for yyj14 := 0; ; yyj14++ { for yyj16 := 0; ; yyj16++ {
if yyhl14 { if yyhl16 {
if yyj14 >= l { if yyj16 >= l {
break break
} }
} else { } else {
...@@ -228,10 +240,10 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -228,10 +240,10 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys14Slc = r.DecodeBytes(yys14Slc, true, true) yys16Slc = r.DecodeBytes(yys16Slc, true, true)
yys14 := string(yys14Slc) yys16 := string(yys16Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys14 { switch yys16 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -248,13 +260,19 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -248,13 +260,19 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv17 := &x.ObjectMeta yyv19 := &x.ObjectMeta
yyv17.CodecDecodeSelf(d) yym20 := z.DecBinary()
_ = yym20
if false {
} else if z.HasExtensions() && z.DecExt(yyv19) {
} else {
z.DecFallback(yyv19, false)
}
} }
default: default:
z.DecStructFieldNotFound(-1, yys14) z.DecStructFieldNotFound(-1, yys16)
} // end switch yys14 } // end switch yys16
} // end for yyj14 } // end for yyj16
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -262,16 +280,16 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -262,16 +280,16 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj18 int var yyj21 int
var yyb18 bool var yyb21 bool
var yyhl18 bool = l >= 0 var yyhl21 bool = l >= 0
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -281,13 +299,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -281,13 +299,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -297,13 +315,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -297,13 +315,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -311,21 +329,27 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -311,21 +329,27 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv21 := &x.ObjectMeta yyv24 := &x.ObjectMeta
yyv21.CodecDecodeSelf(d) yym25 := z.DecBinary()
_ = yym25
if false {
} else if z.HasExtensions() && z.DecExt(yyv24) {
} else {
z.DecFallback(yyv24, false)
}
} }
for { for {
yyj18++ yyj21++
if yyhl18 { if yyhl21 {
yyb18 = yyj18 > l yyb21 = yyj21 > l
} else { } else {
yyb18 = r.CheckBreak() yyb21 = r.CheckBreak()
} }
if yyb18 { if yyb21 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj18-1, "") z.DecStructFieldNotFound(yyj21-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -337,37 +361,37 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -337,37 +361,37 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
if x == nil { if x == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym22 := z.EncBinary() yym26 := z.EncBinary()
_ = yym22 _ = yym26
if false { if false {
} else if z.HasExtensions() && z.EncExt(x) { } else if z.HasExtensions() && z.EncExt(x) {
} else { } else {
yysep23 := !z.EncBinary() yysep27 := !z.EncBinary()
yy2arr23 := z.EncBasicHandle().StructToArray yy2arr27 := z.EncBasicHandle().StructToArray
var yyq23 [4]bool var yyq27 [4]bool
_, _, _ = yysep23, yyq23, yy2arr23 _, _, _ = yysep27, yyq27, yy2arr27
const yyr23 bool = false const yyr27 bool = false
yyq23[0] = x.Kind != "" yyq27[0] = x.Kind != ""
yyq23[1] = x.APIVersion != "" yyq27[1] = x.APIVersion != ""
yyq23[2] = true yyq27[2] = true
var yynn23 int var yynn27 int
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
r.EncodeArrayStart(4) r.EncodeArrayStart(4)
} else { } else {
yynn23 = 1 yynn27 = 1
for _, b := range yyq23 { for _, b := range yyq27 {
if b { if b {
yynn23++ yynn27++
} }
} }
r.EncodeMapStart(yynn23) r.EncodeMapStart(yynn27)
yynn23 = 0 yynn27 = 0
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq23[0] { if yyq27[0] {
yym25 := z.EncBinary() yym29 := z.EncBinary()
_ = yym25 _ = yym29
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
...@@ -376,23 +400,23 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -376,23 +400,23 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq23[0] { if yyq27[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind")) r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym26 := z.EncBinary() yym30 := z.EncBinary()
_ = yym26 _ = yym30
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq23[1] { if yyq27[1] {
yym28 := z.EncBinary() yym32 := z.EncBinary()
_ = yym28 _ = yym32
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
...@@ -401,54 +425,54 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -401,54 +425,54 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq23[1] { if yyq27[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym29 := z.EncBinary() yym33 := z.EncBinary()
_ = yym29 _ = yym33
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq23[2] { if yyq27[2] {
yy31 := &x.ListMeta yy35 := &x.ListMeta
yym32 := z.EncBinary() yym36 := z.EncBinary()
_ = yym32 _ = yym36
if false { if false {
} else if z.HasExtensions() && z.EncExt(yy31) { } else if z.HasExtensions() && z.EncExt(yy35) {
} else { } else {
z.EncFallback(yy31) z.EncFallback(yy35)
} }
} else { } else {
r.EncodeNil() r.EncodeNil()
} }
} else { } else {
if yyq23[2] { if yyq27[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy33 := &x.ListMeta yy37 := &x.ListMeta
yym34 := z.EncBinary() yym38 := z.EncBinary()
_ = yym34 _ = yym38
if false { if false {
} else if z.HasExtensions() && z.EncExt(yy33) { } else if z.HasExtensions() && z.EncExt(yy37) {
} else { } else {
z.EncFallback(yy33) z.EncFallback(yy37)
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil { if x.Items == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym36 := z.EncBinary() yym40 := z.EncBinary()
_ = yym36 _ = yym40
if false { if false {
} else { } else {
h.encSliceTestType(([]TestType)(x.Items), e) h.encSliceTestType(([]TestType)(x.Items), e)
...@@ -461,15 +485,15 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -461,15 +485,15 @@ func (x *TestTypeList) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Items == nil { if x.Items == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym37 := z.EncBinary() yym41 := z.EncBinary()
_ = yym37 _ = yym41
if false { if false {
} else { } else {
h.encSliceTestType(([]TestType)(x.Items), e) h.encSliceTestType(([]TestType)(x.Items), e)
} }
} }
} }
if yyr23 || yy2arr23 { if yyr27 || yy2arr27 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234) z.EncSendContainerState(codecSelfer_containerMapEnd1234)
...@@ -482,25 +506,25 @@ func (x *TestTypeList) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -482,25 +506,25 @@ func (x *TestTypeList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym38 := z.DecBinary() yym42 := z.DecBinary()
_ = yym38 _ = yym42
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct39 := r.ContainerType() yyct43 := r.ContainerType()
if yyct39 == codecSelferValueTypeMap1234 { if yyct43 == codecSelferValueTypeMap1234 {
yyl39 := r.ReadMapStart() yyl43 := r.ReadMapStart()
if yyl39 == 0 { if yyl43 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl39, d) x.codecDecodeSelfFromMap(yyl43, d)
} }
} else if yyct39 == codecSelferValueTypeArray1234 { } else if yyct43 == codecSelferValueTypeArray1234 {
yyl39 := r.ReadArrayStart() yyl43 := r.ReadArrayStart()
if yyl39 == 0 { if yyl43 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl39, d) x.codecDecodeSelfFromArray(yyl43, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -512,12 +536,12 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -512,12 +536,12 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys40Slc = z.DecScratchBuffer() // default slice to decode into var yys44Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys40Slc _ = yys44Slc
var yyhl40 bool = l >= 0 var yyhl44 bool = l >= 0
for yyj40 := 0; ; yyj40++ { for yyj44 := 0; ; yyj44++ {
if yyhl40 { if yyhl44 {
if yyj40 >= l { if yyj44 >= l {
break break
} }
} else { } else {
...@@ -526,10 +550,10 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -526,10 +550,10 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys40Slc = r.DecodeBytes(yys40Slc, true, true) yys44Slc = r.DecodeBytes(yys44Slc, true, true)
yys40 := string(yys40Slc) yys44 := string(yys44Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys40 { switch yys44 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -546,31 +570,31 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -546,31 +570,31 @@ func (x *TestTypeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{} x.ListMeta = pkg1_unversioned.ListMeta{}
} else { } else {
yyv43 := &x.ListMeta yyv47 := &x.ListMeta
yym44 := z.DecBinary() yym48 := z.DecBinary()
_ = yym44 _ = yym48
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv43) { } else if z.HasExtensions() && z.DecExt(yyv47) {
} else { } else {
z.DecFallback(yyv43, false) z.DecFallback(yyv47, false)
} }
} }
case "items": case "items":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Items = nil x.Items = nil
} else { } else {
yyv45 := &x.Items yyv49 := &x.Items
yym46 := z.DecBinary() yym50 := z.DecBinary()
_ = yym46 _ = yym50
if false { if false {
} else { } else {
h.decSliceTestType((*[]TestType)(yyv45), d) h.decSliceTestType((*[]TestType)(yyv49), d)
} }
} }
default: default:
z.DecStructFieldNotFound(-1, yys40) z.DecStructFieldNotFound(-1, yys44)
} // end switch yys40 } // end switch yys44
} // end for yyj40 } // end for yyj44
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -578,16 +602,16 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -578,16 +602,16 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj47 int var yyj51 int
var yyb47 bool var yyb51 bool
var yyhl47 bool = l >= 0 var yyhl51 bool = l >= 0
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -597,13 +621,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -597,13 +621,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -613,13 +637,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -613,13 +637,13 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -627,22 +651,22 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -627,22 +651,22 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{} x.ListMeta = pkg1_unversioned.ListMeta{}
} else { } else {
yyv50 := &x.ListMeta yyv54 := &x.ListMeta
yym51 := z.DecBinary() yym55 := z.DecBinary()
_ = yym51 _ = yym55
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv50) { } else if z.HasExtensions() && z.DecExt(yyv54) {
} else { } else {
z.DecFallback(yyv50, false) z.DecFallback(yyv54, false)
} }
} }
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -650,26 +674,26 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -650,26 +674,26 @@ func (x *TestTypeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Items = nil x.Items = nil
} else { } else {
yyv52 := &x.Items yyv56 := &x.Items
yym53 := z.DecBinary() yym57 := z.DecBinary()
_ = yym53 _ = yym57
if false { if false {
} else { } else {
h.decSliceTestType((*[]TestType)(yyv52), d) h.decSliceTestType((*[]TestType)(yyv56), d)
} }
} }
for { for {
yyj47++ yyj51++
if yyhl47 { if yyhl51 {
yyb47 = yyj47 > l yyb51 = yyj51 > l
} else { } else {
yyb47 = r.CheckBreak() yyb51 = r.CheckBreak()
} }
if yyb47 { if yyb51 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj47-1, "") z.DecStructFieldNotFound(yyj51-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -679,10 +703,10 @@ func (x codecSelfer1234) encSliceTestType(v []TestType, e *codec1978.Encoder) { ...@@ -679,10 +703,10 @@ func (x codecSelfer1234) encSliceTestType(v []TestType, e *codec1978.Encoder) {
z, r := codec1978.GenHelperEncoder(e) z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r _, _, _ = h, z, r
r.EncodeArrayStart(len(v)) r.EncodeArrayStart(len(v))
for _, yyv54 := range v { for _, yyv58 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy55 := &yyv54 yy59 := &yyv58
yy55.CodecEncodeSelf(e) yy59.CodecEncodeSelf(e)
} }
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -692,83 +716,83 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) { ...@@ -692,83 +716,83 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) {
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yyv56 := *v yyv60 := *v
yyh56, yyl56 := z.DecSliceHelperStart() yyh60, yyl60 := z.DecSliceHelperStart()
var yyc56 bool var yyc60 bool
if yyl56 == 0 { if yyl60 == 0 {
if yyv56 == nil { if yyv60 == nil {
yyv56 = []TestType{} yyv60 = []TestType{}
yyc56 = true yyc60 = true
} else if len(yyv56) != 0 { } else if len(yyv60) != 0 {
yyv56 = yyv56[:0] yyv60 = yyv60[:0]
yyc56 = true yyc60 = true
} }
} else if yyl56 > 0 { } else if yyl60 > 0 {
var yyrr56, yyrl56 int var yyrr60, yyrl60 int
var yyrt56 bool var yyrt60 bool
if yyl56 > cap(yyv56) { if yyl60 > cap(yyv60) {
yyrg56 := len(yyv56) > 0 yyrg60 := len(yyv60) > 0
yyv256 := yyv56 yyv260 := yyv60
yyrl56, yyrt56 = z.DecInferLen(yyl56, z.DecBasicHandle().MaxInitLen, 192) yyrl60, yyrt60 = z.DecInferLen(yyl60, z.DecBasicHandle().MaxInitLen, 192)
if yyrt56 { if yyrt60 {
if yyrl56 <= cap(yyv56) { if yyrl60 <= cap(yyv60) {
yyv56 = yyv56[:yyrl56] yyv60 = yyv60[:yyrl60]
} else { } else {
yyv56 = make([]TestType, yyrl56) yyv60 = make([]TestType, yyrl60)
} }
} else { } else {
yyv56 = make([]TestType, yyrl56) yyv60 = make([]TestType, yyrl60)
} }
yyc56 = true yyc60 = true
yyrr56 = len(yyv56) yyrr60 = len(yyv60)
if yyrg56 { if yyrg60 {
copy(yyv56, yyv256) copy(yyv60, yyv260)
} }
} else if yyl56 != len(yyv56) { } else if yyl60 != len(yyv60) {
yyv56 = yyv56[:yyl56] yyv60 = yyv60[:yyl60]
yyc56 = true yyc60 = true
} }
yyj56 := 0 yyj60 := 0
for ; yyj56 < yyrr56; yyj56++ { for ; yyj60 < yyrr60; yyj60++ {
yyh56.ElemContainerState(yyj56) yyh60.ElemContainerState(yyj60)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv56[yyj56] = TestType{} yyv60[yyj60] = TestType{}
} else { } else {
yyv57 := &yyv56[yyj56] yyv61 := &yyv60[yyj60]
yyv57.CodecDecodeSelf(d) yyv61.CodecDecodeSelf(d)
} }
} }
if yyrt56 { if yyrt60 {
for ; yyj56 < yyl56; yyj56++ { for ; yyj60 < yyl60; yyj60++ {
yyv56 = append(yyv56, TestType{}) yyv60 = append(yyv60, TestType{})
yyh56.ElemContainerState(yyj56) yyh60.ElemContainerState(yyj60)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv56[yyj56] = TestType{} yyv60[yyj60] = TestType{}
} else { } else {
yyv58 := &yyv56[yyj56] yyv62 := &yyv60[yyj60]
yyv58.CodecDecodeSelf(d) yyv62.CodecDecodeSelf(d)
} }
} }
} }
} else { } else {
yyj56 := 0 yyj60 := 0
for ; !r.CheckBreak(); yyj56++ { for ; !r.CheckBreak(); yyj60++ {
if yyj56 >= len(yyv56) { if yyj60 >= len(yyv60) {
yyv56 = append(yyv56, TestType{}) // var yyz56 TestType yyv60 = append(yyv60, TestType{}) // var yyz60 TestType
yyc56 = true yyc60 = true
} }
yyh56.ElemContainerState(yyj56) yyh60.ElemContainerState(yyj60)
if yyj56 < len(yyv56) { if yyj60 < len(yyv60) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv56[yyj56] = TestType{} yyv60[yyj60] = TestType{}
} else { } else {
yyv59 := &yyv56[yyj56] yyv63 := &yyv60[yyj60]
yyv59.CodecDecodeSelf(d) yyv63.CodecDecodeSelf(d)
} }
} else { } else {
...@@ -776,16 +800,16 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) { ...@@ -776,16 +800,16 @@ func (x codecSelfer1234) decSliceTestType(v *[]TestType, d *codec1978.Decoder) {
} }
} }
if yyj56 < len(yyv56) { if yyj60 < len(yyv60) {
yyv56 = yyv56[:yyj56] yyv60 = yyv60[:yyj60]
yyc56 = true yyc60 = true
} else if yyj56 == 0 && yyv56 == nil { } else if yyj60 == 0 && yyv60 == nil {
yyv56 = []TestType{} yyv60 = []TestType{}
yyc56 = true yyc60 = true
} }
} }
yyh56.End() yyh60.End()
if yyc56 { if yyc60 {
*v = yyv56 *v = yyv60
} }
} }
...@@ -3440,6 +3440,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i ...@@ -3440,6 +3440,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">activeDeadlineSeconds</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int64)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">selector</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selector is a label query over pods that should match the pod count. More info: <a href="http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors">http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Selector is a label query over pods that should match the pod count. More info: <a href="http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors">http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
......
...@@ -1383,6 +1383,12 @@ func deepCopy_extensions_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) ...@@ -1383,6 +1383,12 @@ func deepCopy_extensions_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner)
} else { } else {
out.Completions = nil out.Completions = nil
} }
if in.ActiveDeadlineSeconds != nil {
out.ActiveDeadlineSeconds = new(int64)
*out.ActiveDeadlineSeconds = *in.ActiveDeadlineSeconds
} else {
out.ActiveDeadlineSeconds = nil
}
if in.Selector != nil { if in.Selector != nil {
out.Selector = new(LabelSelector) out.Selector = new(LabelSelector)
if err := deepCopy_extensions_LabelSelector(*in.Selector, out.Selector, c); err != nil { if err := deepCopy_extensions_LabelSelector(*in.Selector, out.Selector, c); err != nil {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -410,6 +410,10 @@ type JobSpec struct { ...@@ -410,6 +410,10 @@ type JobSpec struct {
// job should be run with. Defaults to 1. // job should be run with. Defaults to 1.
Completions *int `json:"completions,omitempty"` Completions *int `json:"completions,omitempty"`
// Optional duration in seconds relative to the startTime that the job may be active
// before the system tries to terminate it; value must be positive integer
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
// Selector is a label query over pods that should match the pod count. // Selector is a label query over pods that should match the pod count.
Selector *LabelSelector `json:"selector,omitempty"` Selector *LabelSelector `json:"selector,omitempty"`
...@@ -450,6 +454,8 @@ type JobConditionType string ...@@ -450,6 +454,8 @@ type JobConditionType string
const ( const (
// JobComplete means the job has completed its execution. // JobComplete means the job has completed its execution.
JobComplete JobConditionType = "Complete" JobComplete JobConditionType = "Complete"
// JobFailed means the job has failed its execution.
JobFailed JobConditionType = "Failed"
) )
// JobCondition describes current state of a job. // JobCondition describes current state of a job.
......
...@@ -2902,6 +2902,12 @@ func autoconvert_extensions_JobSpec_To_v1beta1_JobSpec(in *extensions.JobSpec, o ...@@ -2902,6 +2902,12 @@ func autoconvert_extensions_JobSpec_To_v1beta1_JobSpec(in *extensions.JobSpec, o
} else { } else {
out.Completions = nil out.Completions = nil
} }
if in.ActiveDeadlineSeconds != nil {
out.ActiveDeadlineSeconds = new(int64)
*out.ActiveDeadlineSeconds = *in.ActiveDeadlineSeconds
} else {
out.ActiveDeadlineSeconds = nil
}
if in.Selector != nil { if in.Selector != nil {
out.Selector = new(LabelSelector) out.Selector = new(LabelSelector)
if err := convert_extensions_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil { if err := convert_extensions_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil {
...@@ -3921,6 +3927,12 @@ func autoconvert_v1beta1_JobSpec_To_extensions_JobSpec(in *JobSpec, out *extensi ...@@ -3921,6 +3927,12 @@ func autoconvert_v1beta1_JobSpec_To_extensions_JobSpec(in *JobSpec, out *extensi
} else { } else {
out.Completions = nil out.Completions = nil
} }
if in.ActiveDeadlineSeconds != nil {
out.ActiveDeadlineSeconds = new(int64)
*out.ActiveDeadlineSeconds = *in.ActiveDeadlineSeconds
} else {
out.ActiveDeadlineSeconds = nil
}
if in.Selector != nil { if in.Selector != nil {
out.Selector = new(extensions.LabelSelector) out.Selector = new(extensions.LabelSelector)
if err := convert_v1beta1_LabelSelector_To_extensions_LabelSelector(in.Selector, out.Selector, s); err != nil { if err := convert_v1beta1_LabelSelector_To_extensions_LabelSelector(in.Selector, out.Selector, s); err != nil {
......
...@@ -1395,6 +1395,12 @@ func deepCopy_v1beta1_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) er ...@@ -1395,6 +1395,12 @@ func deepCopy_v1beta1_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) er
} else { } else {
out.Completions = nil out.Completions = nil
} }
if in.ActiveDeadlineSeconds != nil {
out.ActiveDeadlineSeconds = new(int64)
*out.ActiveDeadlineSeconds = *in.ActiveDeadlineSeconds
} else {
out.ActiveDeadlineSeconds = nil
}
if in.Selector != nil { if in.Selector != nil {
out.Selector = new(LabelSelector) out.Selector = new(LabelSelector)
if err := deepCopy_v1beta1_LabelSelector(*in.Selector, out.Selector, c); err != nil { if err := deepCopy_v1beta1_LabelSelector(*in.Selector, out.Selector, c); err != nil {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -415,6 +415,10 @@ type JobSpec struct { ...@@ -415,6 +415,10 @@ type JobSpec struct {
// More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
Completions *int32 `json:"completions,omitempty"` Completions *int32 `json:"completions,omitempty"`
// Optional duration in seconds relative to the startTime that the job may be active
// before the system tries to terminate it; value must be positive integer
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
// Selector is a label query over pods that should match the pod count. // Selector is a label query over pods that should match the pod count.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
Selector *LabelSelector `json:"selector,omitempty"` Selector *LabelSelector `json:"selector,omitempty"`
...@@ -458,6 +462,8 @@ type JobConditionType string ...@@ -458,6 +462,8 @@ type JobConditionType string
const ( const (
// JobComplete means the job has completed its execution. // JobComplete means the job has completed its execution.
JobComplete JobConditionType = "Complete" JobComplete JobConditionType = "Complete"
// JobFailed means the job has failed its execution.
JobFailed JobConditionType = "Failed"
) )
// JobCondition describes current state of a job. // JobCondition describes current state of a job.
......
...@@ -371,6 +371,7 @@ var map_JobSpec = map[string]string{ ...@@ -371,6 +371,7 @@ var map_JobSpec = map[string]string{
"": "JobSpec describes how the job execution will look like.", "": "JobSpec describes how the job execution will look like.",
"parallelism": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", "parallelism": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
"completions": "Completions specifies the desired number of successfully finished pods the job should be run with. Defaults to 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", "completions": "Completions specifies the desired number of successfully finished pods the job should be run with. Defaults to 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
"activeDeadlineSeconds": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer",
"selector": "Selector is a label query over pods that should match the pod count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", "selector": "Selector is a label query over pods that should match the pod count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors",
"template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
} }
......
...@@ -338,6 +338,9 @@ func ValidateJobSpec(spec *extensions.JobSpec, fldPath *field.Path) field.ErrorL ...@@ -338,6 +338,9 @@ func ValidateJobSpec(spec *extensions.JobSpec, fldPath *field.Path) field.ErrorL
if spec.Completions != nil { if spec.Completions != nil {
allErrs = append(allErrs, apivalidation.ValidatePositiveField(int64(*spec.Completions), fldPath.Child("completions"))...) allErrs = append(allErrs, apivalidation.ValidatePositiveField(int64(*spec.Completions), fldPath.Child("completions"))...)
} }
if spec.ActiveDeadlineSeconds != nil {
allErrs = append(allErrs, apivalidation.ValidatePositiveField(int64(*spec.ActiveDeadlineSeconds), fldPath.Child("activeDeadlineSeconds"))...)
}
if spec.Selector == nil { if spec.Selector == nil {
allErrs = append(allErrs, field.Required(fldPath.Child("selector"))) allErrs = append(allErrs, field.Required(fldPath.Child("selector")))
} else { } else {
......
...@@ -839,6 +839,7 @@ func TestValidateJob(t *testing.T) { ...@@ -839,6 +839,7 @@ func TestValidateJob(t *testing.T) {
} }
} }
negative := -1 negative := -1
negative64 := int64(-1)
errorCases := map[string]extensions.Job{ errorCases := map[string]extensions.Job{
"spec.parallelism:must be non-negative": { "spec.parallelism:must be non-negative": {
ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
...@@ -862,6 +863,17 @@ func TestValidateJob(t *testing.T) { ...@@ -862,6 +863,17 @@ func TestValidateJob(t *testing.T) {
Template: validPodTemplateSpec, Template: validPodTemplateSpec,
}, },
}, },
"spec.activeDeadlineSeconds:must be non-negative": {
ObjectMeta: api.ObjectMeta{
Name: "myjob",
Namespace: api.NamespaceDefault,
},
Spec: extensions.JobSpec{
ActiveDeadlineSeconds: &negative64,
Selector: validSelector,
Template: validPodTemplateSpec,
},
},
"spec.selector:required value": { "spec.selector:required value": {
ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
Name: "myjob", Name: "myjob",
......
...@@ -158,19 +158,31 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -158,19 +158,31 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy10 := &x.ObjectMeta yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e) yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta yy12 := &x.ObjectMeta
yy11.CodecEncodeSelf(e) yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
} }
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] { if yyq2[3] {
yym13 := z.EncBinary() yym15 := z.EncBinary()
_ = yym13 _ = yym15
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Other)) r.EncodeString(codecSelferC_UTF81234, string(x.Other))
...@@ -183,8 +195,8 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -183,8 +195,8 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("other")) r.EncodeString(codecSelferC_UTF81234, string("other"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary() yym16 := z.EncBinary()
_ = yym14 _ = yym16
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Other)) r.EncodeString(codecSelferC_UTF81234, string(x.Other))
...@@ -197,8 +209,8 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -197,8 +209,8 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Labels == nil { if x.Labels == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym16 := z.EncBinary() yym18 := z.EncBinary()
_ = yym16 _ = yym18
if false { if false {
} else { } else {
z.F.EncMapStringStringV(x.Labels, false, e) z.F.EncMapStringStringV(x.Labels, false, e)
...@@ -215,8 +227,8 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -215,8 +227,8 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Labels == nil { if x.Labels == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym17 := z.EncBinary() yym19 := z.EncBinary()
_ = yym17 _ = yym19
if false { if false {
} else { } else {
z.F.EncMapStringStringV(x.Labels, false, e) z.F.EncMapStringStringV(x.Labels, false, e)
...@@ -237,25 +249,25 @@ func (x *Simple) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -237,25 +249,25 @@ func (x *Simple) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym18 := z.DecBinary() yym20 := z.DecBinary()
_ = yym18 _ = yym20
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct19 := r.ContainerType() yyct21 := r.ContainerType()
if yyct19 == codecSelferValueTypeMap1234 { if yyct21 == codecSelferValueTypeMap1234 {
yyl19 := r.ReadMapStart() yyl21 := r.ReadMapStart()
if yyl19 == 0 { if yyl21 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl19, d) x.codecDecodeSelfFromMap(yyl21, d)
} }
} else if yyct19 == codecSelferValueTypeArray1234 { } else if yyct21 == codecSelferValueTypeArray1234 {
yyl19 := r.ReadArrayStart() yyl21 := r.ReadArrayStart()
if yyl19 == 0 { if yyl21 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl19, d) x.codecDecodeSelfFromArray(yyl21, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -267,12 +279,12 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -267,12 +279,12 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys20Slc = z.DecScratchBuffer() // default slice to decode into var yys22Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys20Slc _ = yys22Slc
var yyhl20 bool = l >= 0 var yyhl22 bool = l >= 0
for yyj20 := 0; ; yyj20++ { for yyj22 := 0; ; yyj22++ {
if yyhl20 { if yyhl22 {
if yyj20 >= l { if yyj22 >= l {
break break
} }
} else { } else {
...@@ -281,10 +293,10 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -281,10 +293,10 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys20Slc = r.DecodeBytes(yys20Slc, true, true) yys22Slc = r.DecodeBytes(yys22Slc, true, true)
yys20 := string(yys20Slc) yys22 := string(yys22Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys20 { switch yys22 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -301,8 +313,14 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -301,8 +313,14 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv23 := &x.ObjectMeta yyv25 := &x.ObjectMeta
yyv23.CodecDecodeSelf(d) yym26 := z.DecBinary()
_ = yym26
if false {
} else if z.HasExtensions() && z.DecExt(yyv25) {
} else {
z.DecFallback(yyv25, false)
}
} }
case "other": case "other":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
...@@ -314,18 +332,18 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -314,18 +332,18 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Labels = nil x.Labels = nil
} else { } else {
yyv25 := &x.Labels yyv28 := &x.Labels
yym26 := z.DecBinary() yym29 := z.DecBinary()
_ = yym26 _ = yym29
if false { if false {
} else { } else {
z.F.DecMapStringStringX(yyv25, false, d) z.F.DecMapStringStringX(yyv28, false, d)
} }
} }
default: default:
z.DecStructFieldNotFound(-1, yys20) z.DecStructFieldNotFound(-1, yys22)
} // end switch yys20 } // end switch yys22
} // end for yyj20 } // end for yyj22
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -333,16 +351,16 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -333,16 +351,16 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj27 int var yyj30 int
var yyb27 bool var yyb30 bool
var yyhl27 bool = l >= 0 var yyhl30 bool = l >= 0
yyj27++ yyj30++
if yyhl27 { if yyhl30 {
yyb27 = yyj27 > l yyb30 = yyj30 > l
} else { } else {
yyb27 = r.CheckBreak() yyb30 = r.CheckBreak()
} }
if yyb27 { if yyb30 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -352,13 +370,13 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -352,13 +370,13 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj27++ yyj30++
if yyhl27 { if yyhl30 {
yyb27 = yyj27 > l yyb30 = yyj30 > l
} else { } else {
yyb27 = r.CheckBreak() yyb30 = r.CheckBreak()
} }
if yyb27 { if yyb30 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -368,13 +386,13 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -368,13 +386,13 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj27++ yyj30++
if yyhl27 { if yyhl30 {
yyb27 = yyj27 > l yyb30 = yyj30 > l
} else { } else {
yyb27 = r.CheckBreak() yyb30 = r.CheckBreak()
} }
if yyb27 { if yyb30 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -382,16 +400,22 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -382,16 +400,22 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv30 := &x.ObjectMeta yyv33 := &x.ObjectMeta
yyv30.CodecDecodeSelf(d) yym34 := z.DecBinary()
_ = yym34
if false {
} else if z.HasExtensions() && z.DecExt(yyv33) {
} else {
z.DecFallback(yyv33, false)
}
} }
yyj27++ yyj30++
if yyhl27 { if yyhl30 {
yyb27 = yyj27 > l yyb30 = yyj30 > l
} else { } else {
yyb27 = r.CheckBreak() yyb30 = r.CheckBreak()
} }
if yyb27 { if yyb30 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -401,13 +425,13 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -401,13 +425,13 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Other = string(r.DecodeString()) x.Other = string(r.DecodeString())
} }
yyj27++ yyj30++
if yyhl27 { if yyhl30 {
yyb27 = yyj27 > l yyb30 = yyj30 > l
} else { } else {
yyb27 = r.CheckBreak() yyb30 = r.CheckBreak()
} }
if yyb27 { if yyb30 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -415,26 +439,26 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -415,26 +439,26 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Labels = nil x.Labels = nil
} else { } else {
yyv32 := &x.Labels yyv36 := &x.Labels
yym33 := z.DecBinary() yym37 := z.DecBinary()
_ = yym33 _ = yym37
if false { if false {
} else { } else {
z.F.DecMapStringStringX(yyv32, false, d) z.F.DecMapStringStringX(yyv36, false, d)
} }
} }
for { for {
yyj27++ yyj30++
if yyhl27 { if yyhl30 {
yyb27 = yyj27 > l yyb30 = yyj30 > l
} else { } else {
yyb27 = r.CheckBreak() yyb30 = r.CheckBreak()
} }
if yyb27 { if yyb30 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj27-1, "") z.DecStructFieldNotFound(yyj30-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -446,38 +470,38 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -446,38 +470,38 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
if x == nil { if x == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym34 := z.EncBinary() yym38 := z.EncBinary()
_ = yym34 _ = yym38
if false { if false {
} else if z.HasExtensions() && z.EncExt(x) { } else if z.HasExtensions() && z.EncExt(x) {
} else { } else {
yysep35 := !z.EncBinary() yysep39 := !z.EncBinary()
yy2arr35 := z.EncBasicHandle().StructToArray yy2arr39 := z.EncBasicHandle().StructToArray
var yyq35 [5]bool var yyq39 [5]bool
_, _, _ = yysep35, yyq35, yy2arr35 _, _, _ = yysep39, yyq39, yy2arr39
const yyr35 bool = false const yyr39 bool = false
yyq35[0] = x.Kind != "" yyq39[0] = x.Kind != ""
yyq35[1] = x.APIVersion != "" yyq39[1] = x.APIVersion != ""
yyq35[3] = x.Other != "" yyq39[3] = x.Other != ""
yyq35[4] = len(x.Labels) != 0 yyq39[4] = len(x.Labels) != 0
var yynn35 int var yynn39 int
if yyr35 || yy2arr35 { if yyr39 || yy2arr39 {
r.EncodeArrayStart(5) r.EncodeArrayStart(5)
} else { } else {
yynn35 = 1 yynn39 = 1
for _, b := range yyq35 { for _, b := range yyq39 {
if b { if b {
yynn35++ yynn39++
} }
} }
r.EncodeMapStart(yynn35) r.EncodeMapStart(yynn39)
yynn35 = 0 yynn39 = 0
} }
if yyr35 || yy2arr35 { if yyr39 || yy2arr39 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[0] { if yyq39[0] {
yym37 := z.EncBinary() yym41 := z.EncBinary()
_ = yym37 _ = yym41
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
...@@ -486,23 +510,23 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -486,23 +510,23 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq35[0] { if yyq39[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind")) r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym38 := z.EncBinary() yym42 := z.EncBinary()
_ = yym38 _ = yym42
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
} }
} }
} }
if yyr35 || yy2arr35 { if yyr39 || yy2arr39 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[1] { if yyq39[1] {
yym40 := z.EncBinary() yym44 := z.EncBinary()
_ = yym40 _ = yym44
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
...@@ -511,34 +535,46 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -511,34 +535,46 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq35[1] { if yyq39[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym41 := z.EncBinary() yym45 := z.EncBinary()
_ = yym41 _ = yym45
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
} }
} }
} }
if yyr35 || yy2arr35 { if yyr39 || yy2arr39 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy43 := &x.ObjectMeta yy47 := &x.ObjectMeta
yy43.CodecEncodeSelf(e) yym48 := z.EncBinary()
_ = yym48
if false {
} else if z.HasExtensions() && z.EncExt(yy47) {
} else {
z.EncFallback(yy47)
}
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy44 := &x.ObjectMeta yy49 := &x.ObjectMeta
yy44.CodecEncodeSelf(e) yym50 := z.EncBinary()
_ = yym50
if false {
} else if z.HasExtensions() && z.EncExt(yy49) {
} else {
z.EncFallback(yy49)
} }
if yyr35 || yy2arr35 { }
if yyr39 || yy2arr39 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[3] { if yyq39[3] {
yym46 := z.EncBinary() yym52 := z.EncBinary()
_ = yym46 _ = yym52
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Other)) r.EncodeString(codecSelferC_UTF81234, string(x.Other))
...@@ -547,26 +583,26 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -547,26 +583,26 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq35[3] { if yyq39[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("other")) r.EncodeString(codecSelferC_UTF81234, string("other"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym47 := z.EncBinary() yym53 := z.EncBinary()
_ = yym47 _ = yym53
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Other)) r.EncodeString(codecSelferC_UTF81234, string(x.Other))
} }
} }
} }
if yyr35 || yy2arr35 { if yyr39 || yy2arr39 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq35[4] { if yyq39[4] {
if x.Labels == nil { if x.Labels == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym49 := z.EncBinary() yym55 := z.EncBinary()
_ = yym49 _ = yym55
if false { if false {
} else { } else {
z.F.EncMapStringStringV(x.Labels, false, e) z.F.EncMapStringStringV(x.Labels, false, e)
...@@ -576,15 +612,15 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -576,15 +612,15 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeNil() r.EncodeNil()
} }
} else { } else {
if yyq35[4] { if yyq39[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("labels")) r.EncodeString(codecSelferC_UTF81234, string("labels"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Labels == nil { if x.Labels == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym50 := z.EncBinary() yym56 := z.EncBinary()
_ = yym50 _ = yym56
if false { if false {
} else { } else {
z.F.EncMapStringStringV(x.Labels, false, e) z.F.EncMapStringStringV(x.Labels, false, e)
...@@ -592,7 +628,7 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -592,7 +628,7 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) {
} }
} }
} }
if yyr35 || yy2arr35 { if yyr39 || yy2arr39 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234) z.EncSendContainerState(codecSelfer_containerMapEnd1234)
...@@ -605,25 +641,25 @@ func (x *SimpleRoot) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -605,25 +641,25 @@ func (x *SimpleRoot) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym51 := z.DecBinary() yym57 := z.DecBinary()
_ = yym51 _ = yym57
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct52 := r.ContainerType() yyct58 := r.ContainerType()
if yyct52 == codecSelferValueTypeMap1234 { if yyct58 == codecSelferValueTypeMap1234 {
yyl52 := r.ReadMapStart() yyl58 := r.ReadMapStart()
if yyl52 == 0 { if yyl58 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl52, d) x.codecDecodeSelfFromMap(yyl58, d)
} }
} else if yyct52 == codecSelferValueTypeArray1234 { } else if yyct58 == codecSelferValueTypeArray1234 {
yyl52 := r.ReadArrayStart() yyl58 := r.ReadArrayStart()
if yyl52 == 0 { if yyl58 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl52, d) x.codecDecodeSelfFromArray(yyl58, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -635,12 +671,12 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -635,12 +671,12 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys53Slc = z.DecScratchBuffer() // default slice to decode into var yys59Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys53Slc _ = yys59Slc
var yyhl53 bool = l >= 0 var yyhl59 bool = l >= 0
for yyj53 := 0; ; yyj53++ { for yyj59 := 0; ; yyj59++ {
if yyhl53 { if yyhl59 {
if yyj53 >= l { if yyj59 >= l {
break break
} }
} else { } else {
...@@ -649,10 +685,10 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -649,10 +685,10 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys53Slc = r.DecodeBytes(yys53Slc, true, true) yys59Slc = r.DecodeBytes(yys59Slc, true, true)
yys53 := string(yys53Slc) yys59 := string(yys59Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys53 { switch yys59 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -669,8 +705,14 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -669,8 +705,14 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv56 := &x.ObjectMeta yyv62 := &x.ObjectMeta
yyv56.CodecDecodeSelf(d) yym63 := z.DecBinary()
_ = yym63
if false {
} else if z.HasExtensions() && z.DecExt(yyv62) {
} else {
z.DecFallback(yyv62, false)
}
} }
case "other": case "other":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
...@@ -682,18 +724,18 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -682,18 +724,18 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Labels = nil x.Labels = nil
} else { } else {
yyv58 := &x.Labels yyv65 := &x.Labels
yym59 := z.DecBinary() yym66 := z.DecBinary()
_ = yym59 _ = yym66
if false { if false {
} else { } else {
z.F.DecMapStringStringX(yyv58, false, d) z.F.DecMapStringStringX(yyv65, false, d)
} }
} }
default: default:
z.DecStructFieldNotFound(-1, yys53) z.DecStructFieldNotFound(-1, yys59)
} // end switch yys53 } // end switch yys59
} // end for yyj53 } // end for yyj59
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -701,16 +743,16 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -701,16 +743,16 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj60 int var yyj67 int
var yyb60 bool var yyb67 bool
var yyhl60 bool = l >= 0 var yyhl67 bool = l >= 0
yyj60++ yyj67++
if yyhl60 { if yyhl67 {
yyb60 = yyj60 > l yyb67 = yyj67 > l
} else { } else {
yyb60 = r.CheckBreak() yyb67 = r.CheckBreak()
} }
if yyb60 { if yyb67 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -720,13 +762,13 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -720,13 +762,13 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj60++ yyj67++
if yyhl60 { if yyhl67 {
yyb60 = yyj60 > l yyb67 = yyj67 > l
} else { } else {
yyb60 = r.CheckBreak() yyb67 = r.CheckBreak()
} }
if yyb60 { if yyb67 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -736,13 +778,13 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -736,13 +778,13 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj60++ yyj67++
if yyhl60 { if yyhl67 {
yyb60 = yyj60 > l yyb67 = yyj67 > l
} else { } else {
yyb60 = r.CheckBreak() yyb67 = r.CheckBreak()
} }
if yyb60 { if yyb67 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -750,16 +792,22 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -750,16 +792,22 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv63 := &x.ObjectMeta yyv70 := &x.ObjectMeta
yyv63.CodecDecodeSelf(d) yym71 := z.DecBinary()
_ = yym71
if false {
} else if z.HasExtensions() && z.DecExt(yyv70) {
} else {
z.DecFallback(yyv70, false)
}
} }
yyj60++ yyj67++
if yyhl60 { if yyhl67 {
yyb60 = yyj60 > l yyb67 = yyj67 > l
} else { } else {
yyb60 = r.CheckBreak() yyb67 = r.CheckBreak()
} }
if yyb60 { if yyb67 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -769,13 +817,13 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -769,13 +817,13 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Other = string(r.DecodeString()) x.Other = string(r.DecodeString())
} }
yyj60++ yyj67++
if yyhl60 { if yyhl67 {
yyb60 = yyj60 > l yyb67 = yyj67 > l
} else { } else {
yyb60 = r.CheckBreak() yyb67 = r.CheckBreak()
} }
if yyb60 { if yyb67 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -783,26 +831,26 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -783,26 +831,26 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Labels = nil x.Labels = nil
} else { } else {
yyv65 := &x.Labels yyv73 := &x.Labels
yym66 := z.DecBinary() yym74 := z.DecBinary()
_ = yym66 _ = yym74
if false { if false {
} else { } else {
z.F.DecMapStringStringX(yyv65, false, d) z.F.DecMapStringStringX(yyv73, false, d)
} }
} }
for { for {
yyj60++ yyj67++
if yyhl60 { if yyhl67 {
yyb60 = yyj60 > l yyb67 = yyj67 > l
} else { } else {
yyb60 = r.CheckBreak() yyb67 = r.CheckBreak()
} }
if yyb60 { if yyb67 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj60-1, "") z.DecStructFieldNotFound(yyj67-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -814,36 +862,36 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -814,36 +862,36 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
if x == nil { if x == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym67 := z.EncBinary() yym75 := z.EncBinary()
_ = yym67 _ = yym75
if false { if false {
} else if z.HasExtensions() && z.EncExt(x) { } else if z.HasExtensions() && z.EncExt(x) {
} else { } else {
yysep68 := !z.EncBinary() yysep76 := !z.EncBinary()
yy2arr68 := z.EncBasicHandle().StructToArray yy2arr76 := z.EncBasicHandle().StructToArray
var yyq68 [5]bool var yyq76 [5]bool
_, _, _ = yysep68, yyq68, yy2arr68 _, _, _ = yysep76, yyq76, yy2arr76
const yyr68 bool = false const yyr76 bool = false
yyq68[0] = x.Kind != "" yyq76[0] = x.Kind != ""
yyq68[1] = x.APIVersion != "" yyq76[1] = x.APIVersion != ""
var yynn68 int var yynn76 int
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
r.EncodeArrayStart(5) r.EncodeArrayStart(5)
} else { } else {
yynn68 = 3 yynn76 = 3
for _, b := range yyq68 { for _, b := range yyq76 {
if b { if b {
yynn68++ yynn76++
} }
} }
r.EncodeMapStart(yynn68) r.EncodeMapStart(yynn76)
yynn68 = 0 yynn76 = 0
} }
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq68[0] { if yyq76[0] {
yym70 := z.EncBinary() yym78 := z.EncBinary()
_ = yym70 _ = yym78
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
...@@ -852,23 +900,23 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -852,23 +900,23 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq68[0] { if yyq76[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind")) r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym71 := z.EncBinary() yym79 := z.EncBinary()
_ = yym71 _ = yym79
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
} }
} }
} }
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq68[1] { if yyq76[1] {
yym73 := z.EncBinary() yym81 := z.EncBinary()
_ = yym73 _ = yym81
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
...@@ -877,22 +925,22 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -877,22 +925,22 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq68[1] { if yyq76[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym74 := z.EncBinary() yym82 := z.EncBinary()
_ = yym74 _ = yym82
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
} }
} }
} }
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym76 := z.EncBinary() yym84 := z.EncBinary()
_ = yym76 _ = yym84
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Param1)) r.EncodeString(codecSelferC_UTF81234, string(x.Param1))
...@@ -901,17 +949,17 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -901,17 +949,17 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("param1")) r.EncodeString(codecSelferC_UTF81234, string("param1"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym77 := z.EncBinary() yym85 := z.EncBinary()
_ = yym77 _ = yym85
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Param1)) r.EncodeString(codecSelferC_UTF81234, string(x.Param1))
} }
} }
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym79 := z.EncBinary() yym87 := z.EncBinary()
_ = yym79 _ = yym87
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Param2)) r.EncodeString(codecSelferC_UTF81234, string(x.Param2))
...@@ -920,17 +968,17 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -920,17 +968,17 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("param2")) r.EncodeString(codecSelferC_UTF81234, string("param2"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym80 := z.EncBinary() yym88 := z.EncBinary()
_ = yym80 _ = yym88
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Param2)) r.EncodeString(codecSelferC_UTF81234, string(x.Param2))
} }
} }
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym82 := z.EncBinary() yym90 := z.EncBinary()
_ = yym82 _ = yym90
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Path)) r.EncodeString(codecSelferC_UTF81234, string(x.Path))
...@@ -939,14 +987,14 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -939,14 +987,14 @@ func (x *SimpleGetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("atAPath")) r.EncodeString(codecSelferC_UTF81234, string("atAPath"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym83 := z.EncBinary() yym91 := z.EncBinary()
_ = yym83 _ = yym91
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Path)) r.EncodeString(codecSelferC_UTF81234, string(x.Path))
} }
} }
if yyr68 || yy2arr68 { if yyr76 || yy2arr76 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234) z.EncSendContainerState(codecSelfer_containerMapEnd1234)
...@@ -959,25 +1007,25 @@ func (x *SimpleGetOptions) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -959,25 +1007,25 @@ func (x *SimpleGetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym84 := z.DecBinary() yym92 := z.DecBinary()
_ = yym84 _ = yym92
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct85 := r.ContainerType() yyct93 := r.ContainerType()
if yyct85 == codecSelferValueTypeMap1234 { if yyct93 == codecSelferValueTypeMap1234 {
yyl85 := r.ReadMapStart() yyl93 := r.ReadMapStart()
if yyl85 == 0 { if yyl93 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl85, d) x.codecDecodeSelfFromMap(yyl93, d)
} }
} else if yyct85 == codecSelferValueTypeArray1234 { } else if yyct93 == codecSelferValueTypeArray1234 {
yyl85 := r.ReadArrayStart() yyl93 := r.ReadArrayStart()
if yyl85 == 0 { if yyl93 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl85, d) x.codecDecodeSelfFromArray(yyl93, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -989,12 +1037,12 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -989,12 +1037,12 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys86Slc = z.DecScratchBuffer() // default slice to decode into var yys94Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys86Slc _ = yys94Slc
var yyhl86 bool = l >= 0 var yyhl94 bool = l >= 0
for yyj86 := 0; ; yyj86++ { for yyj94 := 0; ; yyj94++ {
if yyhl86 { if yyhl94 {
if yyj86 >= l { if yyj94 >= l {
break break
} }
} else { } else {
...@@ -1003,10 +1051,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -1003,10 +1051,10 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys86Slc = r.DecodeBytes(yys86Slc, true, true) yys94Slc = r.DecodeBytes(yys94Slc, true, true)
yys86 := string(yys86Slc) yys94 := string(yys94Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys86 { switch yys94 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -1038,9 +1086,9 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -1038,9 +1086,9 @@ func (x *SimpleGetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
x.Path = string(r.DecodeString()) x.Path = string(r.DecodeString())
} }
default: default:
z.DecStructFieldNotFound(-1, yys86) z.DecStructFieldNotFound(-1, yys94)
} // end switch yys86 } // end switch yys94
} // end for yyj86 } // end for yyj94
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -1048,16 +1096,16 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) ...@@ -1048,16 +1096,16 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj92 int var yyj100 int
var yyb92 bool var yyb100 bool
var yyhl92 bool = l >= 0 var yyhl100 bool = l >= 0
yyj92++ yyj100++
if yyhl92 { if yyhl100 {
yyb92 = yyj92 > l yyb100 = yyj100 > l
} else { } else {
yyb92 = r.CheckBreak() yyb100 = r.CheckBreak()
} }
if yyb92 { if yyb100 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1067,13 +1115,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) ...@@ -1067,13 +1115,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj92++ yyj100++
if yyhl92 { if yyhl100 {
yyb92 = yyj92 > l yyb100 = yyj100 > l
} else { } else {
yyb92 = r.CheckBreak() yyb100 = r.CheckBreak()
} }
if yyb92 { if yyb100 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1083,13 +1131,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) ...@@ -1083,13 +1131,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj92++ yyj100++
if yyhl92 { if yyhl100 {
yyb92 = yyj92 > l yyb100 = yyj100 > l
} else { } else {
yyb92 = r.CheckBreak() yyb100 = r.CheckBreak()
} }
if yyb92 { if yyb100 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1099,13 +1147,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) ...@@ -1099,13 +1147,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
} else { } else {
x.Param1 = string(r.DecodeString()) x.Param1 = string(r.DecodeString())
} }
yyj92++ yyj100++
if yyhl92 { if yyhl100 {
yyb92 = yyj92 > l yyb100 = yyj100 > l
} else { } else {
yyb92 = r.CheckBreak() yyb100 = r.CheckBreak()
} }
if yyb92 { if yyb100 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1115,13 +1163,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) ...@@ -1115,13 +1163,13 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
} else { } else {
x.Param2 = string(r.DecodeString()) x.Param2 = string(r.DecodeString())
} }
yyj92++ yyj100++
if yyhl92 { if yyhl100 {
yyb92 = yyj92 > l yyb100 = yyj100 > l
} else { } else {
yyb92 = r.CheckBreak() yyb100 = r.CheckBreak()
} }
if yyb92 { if yyb100 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1132,17 +1180,17 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) ...@@ -1132,17 +1180,17 @@ func (x *SimpleGetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder)
x.Path = string(r.DecodeString()) x.Path = string(r.DecodeString())
} }
for { for {
yyj92++ yyj100++
if yyhl92 { if yyhl100 {
yyb92 = yyj92 > l yyb100 = yyj100 > l
} else { } else {
yyb92 = r.CheckBreak() yyb100 = r.CheckBreak()
} }
if yyb92 { if yyb100 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj92-1, "") z.DecStructFieldNotFound(yyj100-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -1154,37 +1202,37 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -1154,37 +1202,37 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
if x == nil { if x == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym98 := z.EncBinary() yym106 := z.EncBinary()
_ = yym98 _ = yym106
if false { if false {
} else if z.HasExtensions() && z.EncExt(x) { } else if z.HasExtensions() && z.EncExt(x) {
} else { } else {
yysep99 := !z.EncBinary() yysep107 := !z.EncBinary()
yy2arr99 := z.EncBasicHandle().StructToArray yy2arr107 := z.EncBasicHandle().StructToArray
var yyq99 [4]bool var yyq107 [4]bool
_, _, _ = yysep99, yyq99, yy2arr99 _, _, _ = yysep107, yyq107, yy2arr107
const yyr99 bool = false const yyr107 bool = false
yyq99[0] = x.Kind != "" yyq107[0] = x.Kind != ""
yyq99[1] = x.APIVersion != "" yyq107[1] = x.APIVersion != ""
yyq99[3] = len(x.Items) != 0 yyq107[3] = len(x.Items) != 0
var yynn99 int var yynn107 int
if yyr99 || yy2arr99 { if yyr107 || yy2arr107 {
r.EncodeArrayStart(4) r.EncodeArrayStart(4)
} else { } else {
yynn99 = 1 yynn107 = 1
for _, b := range yyq99 { for _, b := range yyq107 {
if b { if b {
yynn99++ yynn107++
} }
} }
r.EncodeMapStart(yynn99) r.EncodeMapStart(yynn107)
yynn99 = 0 yynn107 = 0
} }
if yyr99 || yy2arr99 { if yyr107 || yy2arr107 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq99[0] { if yyq107[0] {
yym101 := z.EncBinary() yym109 := z.EncBinary()
_ = yym101 _ = yym109
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
...@@ -1193,23 +1241,23 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -1193,23 +1241,23 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq99[0] { if yyq107[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind")) r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym102 := z.EncBinary() yym110 := z.EncBinary()
_ = yym102 _ = yym110
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
} }
} }
} }
if yyr99 || yy2arr99 { if yyr107 || yy2arr107 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq99[1] { if yyq107[1] {
yym104 := z.EncBinary() yym112 := z.EncBinary()
_ = yym104 _ = yym112
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
...@@ -1218,49 +1266,49 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -1218,49 +1266,49 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "") r.EncodeString(codecSelferC_UTF81234, "")
} }
} else { } else {
if yyq99[1] { if yyq107[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym105 := z.EncBinary() yym113 := z.EncBinary()
_ = yym105 _ = yym113
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
} }
} }
} }
if yyr99 || yy2arr99 { if yyr107 || yy2arr107 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy107 := &x.ListMeta yy115 := &x.ListMeta
yym108 := z.EncBinary() yym116 := z.EncBinary()
_ = yym108 _ = yym116
if false { if false {
} else if z.HasExtensions() && z.EncExt(yy107) { } else if z.HasExtensions() && z.EncExt(yy115) {
} else { } else {
z.EncFallback(yy107) z.EncFallback(yy115)
} }
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy109 := &x.ListMeta yy117 := &x.ListMeta
yym110 := z.EncBinary() yym118 := z.EncBinary()
_ = yym110 _ = yym118
if false { if false {
} else if z.HasExtensions() && z.EncExt(yy109) { } else if z.HasExtensions() && z.EncExt(yy117) {
} else { } else {
z.EncFallback(yy109) z.EncFallback(yy117)
} }
} }
if yyr99 || yy2arr99 { if yyr107 || yy2arr107 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq99[3] { if yyq107[3] {
if x.Items == nil { if x.Items == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym112 := z.EncBinary() yym120 := z.EncBinary()
_ = yym112 _ = yym120
if false { if false {
} else { } else {
h.encSliceSimple(([]Simple)(x.Items), e) h.encSliceSimple(([]Simple)(x.Items), e)
...@@ -1270,15 +1318,15 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -1270,15 +1318,15 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeNil() r.EncodeNil()
} }
} else { } else {
if yyq99[3] { if yyq107[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("items")) r.EncodeString(codecSelferC_UTF81234, string("items"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Items == nil { if x.Items == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym113 := z.EncBinary() yym121 := z.EncBinary()
_ = yym113 _ = yym121
if false { if false {
} else { } else {
h.encSliceSimple(([]Simple)(x.Items), e) h.encSliceSimple(([]Simple)(x.Items), e)
...@@ -1286,7 +1334,7 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -1286,7 +1334,7 @@ func (x *SimpleList) CodecEncodeSelf(e *codec1978.Encoder) {
} }
} }
} }
if yyr99 || yy2arr99 { if yyr107 || yy2arr107 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234) z.EncSendContainerState(codecSelfer_containerMapEnd1234)
...@@ -1299,25 +1347,25 @@ func (x *SimpleList) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -1299,25 +1347,25 @@ func (x *SimpleList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym114 := z.DecBinary() yym122 := z.DecBinary()
_ = yym114 _ = yym122
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct115 := r.ContainerType() yyct123 := r.ContainerType()
if yyct115 == codecSelferValueTypeMap1234 { if yyct123 == codecSelferValueTypeMap1234 {
yyl115 := r.ReadMapStart() yyl123 := r.ReadMapStart()
if yyl115 == 0 { if yyl123 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl115, d) x.codecDecodeSelfFromMap(yyl123, d)
} }
} else if yyct115 == codecSelferValueTypeArray1234 { } else if yyct123 == codecSelferValueTypeArray1234 {
yyl115 := r.ReadArrayStart() yyl123 := r.ReadArrayStart()
if yyl115 == 0 { if yyl123 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl115, d) x.codecDecodeSelfFromArray(yyl123, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -1329,12 +1377,12 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -1329,12 +1377,12 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys116Slc = z.DecScratchBuffer() // default slice to decode into var yys124Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys116Slc _ = yys124Slc
var yyhl116 bool = l >= 0 var yyhl124 bool = l >= 0
for yyj116 := 0; ; yyj116++ { for yyj124 := 0; ; yyj124++ {
if yyhl116 { if yyhl124 {
if yyj116 >= l { if yyj124 >= l {
break break
} }
} else { } else {
...@@ -1343,10 +1391,10 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -1343,10 +1391,10 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys116Slc = r.DecodeBytes(yys116Slc, true, true) yys124Slc = r.DecodeBytes(yys124Slc, true, true)
yys116 := string(yys116Slc) yys124 := string(yys124Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys116 { switch yys124 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -1363,31 +1411,31 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -1363,31 +1411,31 @@ func (x *SimpleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{} x.ListMeta = pkg1_unversioned.ListMeta{}
} else { } else {
yyv119 := &x.ListMeta yyv127 := &x.ListMeta
yym120 := z.DecBinary() yym128 := z.DecBinary()
_ = yym120 _ = yym128
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv119) { } else if z.HasExtensions() && z.DecExt(yyv127) {
} else { } else {
z.DecFallback(yyv119, false) z.DecFallback(yyv127, false)
} }
} }
case "items": case "items":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Items = nil x.Items = nil
} else { } else {
yyv121 := &x.Items yyv129 := &x.Items
yym122 := z.DecBinary() yym130 := z.DecBinary()
_ = yym122 _ = yym130
if false { if false {
} else { } else {
h.decSliceSimple((*[]Simple)(yyv121), d) h.decSliceSimple((*[]Simple)(yyv129), d)
} }
} }
default: default:
z.DecStructFieldNotFound(-1, yys116) z.DecStructFieldNotFound(-1, yys124)
} // end switch yys116 } // end switch yys124
} // end for yyj116 } // end for yyj124
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -1395,16 +1443,16 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -1395,16 +1443,16 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj123 int var yyj131 int
var yyb123 bool var yyb131 bool
var yyhl123 bool = l >= 0 var yyhl131 bool = l >= 0
yyj123++ yyj131++
if yyhl123 { if yyhl131 {
yyb123 = yyj123 > l yyb131 = yyj131 > l
} else { } else {
yyb123 = r.CheckBreak() yyb131 = r.CheckBreak()
} }
if yyb123 { if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1414,13 +1462,13 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -1414,13 +1462,13 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj123++ yyj131++
if yyhl123 { if yyhl131 {
yyb123 = yyj123 > l yyb131 = yyj131 > l
} else { } else {
yyb123 = r.CheckBreak() yyb131 = r.CheckBreak()
} }
if yyb123 { if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1430,13 +1478,13 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -1430,13 +1478,13 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj123++ yyj131++
if yyhl123 { if yyhl131 {
yyb123 = yyj123 > l yyb131 = yyj131 > l
} else { } else {
yyb123 = r.CheckBreak() yyb131 = r.CheckBreak()
} }
if yyb123 { if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1444,22 +1492,22 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -1444,22 +1492,22 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ListMeta = pkg1_unversioned.ListMeta{} x.ListMeta = pkg1_unversioned.ListMeta{}
} else { } else {
yyv126 := &x.ListMeta yyv134 := &x.ListMeta
yym127 := z.DecBinary() yym135 := z.DecBinary()
_ = yym127 _ = yym135
if false { if false {
} else if z.HasExtensions() && z.DecExt(yyv126) { } else if z.HasExtensions() && z.DecExt(yyv134) {
} else { } else {
z.DecFallback(yyv126, false) z.DecFallback(yyv134, false)
} }
} }
yyj123++ yyj131++
if yyhl123 { if yyhl131 {
yyb123 = yyj123 > l yyb131 = yyj131 > l
} else { } else {
yyb123 = r.CheckBreak() yyb131 = r.CheckBreak()
} }
if yyb123 { if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -1467,26 +1515,26 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -1467,26 +1515,26 @@ func (x *SimpleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Items = nil x.Items = nil
} else { } else {
yyv128 := &x.Items yyv136 := &x.Items
yym129 := z.DecBinary() yym137 := z.DecBinary()
_ = yym129 _ = yym137
if false { if false {
} else { } else {
h.decSliceSimple((*[]Simple)(yyv128), d) h.decSliceSimple((*[]Simple)(yyv136), d)
} }
} }
for { for {
yyj123++ yyj131++
if yyhl123 { if yyhl131 {
yyb123 = yyj123 > l yyb131 = yyj131 > l
} else { } else {
yyb123 = r.CheckBreak() yyb131 = r.CheckBreak()
} }
if yyb123 { if yyb131 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj123-1, "") z.DecStructFieldNotFound(yyj131-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -1496,10 +1544,10 @@ func (x codecSelfer1234) encSliceSimple(v []Simple, e *codec1978.Encoder) { ...@@ -1496,10 +1544,10 @@ func (x codecSelfer1234) encSliceSimple(v []Simple, e *codec1978.Encoder) {
z, r := codec1978.GenHelperEncoder(e) z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r _, _, _ = h, z, r
r.EncodeArrayStart(len(v)) r.EncodeArrayStart(len(v))
for _, yyv130 := range v { for _, yyv138 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy131 := &yyv130 yy139 := &yyv138
yy131.CodecEncodeSelf(e) yy139.CodecEncodeSelf(e)
} }
z.EncSendContainerState(codecSelfer_containerArrayEnd1234) z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -1509,83 +1557,83 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) { ...@@ -1509,83 +1557,83 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yyv132 := *v yyv140 := *v
yyh132, yyl132 := z.DecSliceHelperStart() yyh140, yyl140 := z.DecSliceHelperStart()
var yyc132 bool var yyc140 bool
if yyl132 == 0 { if yyl140 == 0 {
if yyv132 == nil { if yyv140 == nil {
yyv132 = []Simple{} yyv140 = []Simple{}
yyc132 = true yyc140 = true
} else if len(yyv132) != 0 { } else if len(yyv140) != 0 {
yyv132 = yyv132[:0] yyv140 = yyv140[:0]
yyc132 = true yyc140 = true
} }
} else if yyl132 > 0 { } else if yyl140 > 0 {
var yyrr132, yyrl132 int var yyrr140, yyrl140 int
var yyrt132 bool var yyrt140 bool
if yyl132 > cap(yyv132) { if yyl140 > cap(yyv140) {
yyrg132 := len(yyv132) > 0 yyrg140 := len(yyv140) > 0
yyv2132 := yyv132 yyv2140 := yyv140
yyrl132, yyrt132 = z.DecInferLen(yyl132, z.DecBasicHandle().MaxInitLen, 216) yyrl140, yyrt140 = z.DecInferLen(yyl140, z.DecBasicHandle().MaxInitLen, 216)
if yyrt132 { if yyrt140 {
if yyrl132 <= cap(yyv132) { if yyrl140 <= cap(yyv140) {
yyv132 = yyv132[:yyrl132] yyv140 = yyv140[:yyrl140]
} else { } else {
yyv132 = make([]Simple, yyrl132) yyv140 = make([]Simple, yyrl140)
} }
} else { } else {
yyv132 = make([]Simple, yyrl132) yyv140 = make([]Simple, yyrl140)
} }
yyc132 = true yyc140 = true
yyrr132 = len(yyv132) yyrr140 = len(yyv140)
if yyrg132 { if yyrg140 {
copy(yyv132, yyv2132) copy(yyv140, yyv2140)
} }
} else if yyl132 != len(yyv132) { } else if yyl140 != len(yyv140) {
yyv132 = yyv132[:yyl132] yyv140 = yyv140[:yyl140]
yyc132 = true yyc140 = true
} }
yyj132 := 0 yyj140 := 0
for ; yyj132 < yyrr132; yyj132++ { for ; yyj140 < yyrr140; yyj140++ {
yyh132.ElemContainerState(yyj132) yyh140.ElemContainerState(yyj140)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv132[yyj132] = Simple{} yyv140[yyj140] = Simple{}
} else { } else {
yyv133 := &yyv132[yyj132] yyv141 := &yyv140[yyj140]
yyv133.CodecDecodeSelf(d) yyv141.CodecDecodeSelf(d)
} }
} }
if yyrt132 { if yyrt140 {
for ; yyj132 < yyl132; yyj132++ { for ; yyj140 < yyl140; yyj140++ {
yyv132 = append(yyv132, Simple{}) yyv140 = append(yyv140, Simple{})
yyh132.ElemContainerState(yyj132) yyh140.ElemContainerState(yyj140)
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv132[yyj132] = Simple{} yyv140[yyj140] = Simple{}
} else { } else {
yyv134 := &yyv132[yyj132] yyv142 := &yyv140[yyj140]
yyv134.CodecDecodeSelf(d) yyv142.CodecDecodeSelf(d)
} }
} }
} }
} else { } else {
yyj132 := 0 yyj140 := 0
for ; !r.CheckBreak(); yyj132++ { for ; !r.CheckBreak(); yyj140++ {
if yyj132 >= len(yyv132) { if yyj140 >= len(yyv140) {
yyv132 = append(yyv132, Simple{}) // var yyz132 Simple yyv140 = append(yyv140, Simple{}) // var yyz140 Simple
yyc132 = true yyc140 = true
} }
yyh132.ElemContainerState(yyj132) yyh140.ElemContainerState(yyj140)
if yyj132 < len(yyv132) { if yyj140 < len(yyv140) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
yyv132[yyj132] = Simple{} yyv140[yyj140] = Simple{}
} else { } else {
yyv135 := &yyv132[yyj132] yyv143 := &yyv140[yyj140]
yyv135.CodecDecodeSelf(d) yyv143.CodecDecodeSelf(d)
} }
} else { } else {
...@@ -1593,16 +1641,16 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) { ...@@ -1593,16 +1641,16 @@ func (x codecSelfer1234) decSliceSimple(v *[]Simple, d *codec1978.Decoder) {
} }
} }
if yyj132 < len(yyv132) { if yyj140 < len(yyv140) {
yyv132 = yyv132[:yyj132] yyv140 = yyv140[:yyj140]
yyc132 = true yyc140 = true
} else if yyj132 == 0 && yyv132 == nil { } else if yyj140 == 0 && yyv140 == nil {
yyv132 = []Simple{} yyv140 = []Simple{}
yyc132 = true yyc140 = true
} }
} }
yyh132.End() yyh140.End()
if yyc132 { if yyc140 {
*v = yyv132 *v = yyv140
} }
} }
...@@ -64,6 +64,8 @@ type JobController struct { ...@@ -64,6 +64,8 @@ type JobController struct {
// Jobs that need to be updated // Jobs that need to be updated
queue *workqueue.Type queue *workqueue.Type
recorder record.EventRecorder
} }
func NewJobController(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc) *JobController { func NewJobController(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc) *JobController {
...@@ -75,10 +77,11 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn ...@@ -75,10 +77,11 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
kubeClient: kubeClient, kubeClient: kubeClient,
podControl: controller.RealPodControl{ podControl: controller.RealPodControl{
KubeClient: kubeClient, KubeClient: kubeClient,
Recorder: eventBroadcaster.NewRecorder(api.EventSource{Component: "job"}), Recorder: eventBroadcaster.NewRecorder(api.EventSource{Component: "job-controller"}),
}, },
expectations: controller.NewControllerExpectations(), expectations: controller.NewControllerExpectations(),
queue: workqueue.New(), queue: workqueue.New(),
recorder: eventBroadcaster.NewRecorder(api.EventSource{Component: "job-controller"}),
} }
jm.jobStore.Store, jm.jobController = framework.NewInformer( jm.jobStore.Store, jm.jobController = framework.NewInformer(
...@@ -322,16 +325,52 @@ func (jm *JobController) syncJob(key string) error { ...@@ -322,16 +325,52 @@ func (jm *JobController) syncJob(key string) error {
activePods := controller.FilterActivePods(podList.Items) activePods := controller.FilterActivePods(podList.Items)
active := len(activePods) active := len(activePods)
succeeded, failed := getStatus(podList.Items) succeeded, failed := getStatus(podList.Items)
conditions := len(job.Status.Conditions)
if job.Status.StartTime == nil {
now := unversioned.Now()
job.Status.StartTime = &now
}
if pastActiveDeadline(&job) {
// if job was finished previously, we don't want to redo the termination
if isJobFinished(&job) {
return nil
}
// TODO: below code should be replaced with pod termination resulting in
// pod failures, rather than killing pods. Unfortunately none such solution
// exists ATM. There's an open discussion in the topic in
// https://github.com/kubernetes/kubernetes/issues/14602 which might give
// some sort of solution to above problem.
// kill remaining active pods
wait := sync.WaitGroup{}
wait.Add(active)
for i := 0; i < active; i++ {
go func(ix int) {
defer wait.Done()
if err := jm.podControl.DeletePod(job.Namespace, activePods[ix].Name); err != nil {
defer util.HandleError(err)
}
}(i)
}
wait.Wait()
// update status values accordingly
failed += active
active = 0
job.Status.Conditions = append(job.Status.Conditions, newCondition(extensions.JobFailed, "DeadlineExceeded", "Job was active longer than specified deadline"))
jm.recorder.Event(&job, api.EventTypeNormal, "DeadlineExceeded", "Job was active longer than specified deadline")
} else {
if jobNeedsSync { if jobNeedsSync {
active = jm.manageJob(activePods, succeeded, &job) active = jm.manageJob(activePods, succeeded, &job)
} }
completions := succeeded completions := succeeded
if completions == *job.Spec.Completions { if completions == *job.Spec.Completions {
job.Status.Conditions = append(job.Status.Conditions, newCondition()) job.Status.Conditions = append(job.Status.Conditions, newCondition(extensions.JobComplete, "", ""))
now := unversioned.Now()
job.Status.CompletionTime = &now
}
} }
// no need to update the job if the status hasn't changed since last time // no need to update the job if the status hasn't changed since last time
if job.Status.Active != active || job.Status.Succeeded != succeeded || job.Status.Failed != failed { if job.Status.Active != active || job.Status.Succeeded != succeeded || job.Status.Failed != failed || len(job.Status.Conditions) != conditions {
job.Status.Active = active job.Status.Active = active
job.Status.Succeeded = succeeded job.Status.Succeeded = succeeded
job.Status.Failed = failed job.Status.Failed = failed
...@@ -344,21 +383,38 @@ func (jm *JobController) syncJob(key string) error { ...@@ -344,21 +383,38 @@ func (jm *JobController) syncJob(key string) error {
return nil return nil
} }
func newCondition() extensions.JobCondition { // pastActiveDeadline checks if job has ActiveDeadlineSeconds field set and if it is exceeded.
func pastActiveDeadline(job *extensions.Job) bool {
if job.Spec.ActiveDeadlineSeconds == nil || job.Status.StartTime == nil {
return false
}
now := unversioned.Now()
start := job.Status.StartTime.Time
duration := now.Time.Sub(start)
allowedDuration := time.Duration(*job.Spec.ActiveDeadlineSeconds) * time.Second
return duration >= allowedDuration
}
func newCondition(conditionType extensions.JobConditionType, reason, message string) extensions.JobCondition {
return extensions.JobCondition{ return extensions.JobCondition{
Type: extensions.JobComplete, Type: conditionType,
Status: api.ConditionTrue, Status: api.ConditionTrue,
LastProbeTime: unversioned.Now(), LastProbeTime: unversioned.Now(),
LastTransitionTime: unversioned.Now(), LastTransitionTime: unversioned.Now(),
Reason: reason,
Message: message,
} }
} }
// getStatus returns no of succeeded and failed pods running a job
func getStatus(pods []api.Pod) (succeeded, failed int) { func getStatus(pods []api.Pod) (succeeded, failed int) {
succeeded = filterPods(pods, api.PodSucceeded) succeeded = filterPods(pods, api.PodSucceeded)
failed = filterPods(pods, api.PodFailed) failed = filterPods(pods, api.PodFailed)
return return
} }
// manageJob is the core method responsible for managing the number of running
// pods according to what is specified in the job.Spec.
func (jm *JobController) manageJob(activePods []*api.Pod, succeeded int, job *extensions.Job) int { func (jm *JobController) manageJob(activePods []*api.Pod, succeeded int, job *extensions.Job) int {
var activeLock sync.Mutex var activeLock sync.Mutex
active := len(activePods) active := len(activePods)
...@@ -447,7 +503,7 @@ func filterPods(pods []api.Pod, phase api.PodPhase) int { ...@@ -447,7 +503,7 @@ func filterPods(pods []api.Pod, phase api.PodPhase) int {
func isJobFinished(j *extensions.Job) bool { func isJobFinished(j *extensions.Job) bool {
for _, c := range j.Status.Conditions { for _, c := range j.Status.Conditions {
if c.Type == extensions.JobComplete && c.Status == api.ConditionTrue { if (c.Type == extensions.JobComplete || c.Type == extensions.JobFailed) && c.Status == api.ConditionTrue {
return true return true
} }
} }
......
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions"
client "k8s.io/kubernetes/pkg/client/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/client/unversioned/testclient" "k8s.io/kubernetes/pkg/client/unversioned/testclient"
...@@ -209,20 +210,156 @@ func TestControllerSyncJob(t *testing.T) { ...@@ -209,20 +210,156 @@ func TestControllerSyncJob(t *testing.T) {
if actual.Status.Failed != tc.expectedFailed { if actual.Status.Failed != tc.expectedFailed {
t.Errorf("%s: unexpected number of failed pods. Expected %d, saw %d\n", name, tc.expectedFailed, actual.Status.Failed) t.Errorf("%s: unexpected number of failed pods. Expected %d, saw %d\n", name, tc.expectedFailed, actual.Status.Failed)
} }
if actual.Status.StartTime == nil {
t.Errorf("%s: .status.startTime was not set", name)
}
// validate conditions // validate conditions
if tc.expectedComplete { if tc.expectedComplete && !getCondition(actual, extensions.JobComplete) {
completed := false t.Errorf("%s: expected completion condition. Got %#v", name, actual.Status.Conditions)
for _, v := range actual.Status.Conditions { }
if v.Type == extensions.JobComplete && v.Status == api.ConditionTrue { }
completed = true }
break
func TestSyncJobPastDeadline(t *testing.T) {
testCases := map[string]struct {
// job setup
parallelism int
completions int
activeDeadlineSeconds int64
startTime int64
// pod setup
activePods int
succeededPods int
failedPods int
// expectations
expectedDeletions int
expectedActive int
expectedSucceeded int
expectedFailed int
}{
"activeDeadlineSeconds less than single pod execution": {
1, 1, 10, 15,
1, 0, 0,
1, 0, 0, 1,
},
"activeDeadlineSeconds bigger than single pod execution": {
1, 2, 10, 15,
1, 1, 0,
1, 0, 1, 1,
},
"activeDeadlineSeconds times-out before any pod starts": {
1, 1, 10, 10,
0, 0, 0,
0, 0, 0, 0,
},
}
for name, tc := range testCases {
// job manager setup
client := client.NewOrDie(&client.Config{Host: "", GroupVersion: testapi.Default.GroupVersion()})
manager := NewJobController(client, controller.NoResyncPeriodFunc)
fakePodControl := controller.FakePodControl{}
manager.podControl = &fakePodControl
manager.podStoreSynced = alwaysReady
var actual *extensions.Job
manager.updateHandler = func(job *extensions.Job) error {
actual = job
return nil
} }
// job & pods setup
job := newJob(tc.parallelism, tc.completions)
job.Spec.ActiveDeadlineSeconds = &tc.activeDeadlineSeconds
start := unversioned.Unix(unversioned.Now().Time.Unix()-tc.startTime, 0)
job.Status.StartTime = &start
manager.jobStore.Store.Add(job)
for _, pod := range newPodList(tc.activePods, api.PodRunning, job) {
manager.podStore.Store.Add(&pod)
} }
if !completed { for _, pod := range newPodList(tc.succeededPods, api.PodSucceeded, job) {
t.Errorf("%s: expected completion condition. Got %v", name, actual.Status.Conditions) manager.podStore.Store.Add(&pod)
} }
for _, pod := range newPodList(tc.failedPods, api.PodFailed, job) {
manager.podStore.Store.Add(&pod)
} }
// run
err := manager.syncJob(getKey(job, t))
if err != nil {
t.Errorf("%s: unexpected error when syncing jobs %v", err)
} }
// validate created/deleted pods
if len(fakePodControl.Templates) != 0 {
t.Errorf("%s: unexpected number of creates. Expected 0, saw %d\n", name, len(fakePodControl.Templates))
}
if len(fakePodControl.DeletePodName) != tc.expectedDeletions {
t.Errorf("%s: unexpected number of deletes. Expected %d, saw %d\n", name, tc.expectedDeletions, len(fakePodControl.DeletePodName))
}
// validate status
if actual.Status.Active != tc.expectedActive {
t.Errorf("%s: unexpected number of active pods. Expected %d, saw %d\n", name, tc.expectedActive, actual.Status.Active)
}
if actual.Status.Succeeded != tc.expectedSucceeded {
t.Errorf("%s: unexpected number of succeeded pods. Expected %d, saw %d\n", name, tc.expectedSucceeded, actual.Status.Succeeded)
}
if actual.Status.Failed != tc.expectedFailed {
t.Errorf("%s: unexpected number of failed pods. Expected %d, saw %d\n", name, tc.expectedFailed, actual.Status.Failed)
}
if actual.Status.StartTime == nil {
t.Errorf("%s: .status.startTime was not set", name)
}
// validate conditions
if !getCondition(actual, extensions.JobFailed) {
t.Errorf("%s: expected fail condition. Got %#v", name, actual.Status.Conditions)
}
}
}
func getCondition(job *extensions.Job, condition extensions.JobConditionType) bool {
for _, v := range job.Status.Conditions {
if v.Type == condition && v.Status == api.ConditionTrue {
return true
}
}
return false
}
func TestSyncPastDeadlineJobFinished(t *testing.T) {
client := client.NewOrDie(&client.Config{Host: "", GroupVersion: testapi.Default.GroupVersion()})
manager := NewJobController(client, controller.NoResyncPeriodFunc)
fakePodControl := controller.FakePodControl{}
manager.podControl = &fakePodControl
manager.podStoreSynced = alwaysReady
var actual *extensions.Job
manager.updateHandler = func(job *extensions.Job) error {
actual = job
return nil
}
job := newJob(1, 1)
activeDeadlineSeconds := int64(10)
job.Spec.ActiveDeadlineSeconds = &activeDeadlineSeconds
start := unversioned.Unix(unversioned.Now().Time.Unix()-15, 0)
job.Status.StartTime = &start
job.Status.Conditions = append(job.Status.Conditions, newCondition(extensions.JobFailed, "DeadlineExceeded", "Job was active longer than specified deadline"))
manager.jobStore.Store.Add(job)
err := manager.syncJob(getKey(job, t))
if err != nil {
t.Errorf("Unexpected error when syncing jobs %v", err)
}
if len(fakePodControl.Templates) != 0 {
t.Errorf("Unexpected number of creates. Expected %d, saw %d\n", 0, len(fakePodControl.Templates))
}
if len(fakePodControl.DeletePodName) != 0 {
t.Errorf("Unexpected number of deletes. Expected %d, saw %d\n", 0, len(fakePodControl.DeletePodName))
}
if actual != nil {
t.Error("Unexpected job modification")
}
} }
func TestSyncJobDeleted(t *testing.T) { func TestSyncJobDeleted(t *testing.T) {
......
...@@ -895,6 +895,12 @@ func describeJob(job *extensions.Job, events *api.EventList) (string, error) { ...@@ -895,6 +895,12 @@ func describeJob(job *extensions.Job, events *api.EventList) (string, error) {
fmt.Fprintf(out, "Selector:\t%s\n", selector) fmt.Fprintf(out, "Selector:\t%s\n", selector)
fmt.Fprintf(out, "Parallelism:\t%d\n", *job.Spec.Parallelism) fmt.Fprintf(out, "Parallelism:\t%d\n", *job.Spec.Parallelism)
fmt.Fprintf(out, "Completions:\t%d\n", *job.Spec.Completions) fmt.Fprintf(out, "Completions:\t%d\n", *job.Spec.Completions)
if job.Status.StartTime != nil {
fmt.Fprintf(out, "Start Time:\t%s\n", job.Status.StartTime.Time.Format(time.RFC1123Z))
}
if job.Spec.ActiveDeadlineSeconds != nil {
fmt.Fprintf(out, "Active Deadline Seconds:\t%ds\n", *job.Spec.ActiveDeadlineSeconds)
}
fmt.Fprintf(out, "Labels:\t%s\n", labels.FormatLabels(job.Labels)) fmt.Fprintf(out, "Labels:\t%s\n", labels.FormatLabels(job.Labels))
fmt.Fprintf(out, "Pods Statuses:\t%d Running / %d Succeeded / %d Failed\n", job.Status.Active, job.Status.Succeeded, job.Status.Failed) fmt.Fprintf(out, "Pods Statuses:\t%d Running / %d Succeeded / %d Failed\n", job.Status.Active, job.Status.Succeeded, job.Status.Failed)
describeVolumes(job.Spec.Template.Spec.Volumes, out) describeVolumes(job.Spec.Template.Spec.Volumes, out)
......
...@@ -158,7 +158,13 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -158,7 +158,13 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] { if yyq2[2] {
yy10 := &x.ObjectMeta yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e) yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else { } else {
r.EncodeNil() r.EncodeNil()
} }
...@@ -167,14 +173,20 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -167,14 +173,20 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta yy12 := &x.ObjectMeta
yy11.CodecEncodeSelf(e) yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
} }
} }
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym13 := z.EncBinary() yym15 := z.EncBinary()
_ = yym13 _ = yym15
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Key)) r.EncodeString(codecSelferC_UTF81234, string(x.Key))
...@@ -183,8 +195,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -183,8 +195,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Key")) r.EncodeString(codecSelferC_UTF81234, string("Key"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary() yym16 := z.EncBinary()
_ = yym14 _ = yym16
if false { if false {
} else { } else {
r.EncodeString(codecSelferC_UTF81234, string(x.Key)) r.EncodeString(codecSelferC_UTF81234, string(x.Key))
...@@ -195,8 +207,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -195,8 +207,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Map == nil { if x.Map == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym16 := z.EncBinary() yym18 := z.EncBinary()
_ = yym16 _ = yym18
if false { if false {
} else { } else {
z.F.EncMapStringIntV(x.Map, false, e) z.F.EncMapStringIntV(x.Map, false, e)
...@@ -209,8 +221,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -209,8 +221,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Map == nil { if x.Map == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym17 := z.EncBinary() yym19 := z.EncBinary()
_ = yym17 _ = yym19
if false { if false {
} else { } else {
z.F.EncMapStringIntV(x.Map, false, e) z.F.EncMapStringIntV(x.Map, false, e)
...@@ -222,8 +234,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -222,8 +234,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
if x.StringList == nil { if x.StringList == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym19 := z.EncBinary() yym21 := z.EncBinary()
_ = yym19 _ = yym21
if false { if false {
} else { } else {
z.F.EncSliceStringV(x.StringList, false, e) z.F.EncSliceStringV(x.StringList, false, e)
...@@ -236,8 +248,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -236,8 +248,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
if x.StringList == nil { if x.StringList == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym20 := z.EncBinary() yym22 := z.EncBinary()
_ = yym20 _ = yym22
if false { if false {
} else { } else {
z.F.EncSliceStringV(x.StringList, false, e) z.F.EncSliceStringV(x.StringList, false, e)
...@@ -249,8 +261,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -249,8 +261,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
if x.IntList == nil { if x.IntList == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym22 := z.EncBinary() yym24 := z.EncBinary()
_ = yym22 _ = yym24
if false { if false {
} else { } else {
z.F.EncSliceIntV(x.IntList, false, e) z.F.EncSliceIntV(x.IntList, false, e)
...@@ -263,8 +275,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -263,8 +275,8 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) {
if x.IntList == nil { if x.IntList == nil {
r.EncodeNil() r.EncodeNil()
} else { } else {
yym23 := z.EncBinary() yym25 := z.EncBinary()
_ = yym23 _ = yym25
if false { if false {
} else { } else {
z.F.EncSliceIntV(x.IntList, false, e) z.F.EncSliceIntV(x.IntList, false, e)
...@@ -284,25 +296,25 @@ func (x *TestStruct) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -284,25 +296,25 @@ func (x *TestStruct) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym24 := z.DecBinary() yym26 := z.DecBinary()
_ = yym24 _ = yym26
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct25 := r.ContainerType() yyct27 := r.ContainerType()
if yyct25 == codecSelferValueTypeMap1234 { if yyct27 == codecSelferValueTypeMap1234 {
yyl25 := r.ReadMapStart() yyl27 := r.ReadMapStart()
if yyl25 == 0 { if yyl27 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl25, d) x.codecDecodeSelfFromMap(yyl27, d)
} }
} else if yyct25 == codecSelferValueTypeArray1234 { } else if yyct27 == codecSelferValueTypeArray1234 {
yyl25 := r.ReadArrayStart() yyl27 := r.ReadArrayStart()
if yyl25 == 0 { if yyl27 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl25, d) x.codecDecodeSelfFromArray(yyl27, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -314,12 +326,12 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -314,12 +326,12 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys26Slc = z.DecScratchBuffer() // default slice to decode into var yys28Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys26Slc _ = yys28Slc
var yyhl26 bool = l >= 0 var yyhl28 bool = l >= 0
for yyj26 := 0; ; yyj26++ { for yyj28 := 0; ; yyj28++ {
if yyhl26 { if yyhl28 {
if yyj26 >= l { if yyj28 >= l {
break break
} }
} else { } else {
...@@ -328,10 +340,10 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -328,10 +340,10 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys26Slc = r.DecodeBytes(yys26Slc, true, true) yys28Slc = r.DecodeBytes(yys28Slc, true, true)
yys26 := string(yys26Slc) yys28 := string(yys28Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys26 { switch yys28 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -348,8 +360,14 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -348,8 +360,14 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv29 := &x.ObjectMeta yyv31 := &x.ObjectMeta
yyv29.CodecDecodeSelf(d) yym32 := z.DecBinary()
_ = yym32
if false {
} else if z.HasExtensions() && z.DecExt(yyv31) {
} else {
z.DecFallback(yyv31, false)
}
} }
case "Key": case "Key":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
...@@ -361,42 +379,42 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -361,42 +379,42 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Map = nil x.Map = nil
} else { } else {
yyv31 := &x.Map yyv34 := &x.Map
yym32 := z.DecBinary() yym35 := z.DecBinary()
_ = yym32 _ = yym35
if false { if false {
} else { } else {
z.F.DecMapStringIntX(yyv31, false, d) z.F.DecMapStringIntX(yyv34, false, d)
} }
} }
case "StringList": case "StringList":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.StringList = nil x.StringList = nil
} else { } else {
yyv33 := &x.StringList yyv36 := &x.StringList
yym34 := z.DecBinary() yym37 := z.DecBinary()
_ = yym34 _ = yym37
if false { if false {
} else { } else {
z.F.DecSliceStringX(yyv33, false, d) z.F.DecSliceStringX(yyv36, false, d)
} }
} }
case "IntList": case "IntList":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.IntList = nil x.IntList = nil
} else { } else {
yyv35 := &x.IntList yyv38 := &x.IntList
yym36 := z.DecBinary() yym39 := z.DecBinary()
_ = yym36 _ = yym39
if false { if false {
} else { } else {
z.F.DecSliceIntX(yyv35, false, d) z.F.DecSliceIntX(yyv38, false, d)
} }
} }
default: default:
z.DecStructFieldNotFound(-1, yys26) z.DecStructFieldNotFound(-1, yys28)
} // end switch yys26 } // end switch yys28
} // end for yyj26 } // end for yyj28
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -404,16 +422,16 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -404,16 +422,16 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj37 int var yyj40 int
var yyb37 bool var yyb40 bool
var yyhl37 bool = l >= 0 var yyhl40 bool = l >= 0
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -423,13 +441,13 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -423,13 +441,13 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -439,13 +457,13 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -439,13 +457,13 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -453,16 +471,22 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -453,16 +471,22 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv40 := &x.ObjectMeta yyv43 := &x.ObjectMeta
yyv40.CodecDecodeSelf(d) yym44 := z.DecBinary()
_ = yym44
if false {
} else if z.HasExtensions() && z.DecExt(yyv43) {
} else {
z.DecFallback(yyv43, false)
}
} }
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -472,13 +496,13 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -472,13 +496,13 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Key = string(r.DecodeString()) x.Key = string(r.DecodeString())
} }
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -486,21 +510,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -486,21 +510,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Map = nil x.Map = nil
} else { } else {
yyv42 := &x.Map yyv46 := &x.Map
yym43 := z.DecBinary() yym47 := z.DecBinary()
_ = yym43 _ = yym47
if false { if false {
} else { } else {
z.F.DecMapStringIntX(yyv42, false, d) z.F.DecMapStringIntX(yyv46, false, d)
} }
} }
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -508,21 +532,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -508,21 +532,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.StringList = nil x.StringList = nil
} else { } else {
yyv44 := &x.StringList yyv48 := &x.StringList
yym45 := z.DecBinary() yym49 := z.DecBinary()
_ = yym45 _ = yym49
if false { if false {
} else { } else {
z.F.DecSliceStringX(yyv44, false, d) z.F.DecSliceStringX(yyv48, false, d)
} }
} }
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -530,26 +554,26 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -530,26 +554,26 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.IntList = nil x.IntList = nil
} else { } else {
yyv46 := &x.IntList yyv50 := &x.IntList
yym47 := z.DecBinary() yym51 := z.DecBinary()
_ = yym47 _ = yym51
if false { if false {
} else { } else {
z.F.DecSliceIntX(yyv46, false, d) z.F.DecSliceIntX(yyv50, false, d)
} }
} }
for { for {
yyj37++ yyj40++
if yyhl37 { if yyhl40 {
yyb37 = yyj37 > l yyb40 = yyj40 > l
} else { } else {
yyb37 = r.CheckBreak() yyb40 = r.CheckBreak()
} }
if yyb37 { if yyb40 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj37-1, "") z.DecStructFieldNotFound(yyj40-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -156,18 +156,30 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -156,18 +156,30 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy10 := &x.ObjectMeta yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e) yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else { } else {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata")) r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy11 := &x.ObjectMeta yy12 := &x.ObjectMeta
yy11.CodecEncodeSelf(e) yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
} }
if yyr2 || yy2arr2 { if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234) z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym13 := z.EncBinary() yym15 := z.EncBinary()
_ = yym13 _ = yym15
if false { if false {
} else { } else {
r.EncodeInt(int64(x.Value)) r.EncodeInt(int64(x.Value))
...@@ -176,8 +188,8 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) { ...@@ -176,8 +188,8 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234) z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("value")) r.EncodeString(codecSelferC_UTF81234, string("value"))
z.EncSendContainerState(codecSelfer_containerMapValue1234) z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary() yym16 := z.EncBinary()
_ = yym14 _ = yym16
if false { if false {
} else { } else {
r.EncodeInt(int64(x.Value)) r.EncodeInt(int64(x.Value))
...@@ -196,25 +208,25 @@ func (x *TestResource) CodecDecodeSelf(d *codec1978.Decoder) { ...@@ -196,25 +208,25 @@ func (x *TestResource) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
yym15 := z.DecBinary() yym17 := z.DecBinary()
_ = yym15 _ = yym17
if false { if false {
} else if z.HasExtensions() && z.DecExt(x) { } else if z.HasExtensions() && z.DecExt(x) {
} else { } else {
yyct16 := r.ContainerType() yyct18 := r.ContainerType()
if yyct16 == codecSelferValueTypeMap1234 { if yyct18 == codecSelferValueTypeMap1234 {
yyl16 := r.ReadMapStart() yyl18 := r.ReadMapStart()
if yyl16 == 0 { if yyl18 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else { } else {
x.codecDecodeSelfFromMap(yyl16, d) x.codecDecodeSelfFromMap(yyl18, d)
} }
} else if yyct16 == codecSelferValueTypeArray1234 { } else if yyct18 == codecSelferValueTypeArray1234 {
yyl16 := r.ReadArrayStart() yyl18 := r.ReadArrayStart()
if yyl16 == 0 { if yyl18 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else { } else {
x.codecDecodeSelfFromArray(yyl16, d) x.codecDecodeSelfFromArray(yyl18, d)
} }
} else { } else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
...@@ -226,12 +238,12 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -226,12 +238,12 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yys17Slc = z.DecScratchBuffer() // default slice to decode into var yys19Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys17Slc _ = yys19Slc
var yyhl17 bool = l >= 0 var yyhl19 bool = l >= 0
for yyj17 := 0; ; yyj17++ { for yyj19 := 0; ; yyj19++ {
if yyhl17 { if yyhl19 {
if yyj17 >= l { if yyj19 >= l {
break break
} }
} else { } else {
...@@ -240,10 +252,10 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -240,10 +252,10 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
} }
} }
z.DecSendContainerState(codecSelfer_containerMapKey1234) z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys17Slc = r.DecodeBytes(yys17Slc, true, true) yys19Slc = r.DecodeBytes(yys19Slc, true, true)
yys17 := string(yys17Slc) yys19 := string(yys19Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234) z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys17 { switch yys19 {
case "kind": case "kind":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.Kind = "" x.Kind = ""
...@@ -260,8 +272,14 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -260,8 +272,14 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv20 := &x.ObjectMeta yyv22 := &x.ObjectMeta
yyv20.CodecDecodeSelf(d) yym23 := z.DecBinary()
_ = yym23
if false {
} else if z.HasExtensions() && z.DecExt(yyv22) {
} else {
z.DecFallback(yyv22, false)
}
} }
case "value": case "value":
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
...@@ -270,9 +288,9 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { ...@@ -270,9 +288,9 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
x.Value = int(r.DecodeInt(codecSelferBitsize1234)) x.Value = int(r.DecodeInt(codecSelferBitsize1234))
} }
default: default:
z.DecStructFieldNotFound(-1, yys17) z.DecStructFieldNotFound(-1, yys19)
} // end switch yys17 } // end switch yys19
} // end for yyj17 } // end for yyj19
z.DecSendContainerState(codecSelfer_containerMapEnd1234) z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} }
...@@ -280,16 +298,16 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -280,16 +298,16 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234 var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d) z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r _, _, _ = h, z, r
var yyj22 int var yyj25 int
var yyb22 bool var yyb25 bool
var yyhl22 bool = l >= 0 var yyhl25 bool = l >= 0
yyj22++ yyj25++
if yyhl22 { if yyhl25 {
yyb22 = yyj22 > l yyb25 = yyj25 > l
} else { } else {
yyb22 = r.CheckBreak() yyb25 = r.CheckBreak()
} }
if yyb22 { if yyb25 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -299,13 +317,13 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -299,13 +317,13 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.Kind = string(r.DecodeString()) x.Kind = string(r.DecodeString())
} }
yyj22++ yyj25++
if yyhl22 { if yyhl25 {
yyb22 = yyj22 > l yyb25 = yyj25 > l
} else { } else {
yyb22 = r.CheckBreak() yyb25 = r.CheckBreak()
} }
if yyb22 { if yyb25 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -315,13 +333,13 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -315,13 +333,13 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else { } else {
x.APIVersion = string(r.DecodeString()) x.APIVersion = string(r.DecodeString())
} }
yyj22++ yyj25++
if yyhl22 { if yyhl25 {
yyb22 = yyj22 > l yyb25 = yyj25 > l
} else { } else {
yyb22 = r.CheckBreak() yyb25 = r.CheckBreak()
} }
if yyb22 { if yyb25 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -329,16 +347,22 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -329,16 +347,22 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() { if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{} x.ObjectMeta = pkg2_api.ObjectMeta{}
} else { } else {
yyv25 := &x.ObjectMeta yyv28 := &x.ObjectMeta
yyv25.CodecDecodeSelf(d) yym29 := z.DecBinary()
_ = yym29
if false {
} else if z.HasExtensions() && z.DecExt(yyv28) {
} else {
z.DecFallback(yyv28, false)
}
} }
yyj22++ yyj25++
if yyhl22 { if yyhl25 {
yyb22 = yyj22 > l yyb25 = yyj25 > l
} else { } else {
yyb22 = r.CheckBreak() yyb25 = r.CheckBreak()
} }
if yyb22 { if yyb25 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return return
} }
...@@ -349,17 +373,17 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { ...@@ -349,17 +373,17 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
x.Value = int(r.DecodeInt(codecSelferBitsize1234)) x.Value = int(r.DecodeInt(codecSelferBitsize1234))
} }
for { for {
yyj22++ yyj25++
if yyhl22 { if yyhl25 {
yyb22 = yyj22 > l yyb25 = yyj25 > l
} else { } else {
yyb22 = r.CheckBreak() yyb25 = r.CheckBreak()
} }
if yyb22 { if yyb25 {
break break
} }
z.DecSendContainerState(codecSelfer_containerArrayElem1234) z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj22-1, "") z.DecStructFieldNotFound(yyj25-1, "")
} }
z.DecSendContainerState(codecSelfer_containerArrayEnd1234) z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} }
...@@ -182,6 +182,19 @@ var _ = Describe("Job", func() { ...@@ -182,6 +182,19 @@ var _ = Describe("Job", func() {
Expect(err).To(HaveOccurred()) Expect(err).To(HaveOccurred())
Expect(errors.IsNotFound(err)).To(BeTrue()) Expect(errors.IsNotFound(err)).To(BeTrue())
}) })
It("should fail a job", func() {
By("Creating a job")
job := newTestJob("notTerminate", "foo", api.RestartPolicyNever, parallelism, completions)
activeDeadlineSeconds := int64(10)
job.Spec.ActiveDeadlineSeconds = &activeDeadlineSeconds
job, err := createJob(f.Client, f.Namespace.Name, job)
Expect(err).NotTo(HaveOccurred())
By("Ensuring job was failed")
err = waitForJobFail(f.Client, f.Namespace.Name, job.Name)
Expect(err).NotTo(HaveOccurred())
})
}) })
// newTestJob returns a job which does one of several testing behaviors. // newTestJob returns a job which does one of several testing behaviors.
...@@ -283,3 +296,19 @@ func waitForJobFinish(c *client.Client, ns, jobName string, completions int) err ...@@ -283,3 +296,19 @@ func waitForJobFinish(c *client.Client, ns, jobName string, completions int) err
return curr.Status.Succeeded == completions, nil return curr.Status.Succeeded == completions, nil
}) })
} }
// Wait for job fail.
func waitForJobFail(c *client.Client, ns, jobName string) error {
return wait.Poll(poll, jobTimeout, func() (bool, error) {
curr, err := c.Extensions().Jobs(ns).Get(jobName)
if err != nil {
return false, err
}
for _, c := range curr.Status.Conditions {
if c.Type == extensions.JobFailed && c.Status == api.ConditionTrue {
return true, nil
}
}
return false, nil
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment