diff --git a/pkg/apis/extensions/deep_copy_generated.go b/pkg/apis/extensions/deep_copy_generated.go index 86b07119fd8..aa29f5272ba 100644 --- a/pkg/apis/extensions/deep_copy_generated.go +++ b/pkg/apis/extensions/deep_copy_generated.go @@ -1558,6 +1558,69 @@ func deepCopy_extensions_NodeUtilization(in NodeUtilization, out *NodeUtilizatio return nil } +func deepCopy_extensions_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := deepCopy_extensions_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil { + return err + } + if err := deepCopy_extensions_ReplicaSetStatus(in.Status, &out.Status, c); err != nil { + return err + } + return nil +} + +func deepCopy_extensions_ReplicaSetList(in ReplicaSetList, out *ReplicaSetList, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]ReplicaSet, len(in.Items)) + for i := range in.Items { + if err := deepCopy_extensions_ReplicaSet(in.Items[i], &out.Items[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func deepCopy_extensions_ReplicaSetSpec(in ReplicaSetSpec, out *ReplicaSetSpec, c *conversion.Cloner) error { + out.Replicas = in.Replicas + if in.Selector != nil { + out.Selector = new(LabelSelector) + if err := deepCopy_extensions_LabelSelector(*in.Selector, out.Selector, c); err != nil { + return err + } + } else { + out.Selector = nil + } + if in.Template != nil { + out.Template = new(api.PodTemplateSpec) + if err := deepCopy_api_PodTemplateSpec(*in.Template, out.Template, c); err != nil { + return err + } + } else { + out.Template = nil + } + return nil +} + +func deepCopy_extensions_ReplicaSetStatus(in ReplicaSetStatus, out *ReplicaSetStatus, c *conversion.Cloner) error { + out.Replicas = in.Replicas + out.ObservedGeneration = in.ObservedGeneration + return nil +} + func deepCopy_extensions_ReplicationControllerDummy(in ReplicationControllerDummy, out *ReplicationControllerDummy, c *conversion.Cloner) error { if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err @@ -1801,6 +1864,10 @@ func init() { deepCopy_extensions_LabelSelector, deepCopy_extensions_LabelSelectorRequirement, deepCopy_extensions_NodeUtilization, + deepCopy_extensions_ReplicaSet, + deepCopy_extensions_ReplicaSetList, + deepCopy_extensions_ReplicaSetSpec, + deepCopy_extensions_ReplicaSetStatus, deepCopy_extensions_ReplicationControllerDummy, deepCopy_extensions_RollingUpdateDaemonSet, deepCopy_extensions_RollingUpdateDeployment, diff --git a/pkg/apis/extensions/register.go b/pkg/apis/extensions/register.go index 60038753bd8..f33957292e4 100644 --- a/pkg/apis/extensions/register.go +++ b/pkg/apis/extensions/register.go @@ -68,6 +68,8 @@ func addKnownTypes(scheme *runtime.Scheme) { &api.ListOptions{}, &ConfigMap{}, &ConfigMapList{}, + &ReplicaSet{}, + &ReplicaSetList{}, &api.ExportOptions{}, ) } @@ -92,3 +94,5 @@ func (obj *Ingress) GetObjectKind() unversioned.ObjectKind { func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ConfigMap) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ConfigMapList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/extensions/types.generated.go b/pkg/apis/extensions/types.generated.go index 6617afe1e7e..7eb265a7666 100644 --- a/pkg/apis/extensions/types.generated.go +++ b/pkg/apis/extensions/types.generated.go @@ -14774,15 +14774,1186 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1234 := z.EncBinary() + _ = yym1234 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1235 := !z.EncBinary() + yy2arr1235 := z.EncBasicHandle().StructToArray + var yyq1235 [5]bool + _, _, _ = yysep1235, yyq1235, yy2arr1235 + const yyr1235 bool = false + yyq1235[0] = x.Kind != "" + yyq1235[1] = x.APIVersion != "" + yyq1235[2] = true + yyq1235[3] = true + yyq1235[4] = true + var yynn1235 int + if yyr1235 || yy2arr1235 { + r.EncodeArrayStart(5) + } else { + yynn1235 = 0 + for _, b := range yyq1235 { + if b { + yynn1235++ + } + } + r.EncodeMapStart(yynn1235) + yynn1235 = 0 + } + if yyr1235 || yy2arr1235 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1235[0] { + yym1237 := z.EncBinary() + _ = yym1237 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1235[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1238 := z.EncBinary() + _ = yym1238 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1235 || yy2arr1235 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1235[1] { + yym1240 := z.EncBinary() + _ = yym1240 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1235[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1241 := z.EncBinary() + _ = yym1241 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1235 || yy2arr1235 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1235[2] { + yy1243 := &x.ObjectMeta + yy1243.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1235[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1244 := &x.ObjectMeta + yy1244.CodecEncodeSelf(e) + } + } + if yyr1235 || yy2arr1235 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1235[3] { + yy1246 := &x.Spec + yy1246.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1235[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1247 := &x.Spec + yy1247.CodecEncodeSelf(e) + } + } + if yyr1235 || yy2arr1235 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1235[4] { + yy1249 := &x.Status + yy1249.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1235[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1250 := &x.Status + yy1250.CodecEncodeSelf(e) + } + } + if yyr1235 || yy2arr1235 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSet) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1251 := z.DecBinary() + _ = yym1251 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1252 := r.ContainerType() + if yyct1252 == codecSelferValueTypeMap1234 { + yyl1252 := r.ReadMapStart() + if yyl1252 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1252, d) + } + } else if yyct1252 == codecSelferValueTypeArray1234 { + yyl1252 := r.ReadArrayStart() + if yyl1252 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1252, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1253Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1253Slc + var yyhl1253 bool = l >= 0 + for yyj1253 := 0; ; yyj1253++ { + if yyhl1253 { + if yyj1253 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1253Slc = r.DecodeBytes(yys1253Slc, true, true) + yys1253 := string(yys1253Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1253 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv1256 := &x.ObjectMeta + yyv1256.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = ReplicaSetSpec{} + } else { + yyv1257 := &x.Spec + yyv1257.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = ReplicaSetStatus{} + } else { + yyv1258 := &x.Status + yyv1258.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1253) + } // end switch yys1253 + } // end for yyj1253 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1259 int + var yyb1259 bool + var yyhl1259 bool = l >= 0 + yyj1259++ + if yyhl1259 { + yyb1259 = yyj1259 > l + } else { + yyb1259 = r.CheckBreak() + } + if yyb1259 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1259++ + if yyhl1259 { + yyb1259 = yyj1259 > l + } else { + yyb1259 = r.CheckBreak() + } + if yyb1259 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1259++ + if yyhl1259 { + yyb1259 = yyj1259 > l + } else { + yyb1259 = r.CheckBreak() + } + if yyb1259 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv1262 := &x.ObjectMeta + yyv1262.CodecDecodeSelf(d) + } + yyj1259++ + if yyhl1259 { + yyb1259 = yyj1259 > l + } else { + yyb1259 = r.CheckBreak() + } + if yyb1259 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = ReplicaSetSpec{} + } else { + yyv1263 := &x.Spec + yyv1263.CodecDecodeSelf(d) + } + yyj1259++ + if yyhl1259 { + yyb1259 = yyj1259 > l + } else { + yyb1259 = r.CheckBreak() + } + if yyb1259 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = ReplicaSetStatus{} + } else { + yyv1264 := &x.Status + yyv1264.CodecDecodeSelf(d) + } + for { + yyj1259++ + if yyhl1259 { + yyb1259 = yyj1259 > l + } else { + yyb1259 = r.CheckBreak() + } + if yyb1259 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1259-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1265 := z.EncBinary() + _ = yym1265 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1266 := !z.EncBinary() + yy2arr1266 := z.EncBasicHandle().StructToArray + var yyq1266 [4]bool + _, _, _ = yysep1266, yyq1266, yy2arr1266 + const yyr1266 bool = false + yyq1266[0] = x.Kind != "" + yyq1266[1] = x.APIVersion != "" + yyq1266[2] = true + var yynn1266 int + if yyr1266 || yy2arr1266 { + r.EncodeArrayStart(4) + } else { + yynn1266 = 1 + for _, b := range yyq1266 { + if b { + yynn1266++ + } + } + r.EncodeMapStart(yynn1266) + yynn1266 = 0 + } + if yyr1266 || yy2arr1266 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1266[0] { + yym1268 := z.EncBinary() + _ = yym1268 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1266[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1269 := z.EncBinary() + _ = yym1269 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1266 || yy2arr1266 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1266[1] { + yym1271 := z.EncBinary() + _ = yym1271 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1266[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1272 := z.EncBinary() + _ = yym1272 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1266 || yy2arr1266 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1266[2] { + yy1274 := &x.ListMeta + yym1275 := z.EncBinary() + _ = yym1275 + if false { + } else if z.HasExtensions() && z.EncExt(yy1274) { + } else { + z.EncFallback(yy1274) + } + } else { + r.EncodeNil() + } + } else { + if yyq1266[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1276 := &x.ListMeta + yym1277 := z.EncBinary() + _ = yym1277 + if false { + } else if z.HasExtensions() && z.EncExt(yy1276) { + } else { + z.EncFallback(yy1276) + } + } + } + if yyr1266 || yy2arr1266 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1279 := z.EncBinary() + _ = yym1279 + if false { + } else { + h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1280 := z.EncBinary() + _ = yym1280 + if false { + } else { + h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) + } + } + } + if yyr1266 || yy2arr1266 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1281 := z.DecBinary() + _ = yym1281 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1282 := r.ContainerType() + if yyct1282 == codecSelferValueTypeMap1234 { + yyl1282 := r.ReadMapStart() + if yyl1282 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1282, d) + } + } else if yyct1282 == codecSelferValueTypeArray1234 { + yyl1282 := r.ReadArrayStart() + if yyl1282 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1282, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1283Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1283Slc + var yyhl1283 bool = l >= 0 + for yyj1283 := 0; ; yyj1283++ { + if yyhl1283 { + if yyj1283 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1283Slc = r.DecodeBytes(yys1283Slc, true, true) + yys1283 := string(yys1283Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1283 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1286 := &x.ListMeta + yym1287 := z.DecBinary() + _ = yym1287 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1286) { + } else { + z.DecFallback(yyv1286, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1288 := &x.Items + yym1289 := z.DecBinary() + _ = yym1289 + if false { + } else { + h.decSliceReplicaSet((*[]ReplicaSet)(yyv1288), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1283) + } // end switch yys1283 + } // end for yyj1283 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1290 int + var yyb1290 bool + var yyhl1290 bool = l >= 0 + yyj1290++ + if yyhl1290 { + yyb1290 = yyj1290 > l + } else { + yyb1290 = r.CheckBreak() + } + if yyb1290 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1290++ + if yyhl1290 { + yyb1290 = yyj1290 > l + } else { + yyb1290 = r.CheckBreak() + } + if yyb1290 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1290++ + if yyhl1290 { + yyb1290 = yyj1290 > l + } else { + yyb1290 = r.CheckBreak() + } + if yyb1290 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1293 := &x.ListMeta + yym1294 := z.DecBinary() + _ = yym1294 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1293) { + } else { + z.DecFallback(yyv1293, false) + } + } + yyj1290++ + if yyhl1290 { + yyb1290 = yyj1290 > l + } else { + yyb1290 = r.CheckBreak() + } + if yyb1290 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1295 := &x.Items + yym1296 := z.DecBinary() + _ = yym1296 + if false { + } else { + h.decSliceReplicaSet((*[]ReplicaSet)(yyv1295), d) + } + } + for { + yyj1290++ + if yyhl1290 { + yyb1290 = yyj1290 > l + } else { + yyb1290 = r.CheckBreak() + } + if yyb1290 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1290-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1297 := z.EncBinary() + _ = yym1297 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1298 := !z.EncBinary() + yy2arr1298 := z.EncBasicHandle().StructToArray + var yyq1298 [3]bool + _, _, _ = yysep1298, yyq1298, yy2arr1298 + const yyr1298 bool = false + yyq1298[1] = x.Selector != nil + yyq1298[2] = x.Template != nil + var yynn1298 int + if yyr1298 || yy2arr1298 { + r.EncodeArrayStart(3) + } else { + yynn1298 = 1 + for _, b := range yyq1298 { + if b { + yynn1298++ + } + } + r.EncodeMapStart(yynn1298) + yynn1298 = 0 + } + if yyr1298 || yy2arr1298 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1300 := z.EncBinary() + _ = yym1300 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1301 := z.EncBinary() + _ = yym1301 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr1298 || yy2arr1298 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1298[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + x.Selector.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1298[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + x.Selector.CodecEncodeSelf(e) + } + } + } + if yyr1298 || yy2arr1298 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1298[2] { + if x.Template == nil { + r.EncodeNil() + } else { + x.Template.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1298[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Template == nil { + r.EncodeNil() + } else { + x.Template.CodecEncodeSelf(e) + } + } + } + if yyr1298 || yy2arr1298 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1304 := z.DecBinary() + _ = yym1304 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1305 := r.ContainerType() + if yyct1305 == codecSelferValueTypeMap1234 { + yyl1305 := r.ReadMapStart() + if yyl1305 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1305, d) + } + } else if yyct1305 == codecSelferValueTypeArray1234 { + yyl1305 := r.ReadArrayStart() + if yyl1305 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1305, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1306Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1306Slc + var yyhl1306 bool = l >= 0 + for yyj1306 := 0; ; yyj1306++ { + if yyhl1306 { + if yyj1306 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1306Slc = r.DecodeBytes(yys1306Slc, true, true) + yys1306 := string(yys1306Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1306 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(LabelSelector) + } + x.Selector.CodecDecodeSelf(d) + } + case "template": + if r.TryDecodeAsNil() { + if x.Template != nil { + x.Template = nil + } + } else { + if x.Template == nil { + x.Template = new(pkg2_api.PodTemplateSpec) + } + x.Template.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1306) + } // end switch yys1306 + } // end for yyj1306 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1310 int + var yyb1310 bool + var yyhl1310 bool = l >= 0 + yyj1310++ + if yyhl1310 { + yyb1310 = yyj1310 > l + } else { + yyb1310 = r.CheckBreak() + } + if yyb1310 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj1310++ + if yyhl1310 { + yyb1310 = yyj1310 > l + } else { + yyb1310 = r.CheckBreak() + } + if yyb1310 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(LabelSelector) + } + x.Selector.CodecDecodeSelf(d) + } + yyj1310++ + if yyhl1310 { + yyb1310 = yyj1310 > l + } else { + yyb1310 = r.CheckBreak() + } + if yyb1310 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Template != nil { + x.Template = nil + } + } else { + if x.Template == nil { + x.Template = new(pkg2_api.PodTemplateSpec) + } + x.Template.CodecDecodeSelf(d) + } + for { + yyj1310++ + if yyhl1310 { + yyb1310 = yyj1310 > l + } else { + yyb1310 = r.CheckBreak() + } + if yyb1310 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1310-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1314 := z.EncBinary() + _ = yym1314 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1315 := !z.EncBinary() + yy2arr1315 := z.EncBasicHandle().StructToArray + var yyq1315 [2]bool + _, _, _ = yysep1315, yyq1315, yy2arr1315 + const yyr1315 bool = false + yyq1315[1] = x.ObservedGeneration != 0 + var yynn1315 int + if yyr1315 || yy2arr1315 { + r.EncodeArrayStart(2) + } else { + yynn1315 = 1 + for _, b := range yyq1315 { + if b { + yynn1315++ + } + } + r.EncodeMapStart(yynn1315) + yynn1315 = 0 + } + if yyr1315 || yy2arr1315 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1317 := z.EncBinary() + _ = yym1317 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1318 := z.EncBinary() + _ = yym1318 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr1315 || yy2arr1315 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1315[1] { + yym1320 := z.EncBinary() + _ = yym1320 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq1315[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1321 := z.EncBinary() + _ = yym1321 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } + } + if yyr1315 || yy2arr1315 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1322 := z.DecBinary() + _ = yym1322 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1323 := r.ContainerType() + if yyct1323 == codecSelferValueTypeMap1234 { + yyl1323 := r.ReadMapStart() + if yyl1323 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1323, d) + } + } else if yyct1323 == codecSelferValueTypeArray1234 { + yyl1323 := r.ReadArrayStart() + if yyl1323 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1323, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1324Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1324Slc + var yyhl1324 bool = l >= 0 + for yyj1324 := 0; ; yyj1324++ { + if yyhl1324 { + if yyj1324 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1324Slc = r.DecodeBytes(yys1324Slc, true, true) + yys1324 := string(yys1324Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1324 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "observedGeneration": + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + x.ObservedGeneration = int64(r.DecodeInt(64)) + } + default: + z.DecStructFieldNotFound(-1, yys1324) + } // end switch yys1324 + } // end for yyj1324 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1327 int + var yyb1327 bool + var yyhl1327 bool = l >= 0 + yyj1327++ + if yyhl1327 { + yyb1327 = yyj1327 > l + } else { + yyb1327 = r.CheckBreak() + } + if yyb1327 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj1327++ + if yyhl1327 { + yyb1327 = yyj1327 > l + } else { + yyb1327 = r.CheckBreak() + } + if yyb1327 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + x.ObservedGeneration = int64(r.DecodeInt(64)) + } + for { + yyj1327++ + if yyhl1327 { + yyb1327 = yyj1327 > l + } else { + yyb1327 = r.CheckBreak() + } + if yyb1327 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1327-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1234 := range v { + for _, yyv1330 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1235 := &yyv1234 - yy1235.CodecEncodeSelf(e) + yy1331 := &yyv1330 + yy1331.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14792,83 +15963,83 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1236 := *v - yyh1236, yyl1236 := z.DecSliceHelperStart() - var yyc1236 bool - if yyl1236 == 0 { - if yyv1236 == nil { - yyv1236 = []HorizontalPodAutoscaler{} - yyc1236 = true - } else if len(yyv1236) != 0 { - yyv1236 = yyv1236[:0] - yyc1236 = true + yyv1332 := *v + yyh1332, yyl1332 := z.DecSliceHelperStart() + var yyc1332 bool + if yyl1332 == 0 { + if yyv1332 == nil { + yyv1332 = []HorizontalPodAutoscaler{} + yyc1332 = true + } else if len(yyv1332) != 0 { + yyv1332 = yyv1332[:0] + yyc1332 = true } - } else if yyl1236 > 0 { - var yyrr1236, yyrl1236 int - var yyrt1236 bool - if yyl1236 > cap(yyv1236) { + } else if yyl1332 > 0 { + var yyrr1332, yyrl1332 int + var yyrt1332 bool + if yyl1332 > cap(yyv1332) { - yyrg1236 := len(yyv1236) > 0 - yyv21236 := yyv1236 - yyrl1236, yyrt1236 = z.DecInferLen(yyl1236, z.DecBasicHandle().MaxInitLen, 320) - if yyrt1236 { - if yyrl1236 <= cap(yyv1236) { - yyv1236 = yyv1236[:yyrl1236] + yyrg1332 := len(yyv1332) > 0 + yyv21332 := yyv1332 + yyrl1332, yyrt1332 = z.DecInferLen(yyl1332, z.DecBasicHandle().MaxInitLen, 320) + if yyrt1332 { + if yyrl1332 <= cap(yyv1332) { + yyv1332 = yyv1332[:yyrl1332] } else { - yyv1236 = make([]HorizontalPodAutoscaler, yyrl1236) + yyv1332 = make([]HorizontalPodAutoscaler, yyrl1332) } } else { - yyv1236 = make([]HorizontalPodAutoscaler, yyrl1236) + yyv1332 = make([]HorizontalPodAutoscaler, yyrl1332) } - yyc1236 = true - yyrr1236 = len(yyv1236) - if yyrg1236 { - copy(yyv1236, yyv21236) + yyc1332 = true + yyrr1332 = len(yyv1332) + if yyrg1332 { + copy(yyv1332, yyv21332) } - } else if yyl1236 != len(yyv1236) { - yyv1236 = yyv1236[:yyl1236] - yyc1236 = true + } else if yyl1332 != len(yyv1332) { + yyv1332 = yyv1332[:yyl1332] + yyc1332 = true } - yyj1236 := 0 - for ; yyj1236 < yyrr1236; yyj1236++ { - yyh1236.ElemContainerState(yyj1236) + yyj1332 := 0 + for ; yyj1332 < yyrr1332; yyj1332++ { + yyh1332.ElemContainerState(yyj1332) if r.TryDecodeAsNil() { - yyv1236[yyj1236] = HorizontalPodAutoscaler{} + yyv1332[yyj1332] = HorizontalPodAutoscaler{} } else { - yyv1237 := &yyv1236[yyj1236] - yyv1237.CodecDecodeSelf(d) + yyv1333 := &yyv1332[yyj1332] + yyv1333.CodecDecodeSelf(d) } } - if yyrt1236 { - for ; yyj1236 < yyl1236; yyj1236++ { - yyv1236 = append(yyv1236, HorizontalPodAutoscaler{}) - yyh1236.ElemContainerState(yyj1236) + if yyrt1332 { + for ; yyj1332 < yyl1332; yyj1332++ { + yyv1332 = append(yyv1332, HorizontalPodAutoscaler{}) + yyh1332.ElemContainerState(yyj1332) if r.TryDecodeAsNil() { - yyv1236[yyj1236] = HorizontalPodAutoscaler{} + yyv1332[yyj1332] = HorizontalPodAutoscaler{} } else { - yyv1238 := &yyv1236[yyj1236] - yyv1238.CodecDecodeSelf(d) + yyv1334 := &yyv1332[yyj1332] + yyv1334.CodecDecodeSelf(d) } } } } else { - yyj1236 := 0 - for ; !r.CheckBreak(); yyj1236++ { + yyj1332 := 0 + for ; !r.CheckBreak(); yyj1332++ { - if yyj1236 >= len(yyv1236) { - yyv1236 = append(yyv1236, HorizontalPodAutoscaler{}) // var yyz1236 HorizontalPodAutoscaler - yyc1236 = true + if yyj1332 >= len(yyv1332) { + yyv1332 = append(yyv1332, HorizontalPodAutoscaler{}) // var yyz1332 HorizontalPodAutoscaler + yyc1332 = true } - yyh1236.ElemContainerState(yyj1236) - if yyj1236 < len(yyv1236) { + yyh1332.ElemContainerState(yyj1332) + if yyj1332 < len(yyv1332) { if r.TryDecodeAsNil() { - yyv1236[yyj1236] = HorizontalPodAutoscaler{} + yyv1332[yyj1332] = HorizontalPodAutoscaler{} } else { - yyv1239 := &yyv1236[yyj1236] - yyv1239.CodecDecodeSelf(d) + yyv1335 := &yyv1332[yyj1332] + yyv1335.CodecDecodeSelf(d) } } else { @@ -14876,17 +16047,17 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos } } - if yyj1236 < len(yyv1236) { - yyv1236 = yyv1236[:yyj1236] - yyc1236 = true - } else if yyj1236 == 0 && yyv1236 == nil { - yyv1236 = []HorizontalPodAutoscaler{} - yyc1236 = true + if yyj1332 < len(yyv1332) { + yyv1332 = yyv1332[:yyj1332] + yyc1332 = true + } else if yyj1332 == 0 && yyv1332 == nil { + yyv1332 = []HorizontalPodAutoscaler{} + yyc1332 = true } } - yyh1236.End() - if yyc1236 { - *v = yyv1236 + yyh1332.End() + if yyc1332 { + *v = yyv1332 } } @@ -14895,10 +16066,10 @@ func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1240 := range v { + for _, yyv1336 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1241 := &yyv1240 - yy1241.CodecEncodeSelf(e) + yy1337 := &yyv1336 + yy1337.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14908,83 +16079,83 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1242 := *v - yyh1242, yyl1242 := z.DecSliceHelperStart() - var yyc1242 bool - if yyl1242 == 0 { - if yyv1242 == nil { - yyv1242 = []APIVersion{} - yyc1242 = true - } else if len(yyv1242) != 0 { - yyv1242 = yyv1242[:0] - yyc1242 = true + yyv1338 := *v + yyh1338, yyl1338 := z.DecSliceHelperStart() + var yyc1338 bool + if yyl1338 == 0 { + if yyv1338 == nil { + yyv1338 = []APIVersion{} + yyc1338 = true + } else if len(yyv1338) != 0 { + yyv1338 = yyv1338[:0] + yyc1338 = true } - } else if yyl1242 > 0 { - var yyrr1242, yyrl1242 int - var yyrt1242 bool - if yyl1242 > cap(yyv1242) { + } else if yyl1338 > 0 { + var yyrr1338, yyrl1338 int + var yyrt1338 bool + if yyl1338 > cap(yyv1338) { - yyrg1242 := len(yyv1242) > 0 - yyv21242 := yyv1242 - yyrl1242, yyrt1242 = z.DecInferLen(yyl1242, z.DecBasicHandle().MaxInitLen, 32) - if yyrt1242 { - if yyrl1242 <= cap(yyv1242) { - yyv1242 = yyv1242[:yyrl1242] + yyrg1338 := len(yyv1338) > 0 + yyv21338 := yyv1338 + yyrl1338, yyrt1338 = z.DecInferLen(yyl1338, z.DecBasicHandle().MaxInitLen, 32) + if yyrt1338 { + if yyrl1338 <= cap(yyv1338) { + yyv1338 = yyv1338[:yyrl1338] } else { - yyv1242 = make([]APIVersion, yyrl1242) + yyv1338 = make([]APIVersion, yyrl1338) } } else { - yyv1242 = make([]APIVersion, yyrl1242) + yyv1338 = make([]APIVersion, yyrl1338) } - yyc1242 = true - yyrr1242 = len(yyv1242) - if yyrg1242 { - copy(yyv1242, yyv21242) + yyc1338 = true + yyrr1338 = len(yyv1338) + if yyrg1338 { + copy(yyv1338, yyv21338) } - } else if yyl1242 != len(yyv1242) { - yyv1242 = yyv1242[:yyl1242] - yyc1242 = true + } else if yyl1338 != len(yyv1338) { + yyv1338 = yyv1338[:yyl1338] + yyc1338 = true } - yyj1242 := 0 - for ; yyj1242 < yyrr1242; yyj1242++ { - yyh1242.ElemContainerState(yyj1242) + yyj1338 := 0 + for ; yyj1338 < yyrr1338; yyj1338++ { + yyh1338.ElemContainerState(yyj1338) if r.TryDecodeAsNil() { - yyv1242[yyj1242] = APIVersion{} + yyv1338[yyj1338] = APIVersion{} } else { - yyv1243 := &yyv1242[yyj1242] - yyv1243.CodecDecodeSelf(d) + yyv1339 := &yyv1338[yyj1338] + yyv1339.CodecDecodeSelf(d) } } - if yyrt1242 { - for ; yyj1242 < yyl1242; yyj1242++ { - yyv1242 = append(yyv1242, APIVersion{}) - yyh1242.ElemContainerState(yyj1242) + if yyrt1338 { + for ; yyj1338 < yyl1338; yyj1338++ { + yyv1338 = append(yyv1338, APIVersion{}) + yyh1338.ElemContainerState(yyj1338) if r.TryDecodeAsNil() { - yyv1242[yyj1242] = APIVersion{} + yyv1338[yyj1338] = APIVersion{} } else { - yyv1244 := &yyv1242[yyj1242] - yyv1244.CodecDecodeSelf(d) + yyv1340 := &yyv1338[yyj1338] + yyv1340.CodecDecodeSelf(d) } } } } else { - yyj1242 := 0 - for ; !r.CheckBreak(); yyj1242++ { + yyj1338 := 0 + for ; !r.CheckBreak(); yyj1338++ { - if yyj1242 >= len(yyv1242) { - yyv1242 = append(yyv1242, APIVersion{}) // var yyz1242 APIVersion - yyc1242 = true + if yyj1338 >= len(yyv1338) { + yyv1338 = append(yyv1338, APIVersion{}) // var yyz1338 APIVersion + yyc1338 = true } - yyh1242.ElemContainerState(yyj1242) - if yyj1242 < len(yyv1242) { + yyh1338.ElemContainerState(yyj1338) + if yyj1338 < len(yyv1338) { if r.TryDecodeAsNil() { - yyv1242[yyj1242] = APIVersion{} + yyv1338[yyj1338] = APIVersion{} } else { - yyv1245 := &yyv1242[yyj1242] - yyv1245.CodecDecodeSelf(d) + yyv1341 := &yyv1338[yyj1338] + yyv1341.CodecDecodeSelf(d) } } else { @@ -14992,17 +16163,17 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode } } - if yyj1242 < len(yyv1242) { - yyv1242 = yyv1242[:yyj1242] - yyc1242 = true - } else if yyj1242 == 0 && yyv1242 == nil { - yyv1242 = []APIVersion{} - yyc1242 = true + if yyj1338 < len(yyv1338) { + yyv1338 = yyv1338[:yyj1338] + yyc1338 = true + } else if yyj1338 == 0 && yyv1338 == nil { + yyv1338 = []APIVersion{} + yyc1338 = true } } - yyh1242.End() - if yyc1242 { - *v = yyv1242 + yyh1338.End() + if yyc1338 { + *v = yyv1338 } } @@ -15011,10 +16182,10 @@ func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1246 := range v { + for _, yyv1342 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1247 := &yyv1246 - yy1247.CodecEncodeSelf(e) + yy1343 := &yyv1342 + yy1343.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15024,83 +16195,83 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1248 := *v - yyh1248, yyl1248 := z.DecSliceHelperStart() - var yyc1248 bool - if yyl1248 == 0 { - if yyv1248 == nil { - yyv1248 = []ThirdPartyResource{} - yyc1248 = true - } else if len(yyv1248) != 0 { - yyv1248 = yyv1248[:0] - yyc1248 = true + yyv1344 := *v + yyh1344, yyl1344 := z.DecSliceHelperStart() + var yyc1344 bool + if yyl1344 == 0 { + if yyv1344 == nil { + yyv1344 = []ThirdPartyResource{} + yyc1344 = true + } else if len(yyv1344) != 0 { + yyv1344 = yyv1344[:0] + yyc1344 = true } - } else if yyl1248 > 0 { - var yyrr1248, yyrl1248 int - var yyrt1248 bool - if yyl1248 > cap(yyv1248) { + } else if yyl1344 > 0 { + var yyrr1344, yyrl1344 int + var yyrt1344 bool + if yyl1344 > cap(yyv1344) { - yyrg1248 := len(yyv1248) > 0 - yyv21248 := yyv1248 - yyrl1248, yyrt1248 = z.DecInferLen(yyl1248, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1248 { - if yyrl1248 <= cap(yyv1248) { - yyv1248 = yyv1248[:yyrl1248] + yyrg1344 := len(yyv1344) > 0 + yyv21344 := yyv1344 + yyrl1344, yyrt1344 = z.DecInferLen(yyl1344, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1344 { + if yyrl1344 <= cap(yyv1344) { + yyv1344 = yyv1344[:yyrl1344] } else { - yyv1248 = make([]ThirdPartyResource, yyrl1248) + yyv1344 = make([]ThirdPartyResource, yyrl1344) } } else { - yyv1248 = make([]ThirdPartyResource, yyrl1248) + yyv1344 = make([]ThirdPartyResource, yyrl1344) } - yyc1248 = true - yyrr1248 = len(yyv1248) - if yyrg1248 { - copy(yyv1248, yyv21248) + yyc1344 = true + yyrr1344 = len(yyv1344) + if yyrg1344 { + copy(yyv1344, yyv21344) } - } else if yyl1248 != len(yyv1248) { - yyv1248 = yyv1248[:yyl1248] - yyc1248 = true + } else if yyl1344 != len(yyv1344) { + yyv1344 = yyv1344[:yyl1344] + yyc1344 = true } - yyj1248 := 0 - for ; yyj1248 < yyrr1248; yyj1248++ { - yyh1248.ElemContainerState(yyj1248) + yyj1344 := 0 + for ; yyj1344 < yyrr1344; yyj1344++ { + yyh1344.ElemContainerState(yyj1344) if r.TryDecodeAsNil() { - yyv1248[yyj1248] = ThirdPartyResource{} + yyv1344[yyj1344] = ThirdPartyResource{} } else { - yyv1249 := &yyv1248[yyj1248] - yyv1249.CodecDecodeSelf(d) + yyv1345 := &yyv1344[yyj1344] + yyv1345.CodecDecodeSelf(d) } } - if yyrt1248 { - for ; yyj1248 < yyl1248; yyj1248++ { - yyv1248 = append(yyv1248, ThirdPartyResource{}) - yyh1248.ElemContainerState(yyj1248) + if yyrt1344 { + for ; yyj1344 < yyl1344; yyj1344++ { + yyv1344 = append(yyv1344, ThirdPartyResource{}) + yyh1344.ElemContainerState(yyj1344) if r.TryDecodeAsNil() { - yyv1248[yyj1248] = ThirdPartyResource{} + yyv1344[yyj1344] = ThirdPartyResource{} } else { - yyv1250 := &yyv1248[yyj1248] - yyv1250.CodecDecodeSelf(d) + yyv1346 := &yyv1344[yyj1344] + yyv1346.CodecDecodeSelf(d) } } } } else { - yyj1248 := 0 - for ; !r.CheckBreak(); yyj1248++ { + yyj1344 := 0 + for ; !r.CheckBreak(); yyj1344++ { - if yyj1248 >= len(yyv1248) { - yyv1248 = append(yyv1248, ThirdPartyResource{}) // var yyz1248 ThirdPartyResource - yyc1248 = true + if yyj1344 >= len(yyv1344) { + yyv1344 = append(yyv1344, ThirdPartyResource{}) // var yyz1344 ThirdPartyResource + yyc1344 = true } - yyh1248.ElemContainerState(yyj1248) - if yyj1248 < len(yyv1248) { + yyh1344.ElemContainerState(yyj1344) + if yyj1344 < len(yyv1344) { if r.TryDecodeAsNil() { - yyv1248[yyj1248] = ThirdPartyResource{} + yyv1344[yyj1344] = ThirdPartyResource{} } else { - yyv1251 := &yyv1248[yyj1248] - yyv1251.CodecDecodeSelf(d) + yyv1347 := &yyv1344[yyj1344] + yyv1347.CodecDecodeSelf(d) } } else { @@ -15108,17 +16279,17 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * } } - if yyj1248 < len(yyv1248) { - yyv1248 = yyv1248[:yyj1248] - yyc1248 = true - } else if yyj1248 == 0 && yyv1248 == nil { - yyv1248 = []ThirdPartyResource{} - yyc1248 = true + if yyj1344 < len(yyv1344) { + yyv1344 = yyv1344[:yyj1344] + yyc1344 = true + } else if yyj1344 == 0 && yyv1344 == nil { + yyv1344 = []ThirdPartyResource{} + yyc1344 = true } } - yyh1248.End() - if yyc1248 { - *v = yyv1248 + yyh1344.End() + if yyc1344 { + *v = yyv1344 } } @@ -15127,10 +16298,10 @@ func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1252 := range v { + for _, yyv1348 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1253 := &yyv1252 - yy1253.CodecEncodeSelf(e) + yy1349 := &yyv1348 + yy1349.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15140,83 +16311,83 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1254 := *v - yyh1254, yyl1254 := z.DecSliceHelperStart() - var yyc1254 bool - if yyl1254 == 0 { - if yyv1254 == nil { - yyv1254 = []Deployment{} - yyc1254 = true - } else if len(yyv1254) != 0 { - yyv1254 = yyv1254[:0] - yyc1254 = true + yyv1350 := *v + yyh1350, yyl1350 := z.DecSliceHelperStart() + var yyc1350 bool + if yyl1350 == 0 { + if yyv1350 == nil { + yyv1350 = []Deployment{} + yyc1350 = true + } else if len(yyv1350) != 0 { + yyv1350 = yyv1350[:0] + yyc1350 = true } - } else if yyl1254 > 0 { - var yyrr1254, yyrl1254 int - var yyrt1254 bool - if yyl1254 > cap(yyv1254) { + } else if yyl1350 > 0 { + var yyrr1350, yyrl1350 int + var yyrt1350 bool + if yyl1350 > cap(yyv1350) { - yyrg1254 := len(yyv1254) > 0 - yyv21254 := yyv1254 - yyrl1254, yyrt1254 = z.DecInferLen(yyl1254, z.DecBasicHandle().MaxInitLen, 592) - if yyrt1254 { - if yyrl1254 <= cap(yyv1254) { - yyv1254 = yyv1254[:yyrl1254] + yyrg1350 := len(yyv1350) > 0 + yyv21350 := yyv1350 + yyrl1350, yyrt1350 = z.DecInferLen(yyl1350, z.DecBasicHandle().MaxInitLen, 592) + if yyrt1350 { + if yyrl1350 <= cap(yyv1350) { + yyv1350 = yyv1350[:yyrl1350] } else { - yyv1254 = make([]Deployment, yyrl1254) + yyv1350 = make([]Deployment, yyrl1350) } } else { - yyv1254 = make([]Deployment, yyrl1254) + yyv1350 = make([]Deployment, yyrl1350) } - yyc1254 = true - yyrr1254 = len(yyv1254) - if yyrg1254 { - copy(yyv1254, yyv21254) + yyc1350 = true + yyrr1350 = len(yyv1350) + if yyrg1350 { + copy(yyv1350, yyv21350) } - } else if yyl1254 != len(yyv1254) { - yyv1254 = yyv1254[:yyl1254] - yyc1254 = true + } else if yyl1350 != len(yyv1350) { + yyv1350 = yyv1350[:yyl1350] + yyc1350 = true } - yyj1254 := 0 - for ; yyj1254 < yyrr1254; yyj1254++ { - yyh1254.ElemContainerState(yyj1254) + yyj1350 := 0 + for ; yyj1350 < yyrr1350; yyj1350++ { + yyh1350.ElemContainerState(yyj1350) if r.TryDecodeAsNil() { - yyv1254[yyj1254] = Deployment{} + yyv1350[yyj1350] = Deployment{} } else { - yyv1255 := &yyv1254[yyj1254] - yyv1255.CodecDecodeSelf(d) + yyv1351 := &yyv1350[yyj1350] + yyv1351.CodecDecodeSelf(d) } } - if yyrt1254 { - for ; yyj1254 < yyl1254; yyj1254++ { - yyv1254 = append(yyv1254, Deployment{}) - yyh1254.ElemContainerState(yyj1254) + if yyrt1350 { + for ; yyj1350 < yyl1350; yyj1350++ { + yyv1350 = append(yyv1350, Deployment{}) + yyh1350.ElemContainerState(yyj1350) if r.TryDecodeAsNil() { - yyv1254[yyj1254] = Deployment{} + yyv1350[yyj1350] = Deployment{} } else { - yyv1256 := &yyv1254[yyj1254] - yyv1256.CodecDecodeSelf(d) + yyv1352 := &yyv1350[yyj1350] + yyv1352.CodecDecodeSelf(d) } } } } else { - yyj1254 := 0 - for ; !r.CheckBreak(); yyj1254++ { + yyj1350 := 0 + for ; !r.CheckBreak(); yyj1350++ { - if yyj1254 >= len(yyv1254) { - yyv1254 = append(yyv1254, Deployment{}) // var yyz1254 Deployment - yyc1254 = true + if yyj1350 >= len(yyv1350) { + yyv1350 = append(yyv1350, Deployment{}) // var yyz1350 Deployment + yyc1350 = true } - yyh1254.ElemContainerState(yyj1254) - if yyj1254 < len(yyv1254) { + yyh1350.ElemContainerState(yyj1350) + if yyj1350 < len(yyv1350) { if r.TryDecodeAsNil() { - yyv1254[yyj1254] = Deployment{} + yyv1350[yyj1350] = Deployment{} } else { - yyv1257 := &yyv1254[yyj1254] - yyv1257.CodecDecodeSelf(d) + yyv1353 := &yyv1350[yyj1350] + yyv1353.CodecDecodeSelf(d) } } else { @@ -15224,17 +16395,17 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode } } - if yyj1254 < len(yyv1254) { - yyv1254 = yyv1254[:yyj1254] - yyc1254 = true - } else if yyj1254 == 0 && yyv1254 == nil { - yyv1254 = []Deployment{} - yyc1254 = true + if yyj1350 < len(yyv1350) { + yyv1350 = yyv1350[:yyj1350] + yyc1350 = true + } else if yyj1350 == 0 && yyv1350 == nil { + yyv1350 = []Deployment{} + yyc1350 = true } } - yyh1254.End() - if yyc1254 { - *v = yyv1254 + yyh1350.End() + if yyc1350 { + *v = yyv1350 } } @@ -15243,10 +16414,10 @@ func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1258 := range v { + for _, yyv1354 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1259 := &yyv1258 - yy1259.CodecEncodeSelf(e) + yy1355 := &yyv1354 + yy1355.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15256,83 +16427,83 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1260 := *v - yyh1260, yyl1260 := z.DecSliceHelperStart() - var yyc1260 bool - if yyl1260 == 0 { - if yyv1260 == nil { - yyv1260 = []DaemonSet{} - yyc1260 = true - } else if len(yyv1260) != 0 { - yyv1260 = yyv1260[:0] - yyc1260 = true + yyv1356 := *v + yyh1356, yyl1356 := z.DecSliceHelperStart() + var yyc1356 bool + if yyl1356 == 0 { + if yyv1356 == nil { + yyv1356 = []DaemonSet{} + yyc1356 = true + } else if len(yyv1356) != 0 { + yyv1356 = yyv1356[:0] + yyc1356 = true } - } else if yyl1260 > 0 { - var yyrr1260, yyrl1260 int - var yyrt1260 bool - if yyl1260 > cap(yyv1260) { + } else if yyl1356 > 0 { + var yyrr1356, yyrl1356 int + var yyrt1356 bool + if yyl1356 > cap(yyv1356) { - yyrg1260 := len(yyv1260) > 0 - yyv21260 := yyv1260 - yyrl1260, yyrt1260 = z.DecInferLen(yyl1260, z.DecBasicHandle().MaxInitLen, 272) - if yyrt1260 { - if yyrl1260 <= cap(yyv1260) { - yyv1260 = yyv1260[:yyrl1260] + yyrg1356 := len(yyv1356) > 0 + yyv21356 := yyv1356 + yyrl1356, yyrt1356 = z.DecInferLen(yyl1356, z.DecBasicHandle().MaxInitLen, 272) + if yyrt1356 { + if yyrl1356 <= cap(yyv1356) { + yyv1356 = yyv1356[:yyrl1356] } else { - yyv1260 = make([]DaemonSet, yyrl1260) + yyv1356 = make([]DaemonSet, yyrl1356) } } else { - yyv1260 = make([]DaemonSet, yyrl1260) + yyv1356 = make([]DaemonSet, yyrl1356) } - yyc1260 = true - yyrr1260 = len(yyv1260) - if yyrg1260 { - copy(yyv1260, yyv21260) + yyc1356 = true + yyrr1356 = len(yyv1356) + if yyrg1356 { + copy(yyv1356, yyv21356) } - } else if yyl1260 != len(yyv1260) { - yyv1260 = yyv1260[:yyl1260] - yyc1260 = true + } else if yyl1356 != len(yyv1356) { + yyv1356 = yyv1356[:yyl1356] + yyc1356 = true } - yyj1260 := 0 - for ; yyj1260 < yyrr1260; yyj1260++ { - yyh1260.ElemContainerState(yyj1260) + yyj1356 := 0 + for ; yyj1356 < yyrr1356; yyj1356++ { + yyh1356.ElemContainerState(yyj1356) if r.TryDecodeAsNil() { - yyv1260[yyj1260] = DaemonSet{} + yyv1356[yyj1356] = DaemonSet{} } else { - yyv1261 := &yyv1260[yyj1260] - yyv1261.CodecDecodeSelf(d) + yyv1357 := &yyv1356[yyj1356] + yyv1357.CodecDecodeSelf(d) } } - if yyrt1260 { - for ; yyj1260 < yyl1260; yyj1260++ { - yyv1260 = append(yyv1260, DaemonSet{}) - yyh1260.ElemContainerState(yyj1260) + if yyrt1356 { + for ; yyj1356 < yyl1356; yyj1356++ { + yyv1356 = append(yyv1356, DaemonSet{}) + yyh1356.ElemContainerState(yyj1356) if r.TryDecodeAsNil() { - yyv1260[yyj1260] = DaemonSet{} + yyv1356[yyj1356] = DaemonSet{} } else { - yyv1262 := &yyv1260[yyj1260] - yyv1262.CodecDecodeSelf(d) + yyv1358 := &yyv1356[yyj1356] + yyv1358.CodecDecodeSelf(d) } } } } else { - yyj1260 := 0 - for ; !r.CheckBreak(); yyj1260++ { + yyj1356 := 0 + for ; !r.CheckBreak(); yyj1356++ { - if yyj1260 >= len(yyv1260) { - yyv1260 = append(yyv1260, DaemonSet{}) // var yyz1260 DaemonSet - yyc1260 = true + if yyj1356 >= len(yyv1356) { + yyv1356 = append(yyv1356, DaemonSet{}) // var yyz1356 DaemonSet + yyc1356 = true } - yyh1260.ElemContainerState(yyj1260) - if yyj1260 < len(yyv1260) { + yyh1356.ElemContainerState(yyj1356) + if yyj1356 < len(yyv1356) { if r.TryDecodeAsNil() { - yyv1260[yyj1260] = DaemonSet{} + yyv1356[yyj1356] = DaemonSet{} } else { - yyv1263 := &yyv1260[yyj1260] - yyv1263.CodecDecodeSelf(d) + yyv1359 := &yyv1356[yyj1356] + yyv1359.CodecDecodeSelf(d) } } else { @@ -15340,17 +16511,17 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) } } - if yyj1260 < len(yyv1260) { - yyv1260 = yyv1260[:yyj1260] - yyc1260 = true - } else if yyj1260 == 0 && yyv1260 == nil { - yyv1260 = []DaemonSet{} - yyc1260 = true + if yyj1356 < len(yyv1356) { + yyv1356 = yyv1356[:yyj1356] + yyc1356 = true + } else if yyj1356 == 0 && yyv1356 == nil { + yyv1356 = []DaemonSet{} + yyc1356 = true } } - yyh1260.End() - if yyc1260 { - *v = yyv1260 + yyh1356.End() + if yyc1356 { + *v = yyv1356 } } @@ -15359,10 +16530,10 @@ func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceDa z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1264 := range v { + for _, yyv1360 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1265 := &yyv1264 - yy1265.CodecEncodeSelf(e) + yy1361 := &yyv1360 + yy1361.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15372,83 +16543,83 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1266 := *v - yyh1266, yyl1266 := z.DecSliceHelperStart() - var yyc1266 bool - if yyl1266 == 0 { - if yyv1266 == nil { - yyv1266 = []ThirdPartyResourceData{} - yyc1266 = true - } else if len(yyv1266) != 0 { - yyv1266 = yyv1266[:0] - yyc1266 = true + yyv1362 := *v + yyh1362, yyl1362 := z.DecSliceHelperStart() + var yyc1362 bool + if yyl1362 == 0 { + if yyv1362 == nil { + yyv1362 = []ThirdPartyResourceData{} + yyc1362 = true + } else if len(yyv1362) != 0 { + yyv1362 = yyv1362[:0] + yyc1362 = true } - } else if yyl1266 > 0 { - var yyrr1266, yyrl1266 int - var yyrt1266 bool - if yyl1266 > cap(yyv1266) { + } else if yyl1362 > 0 { + var yyrr1362, yyrl1362 int + var yyrt1362 bool + if yyl1362 > cap(yyv1362) { - yyrg1266 := len(yyv1266) > 0 - yyv21266 := yyv1266 - yyrl1266, yyrt1266 = z.DecInferLen(yyl1266, z.DecBasicHandle().MaxInitLen, 216) - if yyrt1266 { - if yyrl1266 <= cap(yyv1266) { - yyv1266 = yyv1266[:yyrl1266] + yyrg1362 := len(yyv1362) > 0 + yyv21362 := yyv1362 + yyrl1362, yyrt1362 = z.DecInferLen(yyl1362, z.DecBasicHandle().MaxInitLen, 216) + if yyrt1362 { + if yyrl1362 <= cap(yyv1362) { + yyv1362 = yyv1362[:yyrl1362] } else { - yyv1266 = make([]ThirdPartyResourceData, yyrl1266) + yyv1362 = make([]ThirdPartyResourceData, yyrl1362) } } else { - yyv1266 = make([]ThirdPartyResourceData, yyrl1266) + yyv1362 = make([]ThirdPartyResourceData, yyrl1362) } - yyc1266 = true - yyrr1266 = len(yyv1266) - if yyrg1266 { - copy(yyv1266, yyv21266) + yyc1362 = true + yyrr1362 = len(yyv1362) + if yyrg1362 { + copy(yyv1362, yyv21362) } - } else if yyl1266 != len(yyv1266) { - yyv1266 = yyv1266[:yyl1266] - yyc1266 = true + } else if yyl1362 != len(yyv1362) { + yyv1362 = yyv1362[:yyl1362] + yyc1362 = true } - yyj1266 := 0 - for ; yyj1266 < yyrr1266; yyj1266++ { - yyh1266.ElemContainerState(yyj1266) + yyj1362 := 0 + for ; yyj1362 < yyrr1362; yyj1362++ { + yyh1362.ElemContainerState(yyj1362) if r.TryDecodeAsNil() { - yyv1266[yyj1266] = ThirdPartyResourceData{} + yyv1362[yyj1362] = ThirdPartyResourceData{} } else { - yyv1267 := &yyv1266[yyj1266] - yyv1267.CodecDecodeSelf(d) + yyv1363 := &yyv1362[yyj1362] + yyv1363.CodecDecodeSelf(d) } } - if yyrt1266 { - for ; yyj1266 < yyl1266; yyj1266++ { - yyv1266 = append(yyv1266, ThirdPartyResourceData{}) - yyh1266.ElemContainerState(yyj1266) + if yyrt1362 { + for ; yyj1362 < yyl1362; yyj1362++ { + yyv1362 = append(yyv1362, ThirdPartyResourceData{}) + yyh1362.ElemContainerState(yyj1362) if r.TryDecodeAsNil() { - yyv1266[yyj1266] = ThirdPartyResourceData{} + yyv1362[yyj1362] = ThirdPartyResourceData{} } else { - yyv1268 := &yyv1266[yyj1266] - yyv1268.CodecDecodeSelf(d) + yyv1364 := &yyv1362[yyj1362] + yyv1364.CodecDecodeSelf(d) } } } } else { - yyj1266 := 0 - for ; !r.CheckBreak(); yyj1266++ { + yyj1362 := 0 + for ; !r.CheckBreak(); yyj1362++ { - if yyj1266 >= len(yyv1266) { - yyv1266 = append(yyv1266, ThirdPartyResourceData{}) // var yyz1266 ThirdPartyResourceData - yyc1266 = true + if yyj1362 >= len(yyv1362) { + yyv1362 = append(yyv1362, ThirdPartyResourceData{}) // var yyz1362 ThirdPartyResourceData + yyc1362 = true } - yyh1266.ElemContainerState(yyj1266) - if yyj1266 < len(yyv1266) { + yyh1362.ElemContainerState(yyj1362) + if yyj1362 < len(yyv1362) { if r.TryDecodeAsNil() { - yyv1266[yyj1266] = ThirdPartyResourceData{} + yyv1362[yyj1362] = ThirdPartyResourceData{} } else { - yyv1269 := &yyv1266[yyj1266] - yyv1269.CodecDecodeSelf(d) + yyv1365 := &yyv1362[yyj1362] + yyv1365.CodecDecodeSelf(d) } } else { @@ -15456,17 +16627,17 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD } } - if yyj1266 < len(yyv1266) { - yyv1266 = yyv1266[:yyj1266] - yyc1266 = true - } else if yyj1266 == 0 && yyv1266 == nil { - yyv1266 = []ThirdPartyResourceData{} - yyc1266 = true + if yyj1362 < len(yyv1362) { + yyv1362 = yyv1362[:yyj1362] + yyc1362 = true + } else if yyj1362 == 0 && yyv1362 == nil { + yyv1362 = []ThirdPartyResourceData{} + yyc1362 = true } } - yyh1266.End() - if yyc1266 { - *v = yyv1266 + yyh1362.End() + if yyc1362 { + *v = yyv1362 } } @@ -15475,10 +16646,10 @@ func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1270 := range v { + for _, yyv1366 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1271 := &yyv1270 - yy1271.CodecEncodeSelf(e) + yy1367 := &yyv1366 + yy1367.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15488,83 +16659,83 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1272 := *v - yyh1272, yyl1272 := z.DecSliceHelperStart() - var yyc1272 bool - if yyl1272 == 0 { - if yyv1272 == nil { - yyv1272 = []Job{} - yyc1272 = true - } else if len(yyv1272) != 0 { - yyv1272 = yyv1272[:0] - yyc1272 = true + yyv1368 := *v + yyh1368, yyl1368 := z.DecSliceHelperStart() + var yyc1368 bool + if yyl1368 == 0 { + if yyv1368 == nil { + yyv1368 = []Job{} + yyc1368 = true + } else if len(yyv1368) != 0 { + yyv1368 = yyv1368[:0] + yyc1368 = true } - } else if yyl1272 > 0 { - var yyrr1272, yyrl1272 int - var yyrt1272 bool - if yyl1272 > cap(yyv1272) { + } else if yyl1368 > 0 { + var yyrr1368, yyrl1368 int + var yyrt1368 bool + if yyl1368 > cap(yyv1368) { - yyrg1272 := len(yyv1272) > 0 - yyv21272 := yyv1272 - yyrl1272, yyrt1272 = z.DecInferLen(yyl1272, z.DecBasicHandle().MaxInitLen, 616) - if yyrt1272 { - if yyrl1272 <= cap(yyv1272) { - yyv1272 = yyv1272[:yyrl1272] + yyrg1368 := len(yyv1368) > 0 + yyv21368 := yyv1368 + yyrl1368, yyrt1368 = z.DecInferLen(yyl1368, z.DecBasicHandle().MaxInitLen, 616) + if yyrt1368 { + if yyrl1368 <= cap(yyv1368) { + yyv1368 = yyv1368[:yyrl1368] } else { - yyv1272 = make([]Job, yyrl1272) + yyv1368 = make([]Job, yyrl1368) } } else { - yyv1272 = make([]Job, yyrl1272) + yyv1368 = make([]Job, yyrl1368) } - yyc1272 = true - yyrr1272 = len(yyv1272) - if yyrg1272 { - copy(yyv1272, yyv21272) + yyc1368 = true + yyrr1368 = len(yyv1368) + if yyrg1368 { + copy(yyv1368, yyv21368) } - } else if yyl1272 != len(yyv1272) { - yyv1272 = yyv1272[:yyl1272] - yyc1272 = true + } else if yyl1368 != len(yyv1368) { + yyv1368 = yyv1368[:yyl1368] + yyc1368 = true } - yyj1272 := 0 - for ; yyj1272 < yyrr1272; yyj1272++ { - yyh1272.ElemContainerState(yyj1272) + yyj1368 := 0 + for ; yyj1368 < yyrr1368; yyj1368++ { + yyh1368.ElemContainerState(yyj1368) if r.TryDecodeAsNil() { - yyv1272[yyj1272] = Job{} + yyv1368[yyj1368] = Job{} } else { - yyv1273 := &yyv1272[yyj1272] - yyv1273.CodecDecodeSelf(d) + yyv1369 := &yyv1368[yyj1368] + yyv1369.CodecDecodeSelf(d) } } - if yyrt1272 { - for ; yyj1272 < yyl1272; yyj1272++ { - yyv1272 = append(yyv1272, Job{}) - yyh1272.ElemContainerState(yyj1272) + if yyrt1368 { + for ; yyj1368 < yyl1368; yyj1368++ { + yyv1368 = append(yyv1368, Job{}) + yyh1368.ElemContainerState(yyj1368) if r.TryDecodeAsNil() { - yyv1272[yyj1272] = Job{} + yyv1368[yyj1368] = Job{} } else { - yyv1274 := &yyv1272[yyj1272] - yyv1274.CodecDecodeSelf(d) + yyv1370 := &yyv1368[yyj1368] + yyv1370.CodecDecodeSelf(d) } } } } else { - yyj1272 := 0 - for ; !r.CheckBreak(); yyj1272++ { + yyj1368 := 0 + for ; !r.CheckBreak(); yyj1368++ { - if yyj1272 >= len(yyv1272) { - yyv1272 = append(yyv1272, Job{}) // var yyz1272 Job - yyc1272 = true + if yyj1368 >= len(yyv1368) { + yyv1368 = append(yyv1368, Job{}) // var yyz1368 Job + yyc1368 = true } - yyh1272.ElemContainerState(yyj1272) - if yyj1272 < len(yyv1272) { + yyh1368.ElemContainerState(yyj1368) + if yyj1368 < len(yyv1368) { if r.TryDecodeAsNil() { - yyv1272[yyj1272] = Job{} + yyv1368[yyj1368] = Job{} } else { - yyv1275 := &yyv1272[yyj1272] - yyv1275.CodecDecodeSelf(d) + yyv1371 := &yyv1368[yyj1368] + yyv1371.CodecDecodeSelf(d) } } else { @@ -15572,17 +16743,17 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { } } - if yyj1272 < len(yyv1272) { - yyv1272 = yyv1272[:yyj1272] - yyc1272 = true - } else if yyj1272 == 0 && yyv1272 == nil { - yyv1272 = []Job{} - yyc1272 = true + if yyj1368 < len(yyv1368) { + yyv1368 = yyv1368[:yyj1368] + yyc1368 = true + } else if yyj1368 == 0 && yyv1368 == nil { + yyv1368 = []Job{} + yyc1368 = true } } - yyh1272.End() - if yyc1272 { - *v = yyv1272 + yyh1368.End() + if yyc1368 { + *v = yyv1368 } } @@ -15591,10 +16762,10 @@ func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1276 := range v { + for _, yyv1372 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1277 := &yyv1276 - yy1277.CodecEncodeSelf(e) + yy1373 := &yyv1372 + yy1373.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15604,83 +16775,83 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1278 := *v - yyh1278, yyl1278 := z.DecSliceHelperStart() - var yyc1278 bool - if yyl1278 == 0 { - if yyv1278 == nil { - yyv1278 = []JobCondition{} - yyc1278 = true - } else if len(yyv1278) != 0 { - yyv1278 = yyv1278[:0] - yyc1278 = true + yyv1374 := *v + yyh1374, yyl1374 := z.DecSliceHelperStart() + var yyc1374 bool + if yyl1374 == 0 { + if yyv1374 == nil { + yyv1374 = []JobCondition{} + yyc1374 = true + } else if len(yyv1374) != 0 { + yyv1374 = yyv1374[:0] + yyc1374 = true } - } else if yyl1278 > 0 { - var yyrr1278, yyrl1278 int - var yyrt1278 bool - if yyl1278 > cap(yyv1278) { + } else if yyl1374 > 0 { + var yyrr1374, yyrl1374 int + var yyrt1374 bool + if yyl1374 > cap(yyv1374) { - yyrg1278 := len(yyv1278) > 0 - yyv21278 := yyv1278 - yyrl1278, yyrt1278 = z.DecInferLen(yyl1278, z.DecBasicHandle().MaxInitLen, 112) - if yyrt1278 { - if yyrl1278 <= cap(yyv1278) { - yyv1278 = yyv1278[:yyrl1278] + yyrg1374 := len(yyv1374) > 0 + yyv21374 := yyv1374 + yyrl1374, yyrt1374 = z.DecInferLen(yyl1374, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1374 { + if yyrl1374 <= cap(yyv1374) { + yyv1374 = yyv1374[:yyrl1374] } else { - yyv1278 = make([]JobCondition, yyrl1278) + yyv1374 = make([]JobCondition, yyrl1374) } } else { - yyv1278 = make([]JobCondition, yyrl1278) + yyv1374 = make([]JobCondition, yyrl1374) } - yyc1278 = true - yyrr1278 = len(yyv1278) - if yyrg1278 { - copy(yyv1278, yyv21278) + yyc1374 = true + yyrr1374 = len(yyv1374) + if yyrg1374 { + copy(yyv1374, yyv21374) } - } else if yyl1278 != len(yyv1278) { - yyv1278 = yyv1278[:yyl1278] - yyc1278 = true + } else if yyl1374 != len(yyv1374) { + yyv1374 = yyv1374[:yyl1374] + yyc1374 = true } - yyj1278 := 0 - for ; yyj1278 < yyrr1278; yyj1278++ { - yyh1278.ElemContainerState(yyj1278) + yyj1374 := 0 + for ; yyj1374 < yyrr1374; yyj1374++ { + yyh1374.ElemContainerState(yyj1374) if r.TryDecodeAsNil() { - yyv1278[yyj1278] = JobCondition{} + yyv1374[yyj1374] = JobCondition{} } else { - yyv1279 := &yyv1278[yyj1278] - yyv1279.CodecDecodeSelf(d) + yyv1375 := &yyv1374[yyj1374] + yyv1375.CodecDecodeSelf(d) } } - if yyrt1278 { - for ; yyj1278 < yyl1278; yyj1278++ { - yyv1278 = append(yyv1278, JobCondition{}) - yyh1278.ElemContainerState(yyj1278) + if yyrt1374 { + for ; yyj1374 < yyl1374; yyj1374++ { + yyv1374 = append(yyv1374, JobCondition{}) + yyh1374.ElemContainerState(yyj1374) if r.TryDecodeAsNil() { - yyv1278[yyj1278] = JobCondition{} + yyv1374[yyj1374] = JobCondition{} } else { - yyv1280 := &yyv1278[yyj1278] - yyv1280.CodecDecodeSelf(d) + yyv1376 := &yyv1374[yyj1374] + yyv1376.CodecDecodeSelf(d) } } } } else { - yyj1278 := 0 - for ; !r.CheckBreak(); yyj1278++ { + yyj1374 := 0 + for ; !r.CheckBreak(); yyj1374++ { - if yyj1278 >= len(yyv1278) { - yyv1278 = append(yyv1278, JobCondition{}) // var yyz1278 JobCondition - yyc1278 = true + if yyj1374 >= len(yyv1374) { + yyv1374 = append(yyv1374, JobCondition{}) // var yyz1374 JobCondition + yyc1374 = true } - yyh1278.ElemContainerState(yyj1278) - if yyj1278 < len(yyv1278) { + yyh1374.ElemContainerState(yyj1374) + if yyj1374 < len(yyv1374) { if r.TryDecodeAsNil() { - yyv1278[yyj1278] = JobCondition{} + yyv1374[yyj1374] = JobCondition{} } else { - yyv1281 := &yyv1278[yyj1278] - yyv1281.CodecDecodeSelf(d) + yyv1377 := &yyv1374[yyj1374] + yyv1377.CodecDecodeSelf(d) } } else { @@ -15688,17 +16859,17 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De } } - if yyj1278 < len(yyv1278) { - yyv1278 = yyv1278[:yyj1278] - yyc1278 = true - } else if yyj1278 == 0 && yyv1278 == nil { - yyv1278 = []JobCondition{} - yyc1278 = true + if yyj1374 < len(yyv1374) { + yyv1374 = yyv1374[:yyj1374] + yyc1374 = true + } else if yyj1374 == 0 && yyv1374 == nil { + yyv1374 = []JobCondition{} + yyc1374 = true } } - yyh1278.End() - if yyc1278 { - *v = yyv1278 + yyh1374.End() + if yyc1374 { + *v = yyv1374 } } @@ -15707,10 +16878,10 @@ func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1282 := range v { + for _, yyv1378 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1283 := &yyv1282 - yy1283.CodecEncodeSelf(e) + yy1379 := &yyv1378 + yy1379.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15720,83 +16891,83 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1284 := *v - yyh1284, yyl1284 := z.DecSliceHelperStart() - var yyc1284 bool - if yyl1284 == 0 { - if yyv1284 == nil { - yyv1284 = []Ingress{} - yyc1284 = true - } else if len(yyv1284) != 0 { - yyv1284 = yyv1284[:0] - yyc1284 = true + yyv1380 := *v + yyh1380, yyl1380 := z.DecSliceHelperStart() + var yyc1380 bool + if yyl1380 == 0 { + if yyv1380 == nil { + yyv1380 = []Ingress{} + yyc1380 = true + } else if len(yyv1380) != 0 { + yyv1380 = yyv1380[:0] + yyc1380 = true } - } else if yyl1284 > 0 { - var yyrr1284, yyrl1284 int - var yyrt1284 bool - if yyl1284 > cap(yyv1284) { + } else if yyl1380 > 0 { + var yyrr1380, yyrl1380 int + var yyrt1380 bool + if yyl1380 > cap(yyv1380) { - yyrg1284 := len(yyv1284) > 0 - yyv21284 := yyv1284 - yyrl1284, yyrt1284 = z.DecInferLen(yyl1284, z.DecBasicHandle().MaxInitLen, 248) - if yyrt1284 { - if yyrl1284 <= cap(yyv1284) { - yyv1284 = yyv1284[:yyrl1284] + yyrg1380 := len(yyv1380) > 0 + yyv21380 := yyv1380 + yyrl1380, yyrt1380 = z.DecInferLen(yyl1380, z.DecBasicHandle().MaxInitLen, 248) + if yyrt1380 { + if yyrl1380 <= cap(yyv1380) { + yyv1380 = yyv1380[:yyrl1380] } else { - yyv1284 = make([]Ingress, yyrl1284) + yyv1380 = make([]Ingress, yyrl1380) } } else { - yyv1284 = make([]Ingress, yyrl1284) + yyv1380 = make([]Ingress, yyrl1380) } - yyc1284 = true - yyrr1284 = len(yyv1284) - if yyrg1284 { - copy(yyv1284, yyv21284) + yyc1380 = true + yyrr1380 = len(yyv1380) + if yyrg1380 { + copy(yyv1380, yyv21380) } - } else if yyl1284 != len(yyv1284) { - yyv1284 = yyv1284[:yyl1284] - yyc1284 = true + } else if yyl1380 != len(yyv1380) { + yyv1380 = yyv1380[:yyl1380] + yyc1380 = true } - yyj1284 := 0 - for ; yyj1284 < yyrr1284; yyj1284++ { - yyh1284.ElemContainerState(yyj1284) + yyj1380 := 0 + for ; yyj1380 < yyrr1380; yyj1380++ { + yyh1380.ElemContainerState(yyj1380) if r.TryDecodeAsNil() { - yyv1284[yyj1284] = Ingress{} + yyv1380[yyj1380] = Ingress{} } else { - yyv1285 := &yyv1284[yyj1284] - yyv1285.CodecDecodeSelf(d) + yyv1381 := &yyv1380[yyj1380] + yyv1381.CodecDecodeSelf(d) } } - if yyrt1284 { - for ; yyj1284 < yyl1284; yyj1284++ { - yyv1284 = append(yyv1284, Ingress{}) - yyh1284.ElemContainerState(yyj1284) + if yyrt1380 { + for ; yyj1380 < yyl1380; yyj1380++ { + yyv1380 = append(yyv1380, Ingress{}) + yyh1380.ElemContainerState(yyj1380) if r.TryDecodeAsNil() { - yyv1284[yyj1284] = Ingress{} + yyv1380[yyj1380] = Ingress{} } else { - yyv1286 := &yyv1284[yyj1284] - yyv1286.CodecDecodeSelf(d) + yyv1382 := &yyv1380[yyj1380] + yyv1382.CodecDecodeSelf(d) } } } } else { - yyj1284 := 0 - for ; !r.CheckBreak(); yyj1284++ { + yyj1380 := 0 + for ; !r.CheckBreak(); yyj1380++ { - if yyj1284 >= len(yyv1284) { - yyv1284 = append(yyv1284, Ingress{}) // var yyz1284 Ingress - yyc1284 = true + if yyj1380 >= len(yyv1380) { + yyv1380 = append(yyv1380, Ingress{}) // var yyz1380 Ingress + yyc1380 = true } - yyh1284.ElemContainerState(yyj1284) - if yyj1284 < len(yyv1284) { + yyh1380.ElemContainerState(yyj1380) + if yyj1380 < len(yyv1380) { if r.TryDecodeAsNil() { - yyv1284[yyj1284] = Ingress{} + yyv1380[yyj1380] = Ingress{} } else { - yyv1287 := &yyv1284[yyj1284] - yyv1287.CodecDecodeSelf(d) + yyv1383 := &yyv1380[yyj1380] + yyv1383.CodecDecodeSelf(d) } } else { @@ -15804,17 +16975,17 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { } } - if yyj1284 < len(yyv1284) { - yyv1284 = yyv1284[:yyj1284] - yyc1284 = true - } else if yyj1284 == 0 && yyv1284 == nil { - yyv1284 = []Ingress{} - yyc1284 = true + if yyj1380 < len(yyv1380) { + yyv1380 = yyv1380[:yyj1380] + yyc1380 = true + } else if yyj1380 == 0 && yyv1380 == nil { + yyv1380 = []Ingress{} + yyc1380 = true } } - yyh1284.End() - if yyc1284 { - *v = yyv1284 + yyh1380.End() + if yyc1380 { + *v = yyv1380 } } @@ -15823,10 +16994,10 @@ func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1288 := range v { + for _, yyv1384 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1289 := &yyv1288 - yy1289.CodecEncodeSelf(e) + yy1385 := &yyv1384 + yy1385.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15836,83 +17007,83 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1290 := *v - yyh1290, yyl1290 := z.DecSliceHelperStart() - var yyc1290 bool - if yyl1290 == 0 { - if yyv1290 == nil { - yyv1290 = []IngressRule{} - yyc1290 = true - } else if len(yyv1290) != 0 { - yyv1290 = yyv1290[:0] - yyc1290 = true + yyv1386 := *v + yyh1386, yyl1386 := z.DecSliceHelperStart() + var yyc1386 bool + if yyl1386 == 0 { + if yyv1386 == nil { + yyv1386 = []IngressRule{} + yyc1386 = true + } else if len(yyv1386) != 0 { + yyv1386 = yyv1386[:0] + yyc1386 = true } - } else if yyl1290 > 0 { - var yyrr1290, yyrl1290 int - var yyrt1290 bool - if yyl1290 > cap(yyv1290) { + } else if yyl1386 > 0 { + var yyrr1386, yyrl1386 int + var yyrt1386 bool + if yyl1386 > cap(yyv1386) { - yyrg1290 := len(yyv1290) > 0 - yyv21290 := yyv1290 - yyrl1290, yyrt1290 = z.DecInferLen(yyl1290, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1290 { - if yyrl1290 <= cap(yyv1290) { - yyv1290 = yyv1290[:yyrl1290] + yyrg1386 := len(yyv1386) > 0 + yyv21386 := yyv1386 + yyrl1386, yyrt1386 = z.DecInferLen(yyl1386, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1386 { + if yyrl1386 <= cap(yyv1386) { + yyv1386 = yyv1386[:yyrl1386] } else { - yyv1290 = make([]IngressRule, yyrl1290) + yyv1386 = make([]IngressRule, yyrl1386) } } else { - yyv1290 = make([]IngressRule, yyrl1290) + yyv1386 = make([]IngressRule, yyrl1386) } - yyc1290 = true - yyrr1290 = len(yyv1290) - if yyrg1290 { - copy(yyv1290, yyv21290) + yyc1386 = true + yyrr1386 = len(yyv1386) + if yyrg1386 { + copy(yyv1386, yyv21386) } - } else if yyl1290 != len(yyv1290) { - yyv1290 = yyv1290[:yyl1290] - yyc1290 = true + } else if yyl1386 != len(yyv1386) { + yyv1386 = yyv1386[:yyl1386] + yyc1386 = true } - yyj1290 := 0 - for ; yyj1290 < yyrr1290; yyj1290++ { - yyh1290.ElemContainerState(yyj1290) + yyj1386 := 0 + for ; yyj1386 < yyrr1386; yyj1386++ { + yyh1386.ElemContainerState(yyj1386) if r.TryDecodeAsNil() { - yyv1290[yyj1290] = IngressRule{} + yyv1386[yyj1386] = IngressRule{} } else { - yyv1291 := &yyv1290[yyj1290] - yyv1291.CodecDecodeSelf(d) + yyv1387 := &yyv1386[yyj1386] + yyv1387.CodecDecodeSelf(d) } } - if yyrt1290 { - for ; yyj1290 < yyl1290; yyj1290++ { - yyv1290 = append(yyv1290, IngressRule{}) - yyh1290.ElemContainerState(yyj1290) + if yyrt1386 { + for ; yyj1386 < yyl1386; yyj1386++ { + yyv1386 = append(yyv1386, IngressRule{}) + yyh1386.ElemContainerState(yyj1386) if r.TryDecodeAsNil() { - yyv1290[yyj1290] = IngressRule{} + yyv1386[yyj1386] = IngressRule{} } else { - yyv1292 := &yyv1290[yyj1290] - yyv1292.CodecDecodeSelf(d) + yyv1388 := &yyv1386[yyj1386] + yyv1388.CodecDecodeSelf(d) } } } } else { - yyj1290 := 0 - for ; !r.CheckBreak(); yyj1290++ { + yyj1386 := 0 + for ; !r.CheckBreak(); yyj1386++ { - if yyj1290 >= len(yyv1290) { - yyv1290 = append(yyv1290, IngressRule{}) // var yyz1290 IngressRule - yyc1290 = true + if yyj1386 >= len(yyv1386) { + yyv1386 = append(yyv1386, IngressRule{}) // var yyz1386 IngressRule + yyc1386 = true } - yyh1290.ElemContainerState(yyj1290) - if yyj1290 < len(yyv1290) { + yyh1386.ElemContainerState(yyj1386) + if yyj1386 < len(yyv1386) { if r.TryDecodeAsNil() { - yyv1290[yyj1290] = IngressRule{} + yyv1386[yyj1386] = IngressRule{} } else { - yyv1293 := &yyv1290[yyj1290] - yyv1293.CodecDecodeSelf(d) + yyv1389 := &yyv1386[yyj1386] + yyv1389.CodecDecodeSelf(d) } } else { @@ -15920,17 +17091,17 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco } } - if yyj1290 < len(yyv1290) { - yyv1290 = yyv1290[:yyj1290] - yyc1290 = true - } else if yyj1290 == 0 && yyv1290 == nil { - yyv1290 = []IngressRule{} - yyc1290 = true + if yyj1386 < len(yyv1386) { + yyv1386 = yyv1386[:yyj1386] + yyc1386 = true + } else if yyj1386 == 0 && yyv1386 == nil { + yyv1386 = []IngressRule{} + yyc1386 = true } } - yyh1290.End() - if yyc1290 { - *v = yyv1290 + yyh1386.End() + if yyc1386 { + *v = yyv1386 } } @@ -15939,10 +17110,10 @@ func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1294 := range v { + for _, yyv1390 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1295 := &yyv1294 - yy1295.CodecEncodeSelf(e) + yy1391 := &yyv1390 + yy1391.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15952,83 +17123,83 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1296 := *v - yyh1296, yyl1296 := z.DecSliceHelperStart() - var yyc1296 bool - if yyl1296 == 0 { - if yyv1296 == nil { - yyv1296 = []HTTPIngressPath{} - yyc1296 = true - } else if len(yyv1296) != 0 { - yyv1296 = yyv1296[:0] - yyc1296 = true + yyv1392 := *v + yyh1392, yyl1392 := z.DecSliceHelperStart() + var yyc1392 bool + if yyl1392 == 0 { + if yyv1392 == nil { + yyv1392 = []HTTPIngressPath{} + yyc1392 = true + } else if len(yyv1392) != 0 { + yyv1392 = yyv1392[:0] + yyc1392 = true } - } else if yyl1296 > 0 { - var yyrr1296, yyrl1296 int - var yyrt1296 bool - if yyl1296 > cap(yyv1296) { + } else if yyl1392 > 0 { + var yyrr1392, yyrl1392 int + var yyrt1392 bool + if yyl1392 > cap(yyv1392) { - yyrg1296 := len(yyv1296) > 0 - yyv21296 := yyv1296 - yyrl1296, yyrt1296 = z.DecInferLen(yyl1296, z.DecBasicHandle().MaxInitLen, 64) - if yyrt1296 { - if yyrl1296 <= cap(yyv1296) { - yyv1296 = yyv1296[:yyrl1296] + yyrg1392 := len(yyv1392) > 0 + yyv21392 := yyv1392 + yyrl1392, yyrt1392 = z.DecInferLen(yyl1392, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1392 { + if yyrl1392 <= cap(yyv1392) { + yyv1392 = yyv1392[:yyrl1392] } else { - yyv1296 = make([]HTTPIngressPath, yyrl1296) + yyv1392 = make([]HTTPIngressPath, yyrl1392) } } else { - yyv1296 = make([]HTTPIngressPath, yyrl1296) + yyv1392 = make([]HTTPIngressPath, yyrl1392) } - yyc1296 = true - yyrr1296 = len(yyv1296) - if yyrg1296 { - copy(yyv1296, yyv21296) + yyc1392 = true + yyrr1392 = len(yyv1392) + if yyrg1392 { + copy(yyv1392, yyv21392) } - } else if yyl1296 != len(yyv1296) { - yyv1296 = yyv1296[:yyl1296] - yyc1296 = true + } else if yyl1392 != len(yyv1392) { + yyv1392 = yyv1392[:yyl1392] + yyc1392 = true } - yyj1296 := 0 - for ; yyj1296 < yyrr1296; yyj1296++ { - yyh1296.ElemContainerState(yyj1296) + yyj1392 := 0 + for ; yyj1392 < yyrr1392; yyj1392++ { + yyh1392.ElemContainerState(yyj1392) if r.TryDecodeAsNil() { - yyv1296[yyj1296] = HTTPIngressPath{} + yyv1392[yyj1392] = HTTPIngressPath{} } else { - yyv1297 := &yyv1296[yyj1296] - yyv1297.CodecDecodeSelf(d) + yyv1393 := &yyv1392[yyj1392] + yyv1393.CodecDecodeSelf(d) } } - if yyrt1296 { - for ; yyj1296 < yyl1296; yyj1296++ { - yyv1296 = append(yyv1296, HTTPIngressPath{}) - yyh1296.ElemContainerState(yyj1296) + if yyrt1392 { + for ; yyj1392 < yyl1392; yyj1392++ { + yyv1392 = append(yyv1392, HTTPIngressPath{}) + yyh1392.ElemContainerState(yyj1392) if r.TryDecodeAsNil() { - yyv1296[yyj1296] = HTTPIngressPath{} + yyv1392[yyj1392] = HTTPIngressPath{} } else { - yyv1298 := &yyv1296[yyj1296] - yyv1298.CodecDecodeSelf(d) + yyv1394 := &yyv1392[yyj1392] + yyv1394.CodecDecodeSelf(d) } } } } else { - yyj1296 := 0 - for ; !r.CheckBreak(); yyj1296++ { + yyj1392 := 0 + for ; !r.CheckBreak(); yyj1392++ { - if yyj1296 >= len(yyv1296) { - yyv1296 = append(yyv1296, HTTPIngressPath{}) // var yyz1296 HTTPIngressPath - yyc1296 = true + if yyj1392 >= len(yyv1392) { + yyv1392 = append(yyv1392, HTTPIngressPath{}) // var yyz1392 HTTPIngressPath + yyc1392 = true } - yyh1296.ElemContainerState(yyj1296) - if yyj1296 < len(yyv1296) { + yyh1392.ElemContainerState(yyj1392) + if yyj1392 < len(yyv1392) { if r.TryDecodeAsNil() { - yyv1296[yyj1296] = HTTPIngressPath{} + yyv1392[yyj1392] = HTTPIngressPath{} } else { - yyv1299 := &yyv1296[yyj1296] - yyv1299.CodecDecodeSelf(d) + yyv1395 := &yyv1392[yyj1392] + yyv1395.CodecDecodeSelf(d) } } else { @@ -16036,17 +17207,17 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 } } - if yyj1296 < len(yyv1296) { - yyv1296 = yyv1296[:yyj1296] - yyc1296 = true - } else if yyj1296 == 0 && yyv1296 == nil { - yyv1296 = []HTTPIngressPath{} - yyc1296 = true + if yyj1392 < len(yyv1392) { + yyv1392 = yyv1392[:yyj1392] + yyc1392 = true + } else if yyj1392 == 0 && yyv1392 == nil { + yyv1392 = []HTTPIngressPath{} + yyc1392 = true } } - yyh1296.End() - if yyc1296 { - *v = yyv1296 + yyh1392.End() + if yyc1392 { + *v = yyv1392 } } @@ -16055,10 +17226,10 @@ func (x codecSelfer1234) encSliceNodeUtilization(v []NodeUtilization, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1300 := range v { + for _, yyv1396 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1301 := &yyv1300 - yy1301.CodecEncodeSelf(e) + yy1397 := &yyv1396 + yy1397.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16068,83 +17239,83 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1302 := *v - yyh1302, yyl1302 := z.DecSliceHelperStart() - var yyc1302 bool - if yyl1302 == 0 { - if yyv1302 == nil { - yyv1302 = []NodeUtilization{} - yyc1302 = true - } else if len(yyv1302) != 0 { - yyv1302 = yyv1302[:0] - yyc1302 = true + yyv1398 := *v + yyh1398, yyl1398 := z.DecSliceHelperStart() + var yyc1398 bool + if yyl1398 == 0 { + if yyv1398 == nil { + yyv1398 = []NodeUtilization{} + yyc1398 = true + } else if len(yyv1398) != 0 { + yyv1398 = yyv1398[:0] + yyc1398 = true } - } else if yyl1302 > 0 { - var yyrr1302, yyrl1302 int - var yyrt1302 bool - if yyl1302 > cap(yyv1302) { + } else if yyl1398 > 0 { + var yyrr1398, yyrl1398 int + var yyrt1398 bool + if yyl1398 > cap(yyv1398) { - yyrg1302 := len(yyv1302) > 0 - yyv21302 := yyv1302 - yyrl1302, yyrt1302 = z.DecInferLen(yyl1302, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1302 { - if yyrl1302 <= cap(yyv1302) { - yyv1302 = yyv1302[:yyrl1302] + yyrg1398 := len(yyv1398) > 0 + yyv21398 := yyv1398 + yyrl1398, yyrt1398 = z.DecInferLen(yyl1398, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1398 { + if yyrl1398 <= cap(yyv1398) { + yyv1398 = yyv1398[:yyrl1398] } else { - yyv1302 = make([]NodeUtilization, yyrl1302) + yyv1398 = make([]NodeUtilization, yyrl1398) } } else { - yyv1302 = make([]NodeUtilization, yyrl1302) + yyv1398 = make([]NodeUtilization, yyrl1398) } - yyc1302 = true - yyrr1302 = len(yyv1302) - if yyrg1302 { - copy(yyv1302, yyv21302) + yyc1398 = true + yyrr1398 = len(yyv1398) + if yyrg1398 { + copy(yyv1398, yyv21398) } - } else if yyl1302 != len(yyv1302) { - yyv1302 = yyv1302[:yyl1302] - yyc1302 = true + } else if yyl1398 != len(yyv1398) { + yyv1398 = yyv1398[:yyl1398] + yyc1398 = true } - yyj1302 := 0 - for ; yyj1302 < yyrr1302; yyj1302++ { - yyh1302.ElemContainerState(yyj1302) + yyj1398 := 0 + for ; yyj1398 < yyrr1398; yyj1398++ { + yyh1398.ElemContainerState(yyj1398) if r.TryDecodeAsNil() { - yyv1302[yyj1302] = NodeUtilization{} + yyv1398[yyj1398] = NodeUtilization{} } else { - yyv1303 := &yyv1302[yyj1302] - yyv1303.CodecDecodeSelf(d) + yyv1399 := &yyv1398[yyj1398] + yyv1399.CodecDecodeSelf(d) } } - if yyrt1302 { - for ; yyj1302 < yyl1302; yyj1302++ { - yyv1302 = append(yyv1302, NodeUtilization{}) - yyh1302.ElemContainerState(yyj1302) + if yyrt1398 { + for ; yyj1398 < yyl1398; yyj1398++ { + yyv1398 = append(yyv1398, NodeUtilization{}) + yyh1398.ElemContainerState(yyj1398) if r.TryDecodeAsNil() { - yyv1302[yyj1302] = NodeUtilization{} + yyv1398[yyj1398] = NodeUtilization{} } else { - yyv1304 := &yyv1302[yyj1302] - yyv1304.CodecDecodeSelf(d) + yyv1400 := &yyv1398[yyj1398] + yyv1400.CodecDecodeSelf(d) } } } } else { - yyj1302 := 0 - for ; !r.CheckBreak(); yyj1302++ { + yyj1398 := 0 + for ; !r.CheckBreak(); yyj1398++ { - if yyj1302 >= len(yyv1302) { - yyv1302 = append(yyv1302, NodeUtilization{}) // var yyz1302 NodeUtilization - yyc1302 = true + if yyj1398 >= len(yyv1398) { + yyv1398 = append(yyv1398, NodeUtilization{}) // var yyz1398 NodeUtilization + yyc1398 = true } - yyh1302.ElemContainerState(yyj1302) - if yyj1302 < len(yyv1302) { + yyh1398.ElemContainerState(yyj1398) + if yyj1398 < len(yyv1398) { if r.TryDecodeAsNil() { - yyv1302[yyj1302] = NodeUtilization{} + yyv1398[yyj1398] = NodeUtilization{} } else { - yyv1305 := &yyv1302[yyj1302] - yyv1305.CodecDecodeSelf(d) + yyv1401 := &yyv1398[yyj1398] + yyv1401.CodecDecodeSelf(d) } } else { @@ -16152,17 +17323,17 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 } } - if yyj1302 < len(yyv1302) { - yyv1302 = yyv1302[:yyj1302] - yyc1302 = true - } else if yyj1302 == 0 && yyv1302 == nil { - yyv1302 = []NodeUtilization{} - yyc1302 = true + if yyj1398 < len(yyv1398) { + yyv1398 = yyv1398[:yyj1398] + yyc1398 = true + } else if yyj1398 == 0 && yyv1398 == nil { + yyv1398 = []NodeUtilization{} + yyc1398 = true } } - yyh1302.End() - if yyc1302 { - *v = yyv1302 + yyh1398.End() + if yyc1398 { + *v = yyv1398 } } @@ -16171,10 +17342,10 @@ func (x codecSelfer1234) encSliceClusterAutoscaler(v []ClusterAutoscaler, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1306 := range v { + for _, yyv1402 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1307 := &yyv1306 - yy1307.CodecEncodeSelf(e) + yy1403 := &yyv1402 + yy1403.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16184,83 +17355,83 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1308 := *v - yyh1308, yyl1308 := z.DecSliceHelperStart() - var yyc1308 bool - if yyl1308 == 0 { - if yyv1308 == nil { - yyv1308 = []ClusterAutoscaler{} - yyc1308 = true - } else if len(yyv1308) != 0 { - yyv1308 = yyv1308[:0] - yyc1308 = true + yyv1404 := *v + yyh1404, yyl1404 := z.DecSliceHelperStart() + var yyc1404 bool + if yyl1404 == 0 { + if yyv1404 == nil { + yyv1404 = []ClusterAutoscaler{} + yyc1404 = true + } else if len(yyv1404) != 0 { + yyv1404 = yyv1404[:0] + yyc1404 = true } - } else if yyl1308 > 0 { - var yyrr1308, yyrl1308 int - var yyrt1308 bool - if yyl1308 > cap(yyv1308) { + } else if yyl1404 > 0 { + var yyrr1404, yyrl1404 int + var yyrt1404 bool + if yyl1404 > cap(yyv1404) { - yyrg1308 := len(yyv1308) > 0 - yyv21308 := yyv1308 - yyrl1308, yyrt1308 = z.DecInferLen(yyl1308, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1308 { - if yyrl1308 <= cap(yyv1308) { - yyv1308 = yyv1308[:yyrl1308] + yyrg1404 := len(yyv1404) > 0 + yyv21404 := yyv1404 + yyrl1404, yyrt1404 = z.DecInferLen(yyl1404, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1404 { + if yyrl1404 <= cap(yyv1404) { + yyv1404 = yyv1404[:yyrl1404] } else { - yyv1308 = make([]ClusterAutoscaler, yyrl1308) + yyv1404 = make([]ClusterAutoscaler, yyrl1404) } } else { - yyv1308 = make([]ClusterAutoscaler, yyrl1308) + yyv1404 = make([]ClusterAutoscaler, yyrl1404) } - yyc1308 = true - yyrr1308 = len(yyv1308) - if yyrg1308 { - copy(yyv1308, yyv21308) + yyc1404 = true + yyrr1404 = len(yyv1404) + if yyrg1404 { + copy(yyv1404, yyv21404) } - } else if yyl1308 != len(yyv1308) { - yyv1308 = yyv1308[:yyl1308] - yyc1308 = true + } else if yyl1404 != len(yyv1404) { + yyv1404 = yyv1404[:yyl1404] + yyc1404 = true } - yyj1308 := 0 - for ; yyj1308 < yyrr1308; yyj1308++ { - yyh1308.ElemContainerState(yyj1308) + yyj1404 := 0 + for ; yyj1404 < yyrr1404; yyj1404++ { + yyh1404.ElemContainerState(yyj1404) if r.TryDecodeAsNil() { - yyv1308[yyj1308] = ClusterAutoscaler{} + yyv1404[yyj1404] = ClusterAutoscaler{} } else { - yyv1309 := &yyv1308[yyj1308] - yyv1309.CodecDecodeSelf(d) + yyv1405 := &yyv1404[yyj1404] + yyv1405.CodecDecodeSelf(d) } } - if yyrt1308 { - for ; yyj1308 < yyl1308; yyj1308++ { - yyv1308 = append(yyv1308, ClusterAutoscaler{}) - yyh1308.ElemContainerState(yyj1308) + if yyrt1404 { + for ; yyj1404 < yyl1404; yyj1404++ { + yyv1404 = append(yyv1404, ClusterAutoscaler{}) + yyh1404.ElemContainerState(yyj1404) if r.TryDecodeAsNil() { - yyv1308[yyj1308] = ClusterAutoscaler{} + yyv1404[yyj1404] = ClusterAutoscaler{} } else { - yyv1310 := &yyv1308[yyj1308] - yyv1310.CodecDecodeSelf(d) + yyv1406 := &yyv1404[yyj1404] + yyv1406.CodecDecodeSelf(d) } } } } else { - yyj1308 := 0 - for ; !r.CheckBreak(); yyj1308++ { + yyj1404 := 0 + for ; !r.CheckBreak(); yyj1404++ { - if yyj1308 >= len(yyv1308) { - yyv1308 = append(yyv1308, ClusterAutoscaler{}) // var yyz1308 ClusterAutoscaler - yyc1308 = true + if yyj1404 >= len(yyv1404) { + yyv1404 = append(yyv1404, ClusterAutoscaler{}) // var yyz1404 ClusterAutoscaler + yyc1404 = true } - yyh1308.ElemContainerState(yyj1308) - if yyj1308 < len(yyv1308) { + yyh1404.ElemContainerState(yyj1404) + if yyj1404 < len(yyv1404) { if r.TryDecodeAsNil() { - yyv1308[yyj1308] = ClusterAutoscaler{} + yyv1404[yyj1404] = ClusterAutoscaler{} } else { - yyv1311 := &yyv1308[yyj1308] - yyv1311.CodecDecodeSelf(d) + yyv1407 := &yyv1404[yyj1404] + yyv1407.CodecDecodeSelf(d) } } else { @@ -16268,17 +17439,17 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co } } - if yyj1308 < len(yyv1308) { - yyv1308 = yyv1308[:yyj1308] - yyc1308 = true - } else if yyj1308 == 0 && yyv1308 == nil { - yyv1308 = []ClusterAutoscaler{} - yyc1308 = true + if yyj1404 < len(yyv1404) { + yyv1404 = yyv1404[:yyj1404] + yyc1404 = true + } else if yyj1404 == 0 && yyv1404 == nil { + yyv1404 = []ClusterAutoscaler{} + yyc1404 = true } } - yyh1308.End() - if yyc1308 { - *v = yyv1308 + yyh1404.End() + if yyc1404 { + *v = yyv1404 } } @@ -16287,10 +17458,10 @@ func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequi z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1312 := range v { + for _, yyv1408 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1313 := &yyv1312 - yy1313.CodecEncodeSelf(e) + yy1409 := &yyv1408 + yy1409.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16300,83 +17471,83 @@ func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequ z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1314 := *v - yyh1314, yyl1314 := z.DecSliceHelperStart() - var yyc1314 bool - if yyl1314 == 0 { - if yyv1314 == nil { - yyv1314 = []LabelSelectorRequirement{} - yyc1314 = true - } else if len(yyv1314) != 0 { - yyv1314 = yyv1314[:0] - yyc1314 = true + yyv1410 := *v + yyh1410, yyl1410 := z.DecSliceHelperStart() + var yyc1410 bool + if yyl1410 == 0 { + if yyv1410 == nil { + yyv1410 = []LabelSelectorRequirement{} + yyc1410 = true + } else if len(yyv1410) != 0 { + yyv1410 = yyv1410[:0] + yyc1410 = true } - } else if yyl1314 > 0 { - var yyrr1314, yyrl1314 int - var yyrt1314 bool - if yyl1314 > cap(yyv1314) { + } else if yyl1410 > 0 { + var yyrr1410, yyrl1410 int + var yyrt1410 bool + if yyl1410 > cap(yyv1410) { - yyrg1314 := len(yyv1314) > 0 - yyv21314 := yyv1314 - yyrl1314, yyrt1314 = z.DecInferLen(yyl1314, z.DecBasicHandle().MaxInitLen, 56) - if yyrt1314 { - if yyrl1314 <= cap(yyv1314) { - yyv1314 = yyv1314[:yyrl1314] + yyrg1410 := len(yyv1410) > 0 + yyv21410 := yyv1410 + yyrl1410, yyrt1410 = z.DecInferLen(yyl1410, z.DecBasicHandle().MaxInitLen, 56) + if yyrt1410 { + if yyrl1410 <= cap(yyv1410) { + yyv1410 = yyv1410[:yyrl1410] } else { - yyv1314 = make([]LabelSelectorRequirement, yyrl1314) + yyv1410 = make([]LabelSelectorRequirement, yyrl1410) } } else { - yyv1314 = make([]LabelSelectorRequirement, yyrl1314) + yyv1410 = make([]LabelSelectorRequirement, yyrl1410) } - yyc1314 = true - yyrr1314 = len(yyv1314) - if yyrg1314 { - copy(yyv1314, yyv21314) + yyc1410 = true + yyrr1410 = len(yyv1410) + if yyrg1410 { + copy(yyv1410, yyv21410) } - } else if yyl1314 != len(yyv1314) { - yyv1314 = yyv1314[:yyl1314] - yyc1314 = true + } else if yyl1410 != len(yyv1410) { + yyv1410 = yyv1410[:yyl1410] + yyc1410 = true } - yyj1314 := 0 - for ; yyj1314 < yyrr1314; yyj1314++ { - yyh1314.ElemContainerState(yyj1314) + yyj1410 := 0 + for ; yyj1410 < yyrr1410; yyj1410++ { + yyh1410.ElemContainerState(yyj1410) if r.TryDecodeAsNil() { - yyv1314[yyj1314] = LabelSelectorRequirement{} + yyv1410[yyj1410] = LabelSelectorRequirement{} } else { - yyv1315 := &yyv1314[yyj1314] - yyv1315.CodecDecodeSelf(d) + yyv1411 := &yyv1410[yyj1410] + yyv1411.CodecDecodeSelf(d) } } - if yyrt1314 { - for ; yyj1314 < yyl1314; yyj1314++ { - yyv1314 = append(yyv1314, LabelSelectorRequirement{}) - yyh1314.ElemContainerState(yyj1314) + if yyrt1410 { + for ; yyj1410 < yyl1410; yyj1410++ { + yyv1410 = append(yyv1410, LabelSelectorRequirement{}) + yyh1410.ElemContainerState(yyj1410) if r.TryDecodeAsNil() { - yyv1314[yyj1314] = LabelSelectorRequirement{} + yyv1410[yyj1410] = LabelSelectorRequirement{} } else { - yyv1316 := &yyv1314[yyj1314] - yyv1316.CodecDecodeSelf(d) + yyv1412 := &yyv1410[yyj1410] + yyv1412.CodecDecodeSelf(d) } } } } else { - yyj1314 := 0 - for ; !r.CheckBreak(); yyj1314++ { + yyj1410 := 0 + for ; !r.CheckBreak(); yyj1410++ { - if yyj1314 >= len(yyv1314) { - yyv1314 = append(yyv1314, LabelSelectorRequirement{}) // var yyz1314 LabelSelectorRequirement - yyc1314 = true + if yyj1410 >= len(yyv1410) { + yyv1410 = append(yyv1410, LabelSelectorRequirement{}) // var yyz1410 LabelSelectorRequirement + yyc1410 = true } - yyh1314.ElemContainerState(yyj1314) - if yyj1314 < len(yyv1314) { + yyh1410.ElemContainerState(yyj1410) + if yyj1410 < len(yyv1410) { if r.TryDecodeAsNil() { - yyv1314[yyj1314] = LabelSelectorRequirement{} + yyv1410[yyj1410] = LabelSelectorRequirement{} } else { - yyv1317 := &yyv1314[yyj1314] - yyv1317.CodecDecodeSelf(d) + yyv1413 := &yyv1410[yyj1410] + yyv1413.CodecDecodeSelf(d) } } else { @@ -16384,17 +17555,17 @@ func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequ } } - if yyj1314 < len(yyv1314) { - yyv1314 = yyv1314[:yyj1314] - yyc1314 = true - } else if yyj1314 == 0 && yyv1314 == nil { - yyv1314 = []LabelSelectorRequirement{} - yyc1314 = true + if yyj1410 < len(yyv1410) { + yyv1410 = yyv1410[:yyj1410] + yyc1410 = true + } else if yyj1410 == 0 && yyv1410 == nil { + yyv1410 = []LabelSelectorRequirement{} + yyc1410 = true } } - yyh1314.End() - if yyc1314 { - *v = yyv1314 + yyh1410.End() + if yyc1410 { + *v = yyv1410 } } @@ -16403,10 +17574,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1318 := range v { + for _, yyv1414 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1319 := &yyv1318 - yy1319.CodecEncodeSelf(e) + yy1415 := &yyv1414 + yy1415.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16416,83 +17587,83 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1320 := *v - yyh1320, yyl1320 := z.DecSliceHelperStart() - var yyc1320 bool - if yyl1320 == 0 { - if yyv1320 == nil { - yyv1320 = []ConfigMap{} - yyc1320 = true - } else if len(yyv1320) != 0 { - yyv1320 = yyv1320[:0] - yyc1320 = true + yyv1416 := *v + yyh1416, yyl1416 := z.DecSliceHelperStart() + var yyc1416 bool + if yyl1416 == 0 { + if yyv1416 == nil { + yyv1416 = []ConfigMap{} + yyc1416 = true + } else if len(yyv1416) != 0 { + yyv1416 = yyv1416[:0] + yyc1416 = true } - } else if yyl1320 > 0 { - var yyrr1320, yyrl1320 int - var yyrt1320 bool - if yyl1320 > cap(yyv1320) { + } else if yyl1416 > 0 { + var yyrr1416, yyrl1416 int + var yyrt1416 bool + if yyl1416 > cap(yyv1416) { - yyrg1320 := len(yyv1320) > 0 - yyv21320 := yyv1320 - yyrl1320, yyrt1320 = z.DecInferLen(yyl1320, z.DecBasicHandle().MaxInitLen, 200) - if yyrt1320 { - if yyrl1320 <= cap(yyv1320) { - yyv1320 = yyv1320[:yyrl1320] + yyrg1416 := len(yyv1416) > 0 + yyv21416 := yyv1416 + yyrl1416, yyrt1416 = z.DecInferLen(yyl1416, z.DecBasicHandle().MaxInitLen, 200) + if yyrt1416 { + if yyrl1416 <= cap(yyv1416) { + yyv1416 = yyv1416[:yyrl1416] } else { - yyv1320 = make([]ConfigMap, yyrl1320) + yyv1416 = make([]ConfigMap, yyrl1416) } } else { - yyv1320 = make([]ConfigMap, yyrl1320) + yyv1416 = make([]ConfigMap, yyrl1416) } - yyc1320 = true - yyrr1320 = len(yyv1320) - if yyrg1320 { - copy(yyv1320, yyv21320) + yyc1416 = true + yyrr1416 = len(yyv1416) + if yyrg1416 { + copy(yyv1416, yyv21416) } - } else if yyl1320 != len(yyv1320) { - yyv1320 = yyv1320[:yyl1320] - yyc1320 = true + } else if yyl1416 != len(yyv1416) { + yyv1416 = yyv1416[:yyl1416] + yyc1416 = true } - yyj1320 := 0 - for ; yyj1320 < yyrr1320; yyj1320++ { - yyh1320.ElemContainerState(yyj1320) + yyj1416 := 0 + for ; yyj1416 < yyrr1416; yyj1416++ { + yyh1416.ElemContainerState(yyj1416) if r.TryDecodeAsNil() { - yyv1320[yyj1320] = ConfigMap{} + yyv1416[yyj1416] = ConfigMap{} } else { - yyv1321 := &yyv1320[yyj1320] - yyv1321.CodecDecodeSelf(d) + yyv1417 := &yyv1416[yyj1416] + yyv1417.CodecDecodeSelf(d) } } - if yyrt1320 { - for ; yyj1320 < yyl1320; yyj1320++ { - yyv1320 = append(yyv1320, ConfigMap{}) - yyh1320.ElemContainerState(yyj1320) + if yyrt1416 { + for ; yyj1416 < yyl1416; yyj1416++ { + yyv1416 = append(yyv1416, ConfigMap{}) + yyh1416.ElemContainerState(yyj1416) if r.TryDecodeAsNil() { - yyv1320[yyj1320] = ConfigMap{} + yyv1416[yyj1416] = ConfigMap{} } else { - yyv1322 := &yyv1320[yyj1320] - yyv1322.CodecDecodeSelf(d) + yyv1418 := &yyv1416[yyj1416] + yyv1418.CodecDecodeSelf(d) } } } } else { - yyj1320 := 0 - for ; !r.CheckBreak(); yyj1320++ { + yyj1416 := 0 + for ; !r.CheckBreak(); yyj1416++ { - if yyj1320 >= len(yyv1320) { - yyv1320 = append(yyv1320, ConfigMap{}) // var yyz1320 ConfigMap - yyc1320 = true + if yyj1416 >= len(yyv1416) { + yyv1416 = append(yyv1416, ConfigMap{}) // var yyz1416 ConfigMap + yyc1416 = true } - yyh1320.ElemContainerState(yyj1320) - if yyj1320 < len(yyv1320) { + yyh1416.ElemContainerState(yyj1416) + if yyj1416 < len(yyv1416) { if r.TryDecodeAsNil() { - yyv1320[yyj1320] = ConfigMap{} + yyv1416[yyj1416] = ConfigMap{} } else { - yyv1323 := &yyv1320[yyj1320] - yyv1323.CodecDecodeSelf(d) + yyv1419 := &yyv1416[yyj1416] + yyv1419.CodecDecodeSelf(d) } } else { @@ -16500,16 +17671,132 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj1320 < len(yyv1320) { - yyv1320 = yyv1320[:yyj1320] - yyc1320 = true - } else if yyj1320 == 0 && yyv1320 == nil { - yyv1320 = []ConfigMap{} - yyc1320 = true + if yyj1416 < len(yyv1416) { + yyv1416 = yyv1416[:yyj1416] + yyc1416 = true + } else if yyj1416 == 0 && yyv1416 == nil { + yyv1416 = []ConfigMap{} + yyc1416 = true } } - yyh1320.End() - if yyc1320 { - *v = yyv1320 + yyh1416.End() + if yyc1416 { + *v = yyv1416 + } +} + +func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1420 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1421 := &yyv1420 + yy1421.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1422 := *v + yyh1422, yyl1422 := z.DecSliceHelperStart() + var yyc1422 bool + if yyl1422 == 0 { + if yyv1422 == nil { + yyv1422 = []ReplicaSet{} + yyc1422 = true + } else if len(yyv1422) != 0 { + yyv1422 = yyv1422[:0] + yyc1422 = true + } + } else if yyl1422 > 0 { + var yyrr1422, yyrl1422 int + var yyrt1422 bool + if yyl1422 > cap(yyv1422) { + + yyrg1422 := len(yyv1422) > 0 + yyv21422 := yyv1422 + yyrl1422, yyrt1422 = z.DecInferLen(yyl1422, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1422 { + if yyrl1422 <= cap(yyv1422) { + yyv1422 = yyv1422[:yyrl1422] + } else { + yyv1422 = make([]ReplicaSet, yyrl1422) + } + } else { + yyv1422 = make([]ReplicaSet, yyrl1422) + } + yyc1422 = true + yyrr1422 = len(yyv1422) + if yyrg1422 { + copy(yyv1422, yyv21422) + } + } else if yyl1422 != len(yyv1422) { + yyv1422 = yyv1422[:yyl1422] + yyc1422 = true + } + yyj1422 := 0 + for ; yyj1422 < yyrr1422; yyj1422++ { + yyh1422.ElemContainerState(yyj1422) + if r.TryDecodeAsNil() { + yyv1422[yyj1422] = ReplicaSet{} + } else { + yyv1423 := &yyv1422[yyj1422] + yyv1423.CodecDecodeSelf(d) + } + + } + if yyrt1422 { + for ; yyj1422 < yyl1422; yyj1422++ { + yyv1422 = append(yyv1422, ReplicaSet{}) + yyh1422.ElemContainerState(yyj1422) + if r.TryDecodeAsNil() { + yyv1422[yyj1422] = ReplicaSet{} + } else { + yyv1424 := &yyv1422[yyj1422] + yyv1424.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1422 := 0 + for ; !r.CheckBreak(); yyj1422++ { + + if yyj1422 >= len(yyv1422) { + yyv1422 = append(yyv1422, ReplicaSet{}) // var yyz1422 ReplicaSet + yyc1422 = true + } + yyh1422.ElemContainerState(yyj1422) + if yyj1422 < len(yyv1422) { + if r.TryDecodeAsNil() { + yyv1422[yyj1422] = ReplicaSet{} + } else { + yyv1425 := &yyv1422[yyj1422] + yyv1425.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1422 < len(yyv1422) { + yyv1422 = yyv1422[:yyj1422] + yyc1422 = true + } else if yyj1422 == 0 && yyv1422 == nil { + yyv1422 = []ReplicaSet{} + yyc1422 = true + } + } + yyh1422.End() + if yyc1422 { + *v = yyv1422 } } diff --git a/pkg/apis/extensions/types.go b/pkg/apis/extensions/types.go index e0ae4986cf4..e5b735b4835 100644 --- a/pkg/apis/extensions/types.go +++ b/pkg/apis/extensions/types.go @@ -796,3 +796,51 @@ type ConfigMapList struct { // Items is the list of ConfigMaps. Items []ConfigMap `json:"items,omitempty"` } + +// ReplicaSet represents the configuration of a replica set. +type ReplicaSet struct { + unversioned.TypeMeta `json:",inline"` + api.ObjectMeta `json:"metadata,omitempty"` + + // Spec defines the desired behavior of this ReplicaSet. + Spec ReplicaSetSpec `json:"spec,omitempty"` + + // Status is the current status of this ReplicaSet. This data may be + // out of date by some window of time. + Status ReplicaSetStatus `json:"status,omitempty"` +} + +// ReplicaSetList is a collection of ReplicaSets. +type ReplicaSetList struct { + unversioned.TypeMeta `json:",inline"` + unversioned.ListMeta `json:"metadata,omitempty"` + + Items []ReplicaSet `json:"items"` +} + +// ReplicaSetSpec is the specification of a ReplicaSet. +// As the internal representation of a ReplicaSet, it must have +// a Template set. +type ReplicaSetSpec struct { + // Replicas is the number of desired replicas. + Replicas int `json:"replicas"` + + // Selector is a label query over pods that should match the replica count. + // Must match in order to be controlled. + // If empty, defaulted to labels on pod template. + // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + Selector *LabelSelector `json:"selector,omitempty"` + + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. + Template *api.PodTemplateSpec `json:"template,omitempty"` +} + +// ReplicaSetStatus represents the current status of a ReplicaSet. +type ReplicaSetStatus struct { + // Replicas is the number of actual replicas. + Replicas int `json:"replicas"` + + // ObservedGeneration is the most recent generation observed by the controller. + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} diff --git a/pkg/apis/extensions/v1beta1/conversion.go b/pkg/apis/extensions/v1beta1/conversion.go index 2f74270e23f..7bbc6d0da60 100644 --- a/pkg/apis/extensions/v1beta1/conversion.go +++ b/pkg/apis/extensions/v1beta1/conversion.go @@ -44,6 +44,8 @@ func addConversionFuncs(scheme *runtime.Scheme) { Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy, Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet, Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet, + Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec, + Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec, ) if err != nil { // If one of the conversion functions is malformed, detect it immediately. @@ -511,3 +513,54 @@ func Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet out.MinReadySeconds = int(in.MinReadySeconds) return nil } + +func Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.ReplicaSetSpec))(in) + } + out.Replicas = new(int32) + *out.Replicas = int32(in.Replicas) + if in.Selector != nil { + out.Selector = new(LabelSelector) + if err := Convert_extensions_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil { + return err + } + } else { + out.Selector = nil + } + if in.Template != nil { + out.Template = new(v1.PodTemplateSpec) + if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil { + return err + } + } else { + out.Template = nil + } + return nil +} + +func Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*ReplicaSetSpec))(in) + } + if in.Replicas != nil { + out.Replicas = int(*in.Replicas) + } + if in.Selector != nil { + out.Selector = new(extensions.LabelSelector) + if err := Convert_v1beta1_LabelSelector_To_extensions_LabelSelector(in.Selector, out.Selector, s); err != nil { + return err + } + } else { + out.Selector = nil + } + if in.Template != nil { + out.Template = new(api.PodTemplateSpec) + if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil { + return err + } + } else { + out.Template = nil + } + return nil +} diff --git a/pkg/apis/extensions/v1beta1/conversion_generated.go b/pkg/apis/extensions/v1beta1/conversion_generated.go index a59a496e862..539fadab9b3 100644 --- a/pkg/apis/extensions/v1beta1/conversion_generated.go +++ b/pkg/apis/extensions/v1beta1/conversion_generated.go @@ -3304,6 +3304,97 @@ func Convert_extensions_NodeUtilization_To_v1beta1_NodeUtilization(in *extension return autoConvert_extensions_NodeUtilization_To_v1beta1_NodeUtilization(in, out, s) } +func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.ReplicaSet))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { + return autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in, out, s) +} + +func autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.ReplicaSetList))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]ReplicaSet, len(in.Items)) + for i := range in.Items { + if err := Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(&in.Items[i], &out.Items[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error { + return autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in, out, s) +} + +func autoConvert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.ReplicaSetSpec))(in) + } + if err := s.Convert(&in.Replicas, &out.Replicas, 0); err != nil { + return err + } + // unable to generate simple pointer conversion for extensions.LabelSelector -> v1beta1.LabelSelector + if in.Selector != nil { + out.Selector = new(LabelSelector) + if err := Convert_extensions_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil { + return err + } + } else { + out.Selector = nil + } + // unable to generate simple pointer conversion for api.PodTemplateSpec -> v1.PodTemplateSpec + if in.Template != nil { + out.Template = new(v1.PodTemplateSpec) + if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil { + return err + } + } else { + out.Template = nil + } + return nil +} + +func autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensions.ReplicaSetStatus, out *ReplicaSetStatus, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.ReplicaSetStatus))(in) + } + out.Replicas = int32(in.Replicas) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +func Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensions.ReplicaSetStatus, out *ReplicaSetStatus, s conversion.Scope) error { + return autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in, out, s) +} + func autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in *extensions.ReplicationControllerDummy, out *ReplicationControllerDummy, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*extensions.ReplicationControllerDummy))(in) @@ -4397,6 +4488,95 @@ func Convert_v1beta1_NodeUtilization_To_extensions_NodeUtilization(in *NodeUtili return autoConvert_v1beta1_NodeUtilization_To_extensions_NodeUtilization(in, out, s) } +func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*ReplicaSet))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { + return autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in, out, s) +} + +func autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*ReplicaSetList))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]extensions.ReplicaSet, len(in.Items)) + for i := range in.Items { + if err := Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(&in.Items[i], &out.Items[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error { + return autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in, out, s) +} + +func autoConvert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*ReplicaSetSpec))(in) + } + // in.Replicas has no peer in out + // unable to generate simple pointer conversion for v1beta1.LabelSelector -> extensions.LabelSelector + if in.Selector != nil { + out.Selector = new(extensions.LabelSelector) + if err := Convert_v1beta1_LabelSelector_To_extensions_LabelSelector(in.Selector, out.Selector, s); err != nil { + return err + } + } else { + out.Selector = nil + } + // unable to generate simple pointer conversion for v1.PodTemplateSpec -> api.PodTemplateSpec + if in.Template != nil { + out.Template = new(api.PodTemplateSpec) + if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil { + return err + } + } else { + out.Template = nil + } + return nil +} + +func autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*ReplicaSetStatus))(in) + } + out.Replicas = int(in.Replicas) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +func Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in, out, s) +} + func autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in *ReplicationControllerDummy, out *extensions.ReplicationControllerDummy, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*ReplicationControllerDummy))(in) @@ -4687,6 +4867,10 @@ func init() { autoConvert_extensions_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement, autoConvert_extensions_LabelSelector_To_v1beta1_LabelSelector, autoConvert_extensions_NodeUtilization_To_v1beta1_NodeUtilization, + autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList, + autoConvert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec, + autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus, + autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet, autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy, autoConvert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet, autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment, @@ -4780,6 +4964,10 @@ func init() { autoConvert_v1beta1_LabelSelector_To_extensions_LabelSelector, autoConvert_v1beta1_ListOptions_To_api_ListOptions, autoConvert_v1beta1_NodeUtilization_To_extensions_NodeUtilization, + autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList, + autoConvert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec, + autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus, + autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet, autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy, autoConvert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet, autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment, diff --git a/pkg/apis/extensions/v1beta1/deep_copy_generated.go b/pkg/apis/extensions/v1beta1/deep_copy_generated.go index dc92a4700ee..e7853797e08 100644 --- a/pkg/apis/extensions/v1beta1/deep_copy_generated.go +++ b/pkg/apis/extensions/v1beta1/deep_copy_generated.go @@ -1592,6 +1592,74 @@ func deepCopy_v1beta1_NodeUtilization(in NodeUtilization, out *NodeUtilization, return nil } +func deepCopy_v1beta1_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := deepCopy_v1beta1_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil { + return err + } + if err := deepCopy_v1beta1_ReplicaSetStatus(in.Status, &out.Status, c); err != nil { + return err + } + return nil +} + +func deepCopy_v1beta1_ReplicaSetList(in ReplicaSetList, out *ReplicaSetList, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]ReplicaSet, len(in.Items)) + for i := range in.Items { + if err := deepCopy_v1beta1_ReplicaSet(in.Items[i], &out.Items[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func deepCopy_v1beta1_ReplicaSetSpec(in ReplicaSetSpec, out *ReplicaSetSpec, c *conversion.Cloner) error { + if in.Replicas != nil { + out.Replicas = new(int32) + *out.Replicas = *in.Replicas + } else { + out.Replicas = nil + } + if in.Selector != nil { + out.Selector = new(LabelSelector) + if err := deepCopy_v1beta1_LabelSelector(*in.Selector, out.Selector, c); err != nil { + return err + } + } else { + out.Selector = nil + } + if in.Template != nil { + out.Template = new(v1.PodTemplateSpec) + if err := deepCopy_v1_PodTemplateSpec(*in.Template, out.Template, c); err != nil { + return err + } + } else { + out.Template = nil + } + return nil +} + +func deepCopy_v1beta1_ReplicaSetStatus(in ReplicaSetStatus, out *ReplicaSetStatus, c *conversion.Cloner) error { + out.Replicas = in.Replicas + out.ObservedGeneration = in.ObservedGeneration + return nil +} + func deepCopy_v1beta1_ReplicationControllerDummy(in ReplicationControllerDummy, out *ReplicationControllerDummy, c *conversion.Cloner) error { if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err @@ -1851,6 +1919,10 @@ func init() { deepCopy_v1beta1_LabelSelectorRequirement, deepCopy_v1beta1_ListOptions, deepCopy_v1beta1_NodeUtilization, + deepCopy_v1beta1_ReplicaSet, + deepCopy_v1beta1_ReplicaSetList, + deepCopy_v1beta1_ReplicaSetSpec, + deepCopy_v1beta1_ReplicaSetStatus, deepCopy_v1beta1_ReplicationControllerDummy, deepCopy_v1beta1_RollingUpdateDaemonSet, deepCopy_v1beta1_RollingUpdateDeployment, diff --git a/pkg/apis/extensions/v1beta1/defaults.go b/pkg/apis/extensions/v1beta1/defaults.go index 98a4abbfb2f..9e270e7b3b6 100644 --- a/pkg/apis/extensions/v1beta1/defaults.go +++ b/pkg/apis/extensions/v1beta1/defaults.go @@ -142,5 +142,26 @@ func addDefaultingFuncs(scheme *runtime.Scheme) { obj.Data = make(map[string]string) } }, + func(obj *ReplicaSet) { + var labels map[string]string + if obj.Spec.Template != nil { + labels = obj.Spec.Template.Labels + } + // TODO: support templates defined elsewhere when we support them in the API + if labels != nil { + if obj.Spec.Selector == nil { + obj.Spec.Selector = &LabelSelector{ + MatchLabels: labels, + } + } + if len(obj.Labels) == 0 { + obj.Labels = labels + } + } + if obj.Spec.Replicas == nil { + obj.Spec.Replicas = new(int32) + *obj.Spec.Replicas = 1 + } + }, ) } diff --git a/pkg/apis/extensions/v1beta1/defaults_test.go b/pkg/apis/extensions/v1beta1/defaults_test.go index bf8d56af3d6..082fc2adb41 100644 --- a/pkg/apis/extensions/v1beta1/defaults_test.go +++ b/pkg/apis/extensions/v1beta1/defaults_test.go @@ -22,6 +22,7 @@ import ( "k8s.io/kubernetes/pkg/api" _ "k8s.io/kubernetes/pkg/api/install" + "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" _ "k8s.io/kubernetes/pkg/apis/extensions/install" . "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" @@ -373,6 +374,219 @@ func TestSetDefaultJob(t *testing.T) { } } +func TestSetDefaultReplicaSet(t *testing.T) { + tests := []struct { + rs *ReplicaSet + expectLabels bool + expectSelector bool + }{ + { + rs: &ReplicaSet{ + Spec: ReplicaSetSpec{ + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: true, + expectSelector: true, + }, + { + rs: &ReplicaSet{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "bar": "foo", + }, + }, + Spec: ReplicaSetSpec{ + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: false, + expectSelector: true, + }, + { + rs: &ReplicaSet{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "bar": "foo", + }, + }, + Spec: ReplicaSetSpec{ + Selector: &LabelSelector{ + MatchLabels: map[string]string{ + "some": "other", + }, + }, + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: false, + expectSelector: false, + }, + { + rs: &ReplicaSet{ + Spec: ReplicaSetSpec{ + Selector: &LabelSelector{ + MatchLabels: map[string]string{ + "some": "other", + }, + }, + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: true, + expectSelector: false, + }, + } + + for _, test := range tests { + rs := test.rs + obj2 := roundTrip(t, runtime.Object(rs)) + rs2, ok := obj2.(*ReplicaSet) + if !ok { + t.Errorf("unexpected object: %v", rs2) + t.FailNow() + } + if test.expectSelector != reflect.DeepEqual(rs2.Spec.Selector.MatchLabels, rs2.Spec.Template.Labels) { + if test.expectSelector { + t.Errorf("expected: %v, got: %v", rs2.Spec.Template.Labels, rs2.Spec.Selector) + } else { + t.Errorf("unexpected equality: %v", rs.Spec.Selector) + } + } + if test.expectLabels != reflect.DeepEqual(rs2.Labels, rs2.Spec.Template.Labels) { + if test.expectLabels { + t.Errorf("expected: %v, got: %v", rs2.Spec.Template.Labels, rs2.Labels) + } else { + t.Errorf("unexpected equality: %v", rs.Labels) + } + } + } +} + +func TestSetDefaultReplicaSetReplicas(t *testing.T) { + tests := []struct { + rs ReplicaSet + expectReplicas int32 + }{ + { + rs: ReplicaSet{ + Spec: ReplicaSetSpec{ + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectReplicas: 1, + }, + { + rs: ReplicaSet{ + Spec: ReplicaSetSpec{ + Replicas: newInt32(0), + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectReplicas: 0, + }, + { + rs: ReplicaSet{ + Spec: ReplicaSetSpec{ + Replicas: newInt32(3), + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectReplicas: 3, + }, + } + + for _, test := range tests { + rs := &test.rs + obj2 := roundTrip(t, runtime.Object(rs)) + rs2, ok := obj2.(*ReplicaSet) + if !ok { + t.Errorf("unexpected object: %v", rs2) + t.FailNow() + } + if rs2.Spec.Replicas == nil { + t.Errorf("unexpected nil Replicas") + } else if test.expectReplicas != *rs2.Spec.Replicas { + t.Errorf("expected: %d replicas, got: %d", test.expectReplicas, *rs2.Spec.Replicas) + } + } +} + +func TestDefaultRequestIsNotSetForReplicaSet(t *testing.T) { + s := v1.PodSpec{} + s.Containers = []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + }, + }, + }, + } + rs := &ReplicaSet{ + Spec: ReplicaSetSpec{ + Replicas: newInt32(3), + Template: &v1.PodTemplateSpec{ + ObjectMeta: v1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + Spec: s, + }, + }, + } + output := roundTrip(t, runtime.Object(rs)) + rs2 := output.(*ReplicaSet) + defaultRequest := rs2.Spec.Template.Spec.Containers[0].Resources.Requests + requestValue := defaultRequest[v1.ResourceCPU] + if requestValue.String() != "0" { + t.Errorf("Expected 0 request value, got: %s", requestValue.String()) + } +} + func roundTrip(t *testing.T, obj runtime.Object) runtime.Object { data, err := runtime.Encode(Codec, obj) if err != nil { diff --git a/pkg/apis/extensions/v1beta1/register.go b/pkg/apis/extensions/v1beta1/register.go index 36cde91321f..e4bbf61da8c 100644 --- a/pkg/apis/extensions/v1beta1/register.go +++ b/pkg/apis/extensions/v1beta1/register.go @@ -62,6 +62,8 @@ func addKnownTypes(scheme *runtime.Scheme) { &ConfigMap{}, &ConfigMapList{}, &v1.DeleteOptions{}, + &ReplicaSet{}, + &ReplicaSetList{}, ) } @@ -86,3 +88,5 @@ func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { func (obj *ListOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ConfigMap) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ConfigMapList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/extensions/v1beta1/types.generated.go b/pkg/apis/extensions/v1beta1/types.generated.go index 7c72438babd..7f01be4f5f5 100644 --- a/pkg/apis/extensions/v1beta1/types.generated.go +++ b/pkg/apis/extensions/v1beta1/types.generated.go @@ -15692,15 +15692,1223 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1311 := z.EncBinary() + _ = yym1311 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1312 := !z.EncBinary() + yy2arr1312 := z.EncBasicHandle().StructToArray + var yyq1312 [5]bool + _, _, _ = yysep1312, yyq1312, yy2arr1312 + const yyr1312 bool = false + yyq1312[0] = x.Kind != "" + yyq1312[1] = x.APIVersion != "" + yyq1312[2] = true + yyq1312[3] = true + yyq1312[4] = true + var yynn1312 int + if yyr1312 || yy2arr1312 { + r.EncodeArrayStart(5) + } else { + yynn1312 = 0 + for _, b := range yyq1312 { + if b { + yynn1312++ + } + } + r.EncodeMapStart(yynn1312) + yynn1312 = 0 + } + if yyr1312 || yy2arr1312 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1312[0] { + yym1314 := z.EncBinary() + _ = yym1314 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1312[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1315 := z.EncBinary() + _ = yym1315 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1312 || yy2arr1312 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1312[1] { + yym1317 := z.EncBinary() + _ = yym1317 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1312[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1318 := z.EncBinary() + _ = yym1318 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1312 || yy2arr1312 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1312[2] { + yy1320 := &x.ObjectMeta + yy1320.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1312[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1321 := &x.ObjectMeta + yy1321.CodecEncodeSelf(e) + } + } + if yyr1312 || yy2arr1312 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1312[3] { + yy1323 := &x.Spec + yy1323.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1312[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1324 := &x.Spec + yy1324.CodecEncodeSelf(e) + } + } + if yyr1312 || yy2arr1312 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1312[4] { + yy1326 := &x.Status + yy1326.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1312[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1327 := &x.Status + yy1327.CodecEncodeSelf(e) + } + } + if yyr1312 || yy2arr1312 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSet) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1328 := z.DecBinary() + _ = yym1328 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1329 := r.ContainerType() + if yyct1329 == codecSelferValueTypeMap1234 { + yyl1329 := r.ReadMapStart() + if yyl1329 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1329, d) + } + } else if yyct1329 == codecSelferValueTypeArray1234 { + yyl1329 := r.ReadArrayStart() + if yyl1329 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1329, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1330Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1330Slc + var yyhl1330 bool = l >= 0 + for yyj1330 := 0; ; yyj1330++ { + if yyhl1330 { + if yyj1330 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1330Slc = r.DecodeBytes(yys1330Slc, true, true) + yys1330 := string(yys1330Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1330 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv1333 := &x.ObjectMeta + yyv1333.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = ReplicaSetSpec{} + } else { + yyv1334 := &x.Spec + yyv1334.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = ReplicaSetStatus{} + } else { + yyv1335 := &x.Status + yyv1335.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1330) + } // end switch yys1330 + } // end for yyj1330 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1336 int + var yyb1336 bool + var yyhl1336 bool = l >= 0 + yyj1336++ + if yyhl1336 { + yyb1336 = yyj1336 > l + } else { + yyb1336 = r.CheckBreak() + } + if yyb1336 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1336++ + if yyhl1336 { + yyb1336 = yyj1336 > l + } else { + yyb1336 = r.CheckBreak() + } + if yyb1336 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1336++ + if yyhl1336 { + yyb1336 = yyj1336 > l + } else { + yyb1336 = r.CheckBreak() + } + if yyb1336 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv1339 := &x.ObjectMeta + yyv1339.CodecDecodeSelf(d) + } + yyj1336++ + if yyhl1336 { + yyb1336 = yyj1336 > l + } else { + yyb1336 = r.CheckBreak() + } + if yyb1336 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = ReplicaSetSpec{} + } else { + yyv1340 := &x.Spec + yyv1340.CodecDecodeSelf(d) + } + yyj1336++ + if yyhl1336 { + yyb1336 = yyj1336 > l + } else { + yyb1336 = r.CheckBreak() + } + if yyb1336 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = ReplicaSetStatus{} + } else { + yyv1341 := &x.Status + yyv1341.CodecDecodeSelf(d) + } + for { + yyj1336++ + if yyhl1336 { + yyb1336 = yyj1336 > l + } else { + yyb1336 = r.CheckBreak() + } + if yyb1336 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1336-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1342 := z.EncBinary() + _ = yym1342 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1343 := !z.EncBinary() + yy2arr1343 := z.EncBasicHandle().StructToArray + var yyq1343 [4]bool + _, _, _ = yysep1343, yyq1343, yy2arr1343 + const yyr1343 bool = false + yyq1343[0] = x.Kind != "" + yyq1343[1] = x.APIVersion != "" + yyq1343[2] = true + var yynn1343 int + if yyr1343 || yy2arr1343 { + r.EncodeArrayStart(4) + } else { + yynn1343 = 1 + for _, b := range yyq1343 { + if b { + yynn1343++ + } + } + r.EncodeMapStart(yynn1343) + yynn1343 = 0 + } + if yyr1343 || yy2arr1343 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1343[0] { + yym1345 := z.EncBinary() + _ = yym1345 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1343[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1346 := z.EncBinary() + _ = yym1346 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1343 || yy2arr1343 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1343[1] { + yym1348 := z.EncBinary() + _ = yym1348 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1343[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1349 := z.EncBinary() + _ = yym1349 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1343 || yy2arr1343 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1343[2] { + yy1351 := &x.ListMeta + yym1352 := z.EncBinary() + _ = yym1352 + if false { + } else if z.HasExtensions() && z.EncExt(yy1351) { + } else { + z.EncFallback(yy1351) + } + } else { + r.EncodeNil() + } + } else { + if yyq1343[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1353 := &x.ListMeta + yym1354 := z.EncBinary() + _ = yym1354 + if false { + } else if z.HasExtensions() && z.EncExt(yy1353) { + } else { + z.EncFallback(yy1353) + } + } + } + if yyr1343 || yy2arr1343 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1356 := z.EncBinary() + _ = yym1356 + if false { + } else { + h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1357 := z.EncBinary() + _ = yym1357 + if false { + } else { + h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) + } + } + } + if yyr1343 || yy2arr1343 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1358 := z.DecBinary() + _ = yym1358 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1359 := r.ContainerType() + if yyct1359 == codecSelferValueTypeMap1234 { + yyl1359 := r.ReadMapStart() + if yyl1359 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1359, d) + } + } else if yyct1359 == codecSelferValueTypeArray1234 { + yyl1359 := r.ReadArrayStart() + if yyl1359 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1359, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1360Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1360Slc + var yyhl1360 bool = l >= 0 + for yyj1360 := 0; ; yyj1360++ { + if yyhl1360 { + if yyj1360 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1360Slc = r.DecodeBytes(yys1360Slc, true, true) + yys1360 := string(yys1360Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1360 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1363 := &x.ListMeta + yym1364 := z.DecBinary() + _ = yym1364 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1363) { + } else { + z.DecFallback(yyv1363, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1365 := &x.Items + yym1366 := z.DecBinary() + _ = yym1366 + if false { + } else { + h.decSliceReplicaSet((*[]ReplicaSet)(yyv1365), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1360) + } // end switch yys1360 + } // end for yyj1360 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1367 int + var yyb1367 bool + var yyhl1367 bool = l >= 0 + yyj1367++ + if yyhl1367 { + yyb1367 = yyj1367 > l + } else { + yyb1367 = r.CheckBreak() + } + if yyb1367 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1367++ + if yyhl1367 { + yyb1367 = yyj1367 > l + } else { + yyb1367 = r.CheckBreak() + } + if yyb1367 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1367++ + if yyhl1367 { + yyb1367 = yyj1367 > l + } else { + yyb1367 = r.CheckBreak() + } + if yyb1367 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1370 := &x.ListMeta + yym1371 := z.DecBinary() + _ = yym1371 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1370) { + } else { + z.DecFallback(yyv1370, false) + } + } + yyj1367++ + if yyhl1367 { + yyb1367 = yyj1367 > l + } else { + yyb1367 = r.CheckBreak() + } + if yyb1367 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1372 := &x.Items + yym1373 := z.DecBinary() + _ = yym1373 + if false { + } else { + h.decSliceReplicaSet((*[]ReplicaSet)(yyv1372), d) + } + } + for { + yyj1367++ + if yyhl1367 { + yyb1367 = yyj1367 > l + } else { + yyb1367 = r.CheckBreak() + } + if yyb1367 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1367-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1374 := z.EncBinary() + _ = yym1374 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1375 := !z.EncBinary() + yy2arr1375 := z.EncBasicHandle().StructToArray + var yyq1375 [3]bool + _, _, _ = yysep1375, yyq1375, yy2arr1375 + const yyr1375 bool = false + yyq1375[0] = x.Replicas != nil + yyq1375[1] = x.Selector != nil + yyq1375[2] = x.Template != nil + var yynn1375 int + if yyr1375 || yy2arr1375 { + r.EncodeArrayStart(3) + } else { + yynn1375 = 0 + for _, b := range yyq1375 { + if b { + yynn1375++ + } + } + r.EncodeMapStart(yynn1375) + yynn1375 = 0 + } + if yyr1375 || yy2arr1375 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1375[0] { + if x.Replicas == nil { + r.EncodeNil() + } else { + yy1377 := *x.Replicas + yym1378 := z.EncBinary() + _ = yym1378 + if false { + } else { + r.EncodeInt(int64(yy1377)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1375[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Replicas == nil { + r.EncodeNil() + } else { + yy1379 := *x.Replicas + yym1380 := z.EncBinary() + _ = yym1380 + if false { + } else { + r.EncodeInt(int64(yy1379)) + } + } + } + } + if yyr1375 || yy2arr1375 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1375[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + x.Selector.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1375[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + x.Selector.CodecEncodeSelf(e) + } + } + } + if yyr1375 || yy2arr1375 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1375[2] { + if x.Template == nil { + r.EncodeNil() + } else { + x.Template.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1375[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Template == nil { + r.EncodeNil() + } else { + x.Template.CodecEncodeSelf(e) + } + } + } + if yyr1375 || yy2arr1375 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1383 := z.DecBinary() + _ = yym1383 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1384 := r.ContainerType() + if yyct1384 == codecSelferValueTypeMap1234 { + yyl1384 := r.ReadMapStart() + if yyl1384 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1384, d) + } + } else if yyct1384 == codecSelferValueTypeArray1234 { + yyl1384 := r.ReadArrayStart() + if yyl1384 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1384, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1385Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1385Slc + var yyhl1385 bool = l >= 0 + for yyj1385 := 0; ; yyj1385++ { + if yyhl1385 { + if yyj1385 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1385Slc = r.DecodeBytes(yys1385Slc, true, true) + yys1385 := string(yys1385Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1385 { + case "replicas": + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym1387 := z.DecBinary() + _ = yym1387 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(LabelSelector) + } + x.Selector.CodecDecodeSelf(d) + } + case "template": + if r.TryDecodeAsNil() { + if x.Template != nil { + x.Template = nil + } + } else { + if x.Template == nil { + x.Template = new(pkg2_v1.PodTemplateSpec) + } + x.Template.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1385) + } // end switch yys1385 + } // end for yyj1385 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1390 int + var yyb1390 bool + var yyhl1390 bool = l >= 0 + yyj1390++ + if yyhl1390 { + yyb1390 = yyj1390 > l + } else { + yyb1390 = r.CheckBreak() + } + if yyb1390 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym1392 := z.DecBinary() + _ = yym1392 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + yyj1390++ + if yyhl1390 { + yyb1390 = yyj1390 > l + } else { + yyb1390 = r.CheckBreak() + } + if yyb1390 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(LabelSelector) + } + x.Selector.CodecDecodeSelf(d) + } + yyj1390++ + if yyhl1390 { + yyb1390 = yyj1390 > l + } else { + yyb1390 = r.CheckBreak() + } + if yyb1390 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Template != nil { + x.Template = nil + } + } else { + if x.Template == nil { + x.Template = new(pkg2_v1.PodTemplateSpec) + } + x.Template.CodecDecodeSelf(d) + } + for { + yyj1390++ + if yyhl1390 { + yyb1390 = yyj1390 > l + } else { + yyb1390 = r.CheckBreak() + } + if yyb1390 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1390-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1395 := z.EncBinary() + _ = yym1395 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1396 := !z.EncBinary() + yy2arr1396 := z.EncBasicHandle().StructToArray + var yyq1396 [2]bool + _, _, _ = yysep1396, yyq1396, yy2arr1396 + const yyr1396 bool = false + yyq1396[1] = x.ObservedGeneration != 0 + var yynn1396 int + if yyr1396 || yy2arr1396 { + r.EncodeArrayStart(2) + } else { + yynn1396 = 1 + for _, b := range yyq1396 { + if b { + yynn1396++ + } + } + r.EncodeMapStart(yynn1396) + yynn1396 = 0 + } + if yyr1396 || yy2arr1396 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1398 := z.EncBinary() + _ = yym1398 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1399 := z.EncBinary() + _ = yym1399 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr1396 || yy2arr1396 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1396[1] { + yym1401 := z.EncBinary() + _ = yym1401 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq1396[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1402 := z.EncBinary() + _ = yym1402 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } + } + if yyr1396 || yy2arr1396 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1403 := z.DecBinary() + _ = yym1403 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1404 := r.ContainerType() + if yyct1404 == codecSelferValueTypeMap1234 { + yyl1404 := r.ReadMapStart() + if yyl1404 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1404, d) + } + } else if yyct1404 == codecSelferValueTypeArray1234 { + yyl1404 := r.ReadArrayStart() + if yyl1404 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1404, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1405Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1405Slc + var yyhl1405 bool = l >= 0 + for yyj1405 := 0; ; yyj1405++ { + if yyhl1405 { + if yyj1405 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1405Slc = r.DecodeBytes(yys1405Slc, true, true) + yys1405 := string(yys1405Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1405 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + case "observedGeneration": + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + x.ObservedGeneration = int64(r.DecodeInt(64)) + } + default: + z.DecStructFieldNotFound(-1, yys1405) + } // end switch yys1405 + } // end for yyj1405 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1408 int + var yyb1408 bool + var yyhl1408 bool = l >= 0 + yyj1408++ + if yyhl1408 { + yyb1408 = yyj1408 > l + } else { + yyb1408 = r.CheckBreak() + } + if yyb1408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + yyj1408++ + if yyhl1408 { + yyb1408 = yyj1408 > l + } else { + yyb1408 = r.CheckBreak() + } + if yyb1408 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + x.ObservedGeneration = int64(r.DecodeInt(64)) + } + for { + yyj1408++ + if yyhl1408 { + yyb1408 = yyj1408 > l + } else { + yyb1408 = r.CheckBreak() + } + if yyb1408 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1408-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1311 := range v { + for _, yyv1411 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1312 := &yyv1311 - yy1312.CodecEncodeSelf(e) + yy1412 := &yyv1411 + yy1412.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15710,83 +16918,83 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1313 := *v - yyh1313, yyl1313 := z.DecSliceHelperStart() - var yyc1313 bool - if yyl1313 == 0 { - if yyv1313 == nil { - yyv1313 = []HorizontalPodAutoscaler{} - yyc1313 = true - } else if len(yyv1313) != 0 { - yyv1313 = yyv1313[:0] - yyc1313 = true + yyv1413 := *v + yyh1413, yyl1413 := z.DecSliceHelperStart() + var yyc1413 bool + if yyl1413 == 0 { + if yyv1413 == nil { + yyv1413 = []HorizontalPodAutoscaler{} + yyc1413 = true + } else if len(yyv1413) != 0 { + yyv1413 = yyv1413[:0] + yyc1413 = true } - } else if yyl1313 > 0 { - var yyrr1313, yyrl1313 int - var yyrt1313 bool - if yyl1313 > cap(yyv1313) { + } else if yyl1413 > 0 { + var yyrr1413, yyrl1413 int + var yyrt1413 bool + if yyl1413 > cap(yyv1413) { - yyrg1313 := len(yyv1313) > 0 - yyv21313 := yyv1313 - yyrl1313, yyrt1313 = z.DecInferLen(yyl1313, z.DecBasicHandle().MaxInitLen, 312) - if yyrt1313 { - if yyrl1313 <= cap(yyv1313) { - yyv1313 = yyv1313[:yyrl1313] + yyrg1413 := len(yyv1413) > 0 + yyv21413 := yyv1413 + yyrl1413, yyrt1413 = z.DecInferLen(yyl1413, z.DecBasicHandle().MaxInitLen, 312) + if yyrt1413 { + if yyrl1413 <= cap(yyv1413) { + yyv1413 = yyv1413[:yyrl1413] } else { - yyv1313 = make([]HorizontalPodAutoscaler, yyrl1313) + yyv1413 = make([]HorizontalPodAutoscaler, yyrl1413) } } else { - yyv1313 = make([]HorizontalPodAutoscaler, yyrl1313) + yyv1413 = make([]HorizontalPodAutoscaler, yyrl1413) } - yyc1313 = true - yyrr1313 = len(yyv1313) - if yyrg1313 { - copy(yyv1313, yyv21313) + yyc1413 = true + yyrr1413 = len(yyv1413) + if yyrg1413 { + copy(yyv1413, yyv21413) } - } else if yyl1313 != len(yyv1313) { - yyv1313 = yyv1313[:yyl1313] - yyc1313 = true + } else if yyl1413 != len(yyv1413) { + yyv1413 = yyv1413[:yyl1413] + yyc1413 = true } - yyj1313 := 0 - for ; yyj1313 < yyrr1313; yyj1313++ { - yyh1313.ElemContainerState(yyj1313) + yyj1413 := 0 + for ; yyj1413 < yyrr1413; yyj1413++ { + yyh1413.ElemContainerState(yyj1413) if r.TryDecodeAsNil() { - yyv1313[yyj1313] = HorizontalPodAutoscaler{} + yyv1413[yyj1413] = HorizontalPodAutoscaler{} } else { - yyv1314 := &yyv1313[yyj1313] - yyv1314.CodecDecodeSelf(d) + yyv1414 := &yyv1413[yyj1413] + yyv1414.CodecDecodeSelf(d) } } - if yyrt1313 { - for ; yyj1313 < yyl1313; yyj1313++ { - yyv1313 = append(yyv1313, HorizontalPodAutoscaler{}) - yyh1313.ElemContainerState(yyj1313) + if yyrt1413 { + for ; yyj1413 < yyl1413; yyj1413++ { + yyv1413 = append(yyv1413, HorizontalPodAutoscaler{}) + yyh1413.ElemContainerState(yyj1413) if r.TryDecodeAsNil() { - yyv1313[yyj1313] = HorizontalPodAutoscaler{} + yyv1413[yyj1413] = HorizontalPodAutoscaler{} } else { - yyv1315 := &yyv1313[yyj1313] - yyv1315.CodecDecodeSelf(d) + yyv1415 := &yyv1413[yyj1413] + yyv1415.CodecDecodeSelf(d) } } } } else { - yyj1313 := 0 - for ; !r.CheckBreak(); yyj1313++ { + yyj1413 := 0 + for ; !r.CheckBreak(); yyj1413++ { - if yyj1313 >= len(yyv1313) { - yyv1313 = append(yyv1313, HorizontalPodAutoscaler{}) // var yyz1313 HorizontalPodAutoscaler - yyc1313 = true + if yyj1413 >= len(yyv1413) { + yyv1413 = append(yyv1413, HorizontalPodAutoscaler{}) // var yyz1413 HorizontalPodAutoscaler + yyc1413 = true } - yyh1313.ElemContainerState(yyj1313) - if yyj1313 < len(yyv1313) { + yyh1413.ElemContainerState(yyj1413) + if yyj1413 < len(yyv1413) { if r.TryDecodeAsNil() { - yyv1313[yyj1313] = HorizontalPodAutoscaler{} + yyv1413[yyj1413] = HorizontalPodAutoscaler{} } else { - yyv1316 := &yyv1313[yyj1313] - yyv1316.CodecDecodeSelf(d) + yyv1416 := &yyv1413[yyj1413] + yyv1416.CodecDecodeSelf(d) } } else { @@ -15794,17 +17002,17 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos } } - if yyj1313 < len(yyv1313) { - yyv1313 = yyv1313[:yyj1313] - yyc1313 = true - } else if yyj1313 == 0 && yyv1313 == nil { - yyv1313 = []HorizontalPodAutoscaler{} - yyc1313 = true + if yyj1413 < len(yyv1413) { + yyv1413 = yyv1413[:yyj1413] + yyc1413 = true + } else if yyj1413 == 0 && yyv1413 == nil { + yyv1413 = []HorizontalPodAutoscaler{} + yyc1413 = true } } - yyh1313.End() - if yyc1313 { - *v = yyv1313 + yyh1413.End() + if yyc1413 { + *v = yyv1413 } } @@ -15813,10 +17021,10 @@ func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1317 := range v { + for _, yyv1417 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1318 := &yyv1317 - yy1318.CodecEncodeSelf(e) + yy1418 := &yyv1417 + yy1418.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15826,83 +17034,83 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1319 := *v - yyh1319, yyl1319 := z.DecSliceHelperStart() - var yyc1319 bool - if yyl1319 == 0 { - if yyv1319 == nil { - yyv1319 = []APIVersion{} - yyc1319 = true - } else if len(yyv1319) != 0 { - yyv1319 = yyv1319[:0] - yyc1319 = true + yyv1419 := *v + yyh1419, yyl1419 := z.DecSliceHelperStart() + var yyc1419 bool + if yyl1419 == 0 { + if yyv1419 == nil { + yyv1419 = []APIVersion{} + yyc1419 = true + } else if len(yyv1419) != 0 { + yyv1419 = yyv1419[:0] + yyc1419 = true } - } else if yyl1319 > 0 { - var yyrr1319, yyrl1319 int - var yyrt1319 bool - if yyl1319 > cap(yyv1319) { + } else if yyl1419 > 0 { + var yyrr1419, yyrl1419 int + var yyrt1419 bool + if yyl1419 > cap(yyv1419) { - yyrg1319 := len(yyv1319) > 0 - yyv21319 := yyv1319 - yyrl1319, yyrt1319 = z.DecInferLen(yyl1319, z.DecBasicHandle().MaxInitLen, 32) - if yyrt1319 { - if yyrl1319 <= cap(yyv1319) { - yyv1319 = yyv1319[:yyrl1319] + yyrg1419 := len(yyv1419) > 0 + yyv21419 := yyv1419 + yyrl1419, yyrt1419 = z.DecInferLen(yyl1419, z.DecBasicHandle().MaxInitLen, 32) + if yyrt1419 { + if yyrl1419 <= cap(yyv1419) { + yyv1419 = yyv1419[:yyrl1419] } else { - yyv1319 = make([]APIVersion, yyrl1319) + yyv1419 = make([]APIVersion, yyrl1419) } } else { - yyv1319 = make([]APIVersion, yyrl1319) + yyv1419 = make([]APIVersion, yyrl1419) } - yyc1319 = true - yyrr1319 = len(yyv1319) - if yyrg1319 { - copy(yyv1319, yyv21319) + yyc1419 = true + yyrr1419 = len(yyv1419) + if yyrg1419 { + copy(yyv1419, yyv21419) } - } else if yyl1319 != len(yyv1319) { - yyv1319 = yyv1319[:yyl1319] - yyc1319 = true + } else if yyl1419 != len(yyv1419) { + yyv1419 = yyv1419[:yyl1419] + yyc1419 = true } - yyj1319 := 0 - for ; yyj1319 < yyrr1319; yyj1319++ { - yyh1319.ElemContainerState(yyj1319) + yyj1419 := 0 + for ; yyj1419 < yyrr1419; yyj1419++ { + yyh1419.ElemContainerState(yyj1419) if r.TryDecodeAsNil() { - yyv1319[yyj1319] = APIVersion{} + yyv1419[yyj1419] = APIVersion{} } else { - yyv1320 := &yyv1319[yyj1319] - yyv1320.CodecDecodeSelf(d) + yyv1420 := &yyv1419[yyj1419] + yyv1420.CodecDecodeSelf(d) } } - if yyrt1319 { - for ; yyj1319 < yyl1319; yyj1319++ { - yyv1319 = append(yyv1319, APIVersion{}) - yyh1319.ElemContainerState(yyj1319) + if yyrt1419 { + for ; yyj1419 < yyl1419; yyj1419++ { + yyv1419 = append(yyv1419, APIVersion{}) + yyh1419.ElemContainerState(yyj1419) if r.TryDecodeAsNil() { - yyv1319[yyj1319] = APIVersion{} + yyv1419[yyj1419] = APIVersion{} } else { - yyv1321 := &yyv1319[yyj1319] - yyv1321.CodecDecodeSelf(d) + yyv1421 := &yyv1419[yyj1419] + yyv1421.CodecDecodeSelf(d) } } } } else { - yyj1319 := 0 - for ; !r.CheckBreak(); yyj1319++ { + yyj1419 := 0 + for ; !r.CheckBreak(); yyj1419++ { - if yyj1319 >= len(yyv1319) { - yyv1319 = append(yyv1319, APIVersion{}) // var yyz1319 APIVersion - yyc1319 = true + if yyj1419 >= len(yyv1419) { + yyv1419 = append(yyv1419, APIVersion{}) // var yyz1419 APIVersion + yyc1419 = true } - yyh1319.ElemContainerState(yyj1319) - if yyj1319 < len(yyv1319) { + yyh1419.ElemContainerState(yyj1419) + if yyj1419 < len(yyv1419) { if r.TryDecodeAsNil() { - yyv1319[yyj1319] = APIVersion{} + yyv1419[yyj1419] = APIVersion{} } else { - yyv1322 := &yyv1319[yyj1319] - yyv1322.CodecDecodeSelf(d) + yyv1422 := &yyv1419[yyj1419] + yyv1422.CodecDecodeSelf(d) } } else { @@ -15910,17 +17118,17 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode } } - if yyj1319 < len(yyv1319) { - yyv1319 = yyv1319[:yyj1319] - yyc1319 = true - } else if yyj1319 == 0 && yyv1319 == nil { - yyv1319 = []APIVersion{} - yyc1319 = true + if yyj1419 < len(yyv1419) { + yyv1419 = yyv1419[:yyj1419] + yyc1419 = true + } else if yyj1419 == 0 && yyv1419 == nil { + yyv1419 = []APIVersion{} + yyc1419 = true } } - yyh1319.End() - if yyc1319 { - *v = yyv1319 + yyh1419.End() + if yyc1419 { + *v = yyv1419 } } @@ -15929,10 +17137,10 @@ func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1323 := range v { + for _, yyv1423 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1324 := &yyv1323 - yy1324.CodecEncodeSelf(e) + yy1424 := &yyv1423 + yy1424.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15942,83 +17150,83 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1325 := *v - yyh1325, yyl1325 := z.DecSliceHelperStart() - var yyc1325 bool - if yyl1325 == 0 { - if yyv1325 == nil { - yyv1325 = []ThirdPartyResource{} - yyc1325 = true - } else if len(yyv1325) != 0 { - yyv1325 = yyv1325[:0] - yyc1325 = true + yyv1425 := *v + yyh1425, yyl1425 := z.DecSliceHelperStart() + var yyc1425 bool + if yyl1425 == 0 { + if yyv1425 == nil { + yyv1425 = []ThirdPartyResource{} + yyc1425 = true + } else if len(yyv1425) != 0 { + yyv1425 = yyv1425[:0] + yyc1425 = true } - } else if yyl1325 > 0 { - var yyrr1325, yyrl1325 int - var yyrt1325 bool - if yyl1325 > cap(yyv1325) { + } else if yyl1425 > 0 { + var yyrr1425, yyrl1425 int + var yyrt1425 bool + if yyl1425 > cap(yyv1425) { - yyrg1325 := len(yyv1325) > 0 - yyv21325 := yyv1325 - yyrl1325, yyrt1325 = z.DecInferLen(yyl1325, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1325 { - if yyrl1325 <= cap(yyv1325) { - yyv1325 = yyv1325[:yyrl1325] + yyrg1425 := len(yyv1425) > 0 + yyv21425 := yyv1425 + yyrl1425, yyrt1425 = z.DecInferLen(yyl1425, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1425 { + if yyrl1425 <= cap(yyv1425) { + yyv1425 = yyv1425[:yyrl1425] } else { - yyv1325 = make([]ThirdPartyResource, yyrl1325) + yyv1425 = make([]ThirdPartyResource, yyrl1425) } } else { - yyv1325 = make([]ThirdPartyResource, yyrl1325) + yyv1425 = make([]ThirdPartyResource, yyrl1425) } - yyc1325 = true - yyrr1325 = len(yyv1325) - if yyrg1325 { - copy(yyv1325, yyv21325) + yyc1425 = true + yyrr1425 = len(yyv1425) + if yyrg1425 { + copy(yyv1425, yyv21425) } - } else if yyl1325 != len(yyv1325) { - yyv1325 = yyv1325[:yyl1325] - yyc1325 = true + } else if yyl1425 != len(yyv1425) { + yyv1425 = yyv1425[:yyl1425] + yyc1425 = true } - yyj1325 := 0 - for ; yyj1325 < yyrr1325; yyj1325++ { - yyh1325.ElemContainerState(yyj1325) + yyj1425 := 0 + for ; yyj1425 < yyrr1425; yyj1425++ { + yyh1425.ElemContainerState(yyj1425) if r.TryDecodeAsNil() { - yyv1325[yyj1325] = ThirdPartyResource{} + yyv1425[yyj1425] = ThirdPartyResource{} } else { - yyv1326 := &yyv1325[yyj1325] - yyv1326.CodecDecodeSelf(d) + yyv1426 := &yyv1425[yyj1425] + yyv1426.CodecDecodeSelf(d) } } - if yyrt1325 { - for ; yyj1325 < yyl1325; yyj1325++ { - yyv1325 = append(yyv1325, ThirdPartyResource{}) - yyh1325.ElemContainerState(yyj1325) + if yyrt1425 { + for ; yyj1425 < yyl1425; yyj1425++ { + yyv1425 = append(yyv1425, ThirdPartyResource{}) + yyh1425.ElemContainerState(yyj1425) if r.TryDecodeAsNil() { - yyv1325[yyj1325] = ThirdPartyResource{} + yyv1425[yyj1425] = ThirdPartyResource{} } else { - yyv1327 := &yyv1325[yyj1325] - yyv1327.CodecDecodeSelf(d) + yyv1427 := &yyv1425[yyj1425] + yyv1427.CodecDecodeSelf(d) } } } } else { - yyj1325 := 0 - for ; !r.CheckBreak(); yyj1325++ { + yyj1425 := 0 + for ; !r.CheckBreak(); yyj1425++ { - if yyj1325 >= len(yyv1325) { - yyv1325 = append(yyv1325, ThirdPartyResource{}) // var yyz1325 ThirdPartyResource - yyc1325 = true + if yyj1425 >= len(yyv1425) { + yyv1425 = append(yyv1425, ThirdPartyResource{}) // var yyz1425 ThirdPartyResource + yyc1425 = true } - yyh1325.ElemContainerState(yyj1325) - if yyj1325 < len(yyv1325) { + yyh1425.ElemContainerState(yyj1425) + if yyj1425 < len(yyv1425) { if r.TryDecodeAsNil() { - yyv1325[yyj1325] = ThirdPartyResource{} + yyv1425[yyj1425] = ThirdPartyResource{} } else { - yyv1328 := &yyv1325[yyj1325] - yyv1328.CodecDecodeSelf(d) + yyv1428 := &yyv1425[yyj1425] + yyv1428.CodecDecodeSelf(d) } } else { @@ -16026,17 +17234,17 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * } } - if yyj1325 < len(yyv1325) { - yyv1325 = yyv1325[:yyj1325] - yyc1325 = true - } else if yyj1325 == 0 && yyv1325 == nil { - yyv1325 = []ThirdPartyResource{} - yyc1325 = true + if yyj1425 < len(yyv1425) { + yyv1425 = yyv1425[:yyj1425] + yyc1425 = true + } else if yyj1425 == 0 && yyv1425 == nil { + yyv1425 = []ThirdPartyResource{} + yyc1425 = true } } - yyh1325.End() - if yyc1325 { - *v = yyv1325 + yyh1425.End() + if yyc1425 { + *v = yyv1425 } } @@ -16045,10 +17253,10 @@ func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1329 := range v { + for _, yyv1429 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1330 := &yyv1329 - yy1330.CodecEncodeSelf(e) + yy1430 := &yyv1429 + yy1430.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16058,83 +17266,83 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1331 := *v - yyh1331, yyl1331 := z.DecSliceHelperStart() - var yyc1331 bool - if yyl1331 == 0 { - if yyv1331 == nil { - yyv1331 = []Deployment{} - yyc1331 = true - } else if len(yyv1331) != 0 { - yyv1331 = yyv1331[:0] - yyc1331 = true + yyv1431 := *v + yyh1431, yyl1431 := z.DecSliceHelperStart() + var yyc1431 bool + if yyl1431 == 0 { + if yyv1431 == nil { + yyv1431 = []Deployment{} + yyc1431 = true + } else if len(yyv1431) != 0 { + yyv1431 = yyv1431[:0] + yyc1431 = true } - } else if yyl1331 > 0 { - var yyrr1331, yyrl1331 int - var yyrt1331 bool - if yyl1331 > cap(yyv1331) { + } else if yyl1431 > 0 { + var yyrr1431, yyrl1431 int + var yyrt1431 bool + if yyl1431 > cap(yyv1431) { - yyrg1331 := len(yyv1331) > 0 - yyv21331 := yyv1331 - yyrl1331, yyrt1331 = z.DecInferLen(yyl1331, z.DecBasicHandle().MaxInitLen, 600) - if yyrt1331 { - if yyrl1331 <= cap(yyv1331) { - yyv1331 = yyv1331[:yyrl1331] + yyrg1431 := len(yyv1431) > 0 + yyv21431 := yyv1431 + yyrl1431, yyrt1431 = z.DecInferLen(yyl1431, z.DecBasicHandle().MaxInitLen, 600) + if yyrt1431 { + if yyrl1431 <= cap(yyv1431) { + yyv1431 = yyv1431[:yyrl1431] } else { - yyv1331 = make([]Deployment, yyrl1331) + yyv1431 = make([]Deployment, yyrl1431) } } else { - yyv1331 = make([]Deployment, yyrl1331) + yyv1431 = make([]Deployment, yyrl1431) } - yyc1331 = true - yyrr1331 = len(yyv1331) - if yyrg1331 { - copy(yyv1331, yyv21331) + yyc1431 = true + yyrr1431 = len(yyv1431) + if yyrg1431 { + copy(yyv1431, yyv21431) } - } else if yyl1331 != len(yyv1331) { - yyv1331 = yyv1331[:yyl1331] - yyc1331 = true + } else if yyl1431 != len(yyv1431) { + yyv1431 = yyv1431[:yyl1431] + yyc1431 = true } - yyj1331 := 0 - for ; yyj1331 < yyrr1331; yyj1331++ { - yyh1331.ElemContainerState(yyj1331) + yyj1431 := 0 + for ; yyj1431 < yyrr1431; yyj1431++ { + yyh1431.ElemContainerState(yyj1431) if r.TryDecodeAsNil() { - yyv1331[yyj1331] = Deployment{} + yyv1431[yyj1431] = Deployment{} } else { - yyv1332 := &yyv1331[yyj1331] - yyv1332.CodecDecodeSelf(d) + yyv1432 := &yyv1431[yyj1431] + yyv1432.CodecDecodeSelf(d) } } - if yyrt1331 { - for ; yyj1331 < yyl1331; yyj1331++ { - yyv1331 = append(yyv1331, Deployment{}) - yyh1331.ElemContainerState(yyj1331) + if yyrt1431 { + for ; yyj1431 < yyl1431; yyj1431++ { + yyv1431 = append(yyv1431, Deployment{}) + yyh1431.ElemContainerState(yyj1431) if r.TryDecodeAsNil() { - yyv1331[yyj1331] = Deployment{} + yyv1431[yyj1431] = Deployment{} } else { - yyv1333 := &yyv1331[yyj1331] - yyv1333.CodecDecodeSelf(d) + yyv1433 := &yyv1431[yyj1431] + yyv1433.CodecDecodeSelf(d) } } } } else { - yyj1331 := 0 - for ; !r.CheckBreak(); yyj1331++ { + yyj1431 := 0 + for ; !r.CheckBreak(); yyj1431++ { - if yyj1331 >= len(yyv1331) { - yyv1331 = append(yyv1331, Deployment{}) // var yyz1331 Deployment - yyc1331 = true + if yyj1431 >= len(yyv1431) { + yyv1431 = append(yyv1431, Deployment{}) // var yyz1431 Deployment + yyc1431 = true } - yyh1331.ElemContainerState(yyj1331) - if yyj1331 < len(yyv1331) { + yyh1431.ElemContainerState(yyj1431) + if yyj1431 < len(yyv1431) { if r.TryDecodeAsNil() { - yyv1331[yyj1331] = Deployment{} + yyv1431[yyj1431] = Deployment{} } else { - yyv1334 := &yyv1331[yyj1331] - yyv1334.CodecDecodeSelf(d) + yyv1434 := &yyv1431[yyj1431] + yyv1434.CodecDecodeSelf(d) } } else { @@ -16142,17 +17350,17 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode } } - if yyj1331 < len(yyv1331) { - yyv1331 = yyv1331[:yyj1331] - yyc1331 = true - } else if yyj1331 == 0 && yyv1331 == nil { - yyv1331 = []Deployment{} - yyc1331 = true + if yyj1431 < len(yyv1431) { + yyv1431 = yyv1431[:yyj1431] + yyc1431 = true + } else if yyj1431 == 0 && yyv1431 == nil { + yyv1431 = []Deployment{} + yyc1431 = true } } - yyh1331.End() - if yyc1331 { - *v = yyv1331 + yyh1431.End() + if yyc1431 { + *v = yyv1431 } } @@ -16161,10 +17369,10 @@ func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1335 := range v { + for _, yyv1435 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1336 := &yyv1335 - yy1336.CodecEncodeSelf(e) + yy1436 := &yyv1435 + yy1436.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16174,83 +17382,83 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1337 := *v - yyh1337, yyl1337 := z.DecSliceHelperStart() - var yyc1337 bool - if yyl1337 == 0 { - if yyv1337 == nil { - yyv1337 = []DaemonSet{} - yyc1337 = true - } else if len(yyv1337) != 0 { - yyv1337 = yyv1337[:0] - yyc1337 = true + yyv1437 := *v + yyh1437, yyl1437 := z.DecSliceHelperStart() + var yyc1437 bool + if yyl1437 == 0 { + if yyv1437 == nil { + yyv1437 = []DaemonSet{} + yyc1437 = true + } else if len(yyv1437) != 0 { + yyv1437 = yyv1437[:0] + yyc1437 = true } - } else if yyl1337 > 0 { - var yyrr1337, yyrl1337 int - var yyrt1337 bool - if yyl1337 > cap(yyv1337) { + } else if yyl1437 > 0 { + var yyrr1437, yyrl1437 int + var yyrt1437 bool + if yyl1437 > cap(yyv1437) { - yyrg1337 := len(yyv1337) > 0 - yyv21337 := yyv1337 - yyrl1337, yyrt1337 = z.DecInferLen(yyl1337, z.DecBasicHandle().MaxInitLen, 256) - if yyrt1337 { - if yyrl1337 <= cap(yyv1337) { - yyv1337 = yyv1337[:yyrl1337] + yyrg1437 := len(yyv1437) > 0 + yyv21437 := yyv1437 + yyrl1437, yyrt1437 = z.DecInferLen(yyl1437, z.DecBasicHandle().MaxInitLen, 256) + if yyrt1437 { + if yyrl1437 <= cap(yyv1437) { + yyv1437 = yyv1437[:yyrl1437] } else { - yyv1337 = make([]DaemonSet, yyrl1337) + yyv1437 = make([]DaemonSet, yyrl1437) } } else { - yyv1337 = make([]DaemonSet, yyrl1337) + yyv1437 = make([]DaemonSet, yyrl1437) } - yyc1337 = true - yyrr1337 = len(yyv1337) - if yyrg1337 { - copy(yyv1337, yyv21337) + yyc1437 = true + yyrr1437 = len(yyv1437) + if yyrg1437 { + copy(yyv1437, yyv21437) } - } else if yyl1337 != len(yyv1337) { - yyv1337 = yyv1337[:yyl1337] - yyc1337 = true + } else if yyl1437 != len(yyv1437) { + yyv1437 = yyv1437[:yyl1437] + yyc1437 = true } - yyj1337 := 0 - for ; yyj1337 < yyrr1337; yyj1337++ { - yyh1337.ElemContainerState(yyj1337) + yyj1437 := 0 + for ; yyj1437 < yyrr1437; yyj1437++ { + yyh1437.ElemContainerState(yyj1437) if r.TryDecodeAsNil() { - yyv1337[yyj1337] = DaemonSet{} + yyv1437[yyj1437] = DaemonSet{} } else { - yyv1338 := &yyv1337[yyj1337] - yyv1338.CodecDecodeSelf(d) + yyv1438 := &yyv1437[yyj1437] + yyv1438.CodecDecodeSelf(d) } } - if yyrt1337 { - for ; yyj1337 < yyl1337; yyj1337++ { - yyv1337 = append(yyv1337, DaemonSet{}) - yyh1337.ElemContainerState(yyj1337) + if yyrt1437 { + for ; yyj1437 < yyl1437; yyj1437++ { + yyv1437 = append(yyv1437, DaemonSet{}) + yyh1437.ElemContainerState(yyj1437) if r.TryDecodeAsNil() { - yyv1337[yyj1337] = DaemonSet{} + yyv1437[yyj1437] = DaemonSet{} } else { - yyv1339 := &yyv1337[yyj1337] - yyv1339.CodecDecodeSelf(d) + yyv1439 := &yyv1437[yyj1437] + yyv1439.CodecDecodeSelf(d) } } } } else { - yyj1337 := 0 - for ; !r.CheckBreak(); yyj1337++ { + yyj1437 := 0 + for ; !r.CheckBreak(); yyj1437++ { - if yyj1337 >= len(yyv1337) { - yyv1337 = append(yyv1337, DaemonSet{}) // var yyz1337 DaemonSet - yyc1337 = true + if yyj1437 >= len(yyv1437) { + yyv1437 = append(yyv1437, DaemonSet{}) // var yyz1437 DaemonSet + yyc1437 = true } - yyh1337.ElemContainerState(yyj1337) - if yyj1337 < len(yyv1337) { + yyh1437.ElemContainerState(yyj1437) + if yyj1437 < len(yyv1437) { if r.TryDecodeAsNil() { - yyv1337[yyj1337] = DaemonSet{} + yyv1437[yyj1437] = DaemonSet{} } else { - yyv1340 := &yyv1337[yyj1337] - yyv1340.CodecDecodeSelf(d) + yyv1440 := &yyv1437[yyj1437] + yyv1440.CodecDecodeSelf(d) } } else { @@ -16258,17 +17466,17 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) } } - if yyj1337 < len(yyv1337) { - yyv1337 = yyv1337[:yyj1337] - yyc1337 = true - } else if yyj1337 == 0 && yyv1337 == nil { - yyv1337 = []DaemonSet{} - yyc1337 = true + if yyj1437 < len(yyv1437) { + yyv1437 = yyv1437[:yyj1437] + yyc1437 = true + } else if yyj1437 == 0 && yyv1437 == nil { + yyv1437 = []DaemonSet{} + yyc1437 = true } } - yyh1337.End() - if yyc1337 { - *v = yyv1337 + yyh1437.End() + if yyc1437 { + *v = yyv1437 } } @@ -16277,10 +17485,10 @@ func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceDa z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1341 := range v { + for _, yyv1441 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1342 := &yyv1341 - yy1342.CodecEncodeSelf(e) + yy1442 := &yyv1441 + yy1442.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16290,83 +17498,83 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1343 := *v - yyh1343, yyl1343 := z.DecSliceHelperStart() - var yyc1343 bool - if yyl1343 == 0 { - if yyv1343 == nil { - yyv1343 = []ThirdPartyResourceData{} - yyc1343 = true - } else if len(yyv1343) != 0 { - yyv1343 = yyv1343[:0] - yyc1343 = true + yyv1443 := *v + yyh1443, yyl1443 := z.DecSliceHelperStart() + var yyc1443 bool + if yyl1443 == 0 { + if yyv1443 == nil { + yyv1443 = []ThirdPartyResourceData{} + yyc1443 = true + } else if len(yyv1443) != 0 { + yyv1443 = yyv1443[:0] + yyc1443 = true } - } else if yyl1343 > 0 { - var yyrr1343, yyrl1343 int - var yyrt1343 bool - if yyl1343 > cap(yyv1343) { + } else if yyl1443 > 0 { + var yyrr1443, yyrl1443 int + var yyrt1443 bool + if yyl1443 > cap(yyv1443) { - yyrg1343 := len(yyv1343) > 0 - yyv21343 := yyv1343 - yyrl1343, yyrt1343 = z.DecInferLen(yyl1343, z.DecBasicHandle().MaxInitLen, 216) - if yyrt1343 { - if yyrl1343 <= cap(yyv1343) { - yyv1343 = yyv1343[:yyrl1343] + yyrg1443 := len(yyv1443) > 0 + yyv21443 := yyv1443 + yyrl1443, yyrt1443 = z.DecInferLen(yyl1443, z.DecBasicHandle().MaxInitLen, 216) + if yyrt1443 { + if yyrl1443 <= cap(yyv1443) { + yyv1443 = yyv1443[:yyrl1443] } else { - yyv1343 = make([]ThirdPartyResourceData, yyrl1343) + yyv1443 = make([]ThirdPartyResourceData, yyrl1443) } } else { - yyv1343 = make([]ThirdPartyResourceData, yyrl1343) + yyv1443 = make([]ThirdPartyResourceData, yyrl1443) } - yyc1343 = true - yyrr1343 = len(yyv1343) - if yyrg1343 { - copy(yyv1343, yyv21343) + yyc1443 = true + yyrr1443 = len(yyv1443) + if yyrg1443 { + copy(yyv1443, yyv21443) } - } else if yyl1343 != len(yyv1343) { - yyv1343 = yyv1343[:yyl1343] - yyc1343 = true + } else if yyl1443 != len(yyv1443) { + yyv1443 = yyv1443[:yyl1443] + yyc1443 = true } - yyj1343 := 0 - for ; yyj1343 < yyrr1343; yyj1343++ { - yyh1343.ElemContainerState(yyj1343) + yyj1443 := 0 + for ; yyj1443 < yyrr1443; yyj1443++ { + yyh1443.ElemContainerState(yyj1443) if r.TryDecodeAsNil() { - yyv1343[yyj1343] = ThirdPartyResourceData{} + yyv1443[yyj1443] = ThirdPartyResourceData{} } else { - yyv1344 := &yyv1343[yyj1343] - yyv1344.CodecDecodeSelf(d) + yyv1444 := &yyv1443[yyj1443] + yyv1444.CodecDecodeSelf(d) } } - if yyrt1343 { - for ; yyj1343 < yyl1343; yyj1343++ { - yyv1343 = append(yyv1343, ThirdPartyResourceData{}) - yyh1343.ElemContainerState(yyj1343) + if yyrt1443 { + for ; yyj1443 < yyl1443; yyj1443++ { + yyv1443 = append(yyv1443, ThirdPartyResourceData{}) + yyh1443.ElemContainerState(yyj1443) if r.TryDecodeAsNil() { - yyv1343[yyj1343] = ThirdPartyResourceData{} + yyv1443[yyj1443] = ThirdPartyResourceData{} } else { - yyv1345 := &yyv1343[yyj1343] - yyv1345.CodecDecodeSelf(d) + yyv1445 := &yyv1443[yyj1443] + yyv1445.CodecDecodeSelf(d) } } } } else { - yyj1343 := 0 - for ; !r.CheckBreak(); yyj1343++ { + yyj1443 := 0 + for ; !r.CheckBreak(); yyj1443++ { - if yyj1343 >= len(yyv1343) { - yyv1343 = append(yyv1343, ThirdPartyResourceData{}) // var yyz1343 ThirdPartyResourceData - yyc1343 = true + if yyj1443 >= len(yyv1443) { + yyv1443 = append(yyv1443, ThirdPartyResourceData{}) // var yyz1443 ThirdPartyResourceData + yyc1443 = true } - yyh1343.ElemContainerState(yyj1343) - if yyj1343 < len(yyv1343) { + yyh1443.ElemContainerState(yyj1443) + if yyj1443 < len(yyv1443) { if r.TryDecodeAsNil() { - yyv1343[yyj1343] = ThirdPartyResourceData{} + yyv1443[yyj1443] = ThirdPartyResourceData{} } else { - yyv1346 := &yyv1343[yyj1343] - yyv1346.CodecDecodeSelf(d) + yyv1446 := &yyv1443[yyj1443] + yyv1446.CodecDecodeSelf(d) } } else { @@ -16374,17 +17582,17 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD } } - if yyj1343 < len(yyv1343) { - yyv1343 = yyv1343[:yyj1343] - yyc1343 = true - } else if yyj1343 == 0 && yyv1343 == nil { - yyv1343 = []ThirdPartyResourceData{} - yyc1343 = true + if yyj1443 < len(yyv1443) { + yyv1443 = yyv1443[:yyj1443] + yyc1443 = true + } else if yyj1443 == 0 && yyv1443 == nil { + yyv1443 = []ThirdPartyResourceData{} + yyc1443 = true } } - yyh1343.End() - if yyc1343 { - *v = yyv1343 + yyh1443.End() + if yyc1443 { + *v = yyv1443 } } @@ -16393,10 +17601,10 @@ func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1347 := range v { + for _, yyv1447 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1348 := &yyv1347 - yy1348.CodecEncodeSelf(e) + yy1448 := &yyv1447 + yy1448.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16406,83 +17614,83 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1349 := *v - yyh1349, yyl1349 := z.DecSliceHelperStart() - var yyc1349 bool - if yyl1349 == 0 { - if yyv1349 == nil { - yyv1349 = []Job{} - yyc1349 = true - } else if len(yyv1349) != 0 { - yyv1349 = yyv1349[:0] - yyc1349 = true + yyv1449 := *v + yyh1449, yyl1449 := z.DecSliceHelperStart() + var yyc1449 bool + if yyl1449 == 0 { + if yyv1449 == nil { + yyv1449 = []Job{} + yyc1449 = true + } else if len(yyv1449) != 0 { + yyv1449 = yyv1449[:0] + yyc1449 = true } - } else if yyl1349 > 0 { - var yyrr1349, yyrl1349 int - var yyrt1349 bool - if yyl1349 > cap(yyv1349) { + } else if yyl1449 > 0 { + var yyrr1449, yyrl1449 int + var yyrt1449 bool + if yyl1449 > cap(yyv1449) { - yyrg1349 := len(yyv1349) > 0 - yyv21349 := yyv1349 - yyrl1349, yyrt1349 = z.DecInferLen(yyl1349, z.DecBasicHandle().MaxInitLen, 632) - if yyrt1349 { - if yyrl1349 <= cap(yyv1349) { - yyv1349 = yyv1349[:yyrl1349] + yyrg1449 := len(yyv1449) > 0 + yyv21449 := yyv1449 + yyrl1449, yyrt1449 = z.DecInferLen(yyl1449, z.DecBasicHandle().MaxInitLen, 632) + if yyrt1449 { + if yyrl1449 <= cap(yyv1449) { + yyv1449 = yyv1449[:yyrl1449] } else { - yyv1349 = make([]Job, yyrl1349) + yyv1449 = make([]Job, yyrl1449) } } else { - yyv1349 = make([]Job, yyrl1349) + yyv1449 = make([]Job, yyrl1449) } - yyc1349 = true - yyrr1349 = len(yyv1349) - if yyrg1349 { - copy(yyv1349, yyv21349) + yyc1449 = true + yyrr1449 = len(yyv1449) + if yyrg1449 { + copy(yyv1449, yyv21449) } - } else if yyl1349 != len(yyv1349) { - yyv1349 = yyv1349[:yyl1349] - yyc1349 = true + } else if yyl1449 != len(yyv1449) { + yyv1449 = yyv1449[:yyl1449] + yyc1449 = true } - yyj1349 := 0 - for ; yyj1349 < yyrr1349; yyj1349++ { - yyh1349.ElemContainerState(yyj1349) + yyj1449 := 0 + for ; yyj1449 < yyrr1449; yyj1449++ { + yyh1449.ElemContainerState(yyj1449) if r.TryDecodeAsNil() { - yyv1349[yyj1349] = Job{} + yyv1449[yyj1449] = Job{} } else { - yyv1350 := &yyv1349[yyj1349] - yyv1350.CodecDecodeSelf(d) + yyv1450 := &yyv1449[yyj1449] + yyv1450.CodecDecodeSelf(d) } } - if yyrt1349 { - for ; yyj1349 < yyl1349; yyj1349++ { - yyv1349 = append(yyv1349, Job{}) - yyh1349.ElemContainerState(yyj1349) + if yyrt1449 { + for ; yyj1449 < yyl1449; yyj1449++ { + yyv1449 = append(yyv1449, Job{}) + yyh1449.ElemContainerState(yyj1449) if r.TryDecodeAsNil() { - yyv1349[yyj1349] = Job{} + yyv1449[yyj1449] = Job{} } else { - yyv1351 := &yyv1349[yyj1349] - yyv1351.CodecDecodeSelf(d) + yyv1451 := &yyv1449[yyj1449] + yyv1451.CodecDecodeSelf(d) } } } } else { - yyj1349 := 0 - for ; !r.CheckBreak(); yyj1349++ { + yyj1449 := 0 + for ; !r.CheckBreak(); yyj1449++ { - if yyj1349 >= len(yyv1349) { - yyv1349 = append(yyv1349, Job{}) // var yyz1349 Job - yyc1349 = true + if yyj1449 >= len(yyv1449) { + yyv1449 = append(yyv1449, Job{}) // var yyz1449 Job + yyc1449 = true } - yyh1349.ElemContainerState(yyj1349) - if yyj1349 < len(yyv1349) { + yyh1449.ElemContainerState(yyj1449) + if yyj1449 < len(yyv1449) { if r.TryDecodeAsNil() { - yyv1349[yyj1349] = Job{} + yyv1449[yyj1449] = Job{} } else { - yyv1352 := &yyv1349[yyj1349] - yyv1352.CodecDecodeSelf(d) + yyv1452 := &yyv1449[yyj1449] + yyv1452.CodecDecodeSelf(d) } } else { @@ -16490,17 +17698,17 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { } } - if yyj1349 < len(yyv1349) { - yyv1349 = yyv1349[:yyj1349] - yyc1349 = true - } else if yyj1349 == 0 && yyv1349 == nil { - yyv1349 = []Job{} - yyc1349 = true + if yyj1449 < len(yyv1449) { + yyv1449 = yyv1449[:yyj1449] + yyc1449 = true + } else if yyj1449 == 0 && yyv1449 == nil { + yyv1449 = []Job{} + yyc1449 = true } } - yyh1349.End() - if yyc1349 { - *v = yyv1349 + yyh1449.End() + if yyc1449 { + *v = yyv1449 } } @@ -16509,10 +17717,10 @@ func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1353 := range v { + for _, yyv1453 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1354 := &yyv1353 - yy1354.CodecEncodeSelf(e) + yy1454 := &yyv1453 + yy1454.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16522,83 +17730,83 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1355 := *v - yyh1355, yyl1355 := z.DecSliceHelperStart() - var yyc1355 bool - if yyl1355 == 0 { - if yyv1355 == nil { - yyv1355 = []JobCondition{} - yyc1355 = true - } else if len(yyv1355) != 0 { - yyv1355 = yyv1355[:0] - yyc1355 = true + yyv1455 := *v + yyh1455, yyl1455 := z.DecSliceHelperStart() + var yyc1455 bool + if yyl1455 == 0 { + if yyv1455 == nil { + yyv1455 = []JobCondition{} + yyc1455 = true + } else if len(yyv1455) != 0 { + yyv1455 = yyv1455[:0] + yyc1455 = true } - } else if yyl1355 > 0 { - var yyrr1355, yyrl1355 int - var yyrt1355 bool - if yyl1355 > cap(yyv1355) { + } else if yyl1455 > 0 { + var yyrr1455, yyrl1455 int + var yyrt1455 bool + if yyl1455 > cap(yyv1455) { - yyrg1355 := len(yyv1355) > 0 - yyv21355 := yyv1355 - yyrl1355, yyrt1355 = z.DecInferLen(yyl1355, z.DecBasicHandle().MaxInitLen, 112) - if yyrt1355 { - if yyrl1355 <= cap(yyv1355) { - yyv1355 = yyv1355[:yyrl1355] + yyrg1455 := len(yyv1455) > 0 + yyv21455 := yyv1455 + yyrl1455, yyrt1455 = z.DecInferLen(yyl1455, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1455 { + if yyrl1455 <= cap(yyv1455) { + yyv1455 = yyv1455[:yyrl1455] } else { - yyv1355 = make([]JobCondition, yyrl1355) + yyv1455 = make([]JobCondition, yyrl1455) } } else { - yyv1355 = make([]JobCondition, yyrl1355) + yyv1455 = make([]JobCondition, yyrl1455) } - yyc1355 = true - yyrr1355 = len(yyv1355) - if yyrg1355 { - copy(yyv1355, yyv21355) + yyc1455 = true + yyrr1455 = len(yyv1455) + if yyrg1455 { + copy(yyv1455, yyv21455) } - } else if yyl1355 != len(yyv1355) { - yyv1355 = yyv1355[:yyl1355] - yyc1355 = true + } else if yyl1455 != len(yyv1455) { + yyv1455 = yyv1455[:yyl1455] + yyc1455 = true } - yyj1355 := 0 - for ; yyj1355 < yyrr1355; yyj1355++ { - yyh1355.ElemContainerState(yyj1355) + yyj1455 := 0 + for ; yyj1455 < yyrr1455; yyj1455++ { + yyh1455.ElemContainerState(yyj1455) if r.TryDecodeAsNil() { - yyv1355[yyj1355] = JobCondition{} + yyv1455[yyj1455] = JobCondition{} } else { - yyv1356 := &yyv1355[yyj1355] - yyv1356.CodecDecodeSelf(d) + yyv1456 := &yyv1455[yyj1455] + yyv1456.CodecDecodeSelf(d) } } - if yyrt1355 { - for ; yyj1355 < yyl1355; yyj1355++ { - yyv1355 = append(yyv1355, JobCondition{}) - yyh1355.ElemContainerState(yyj1355) + if yyrt1455 { + for ; yyj1455 < yyl1455; yyj1455++ { + yyv1455 = append(yyv1455, JobCondition{}) + yyh1455.ElemContainerState(yyj1455) if r.TryDecodeAsNil() { - yyv1355[yyj1355] = JobCondition{} + yyv1455[yyj1455] = JobCondition{} } else { - yyv1357 := &yyv1355[yyj1355] - yyv1357.CodecDecodeSelf(d) + yyv1457 := &yyv1455[yyj1455] + yyv1457.CodecDecodeSelf(d) } } } } else { - yyj1355 := 0 - for ; !r.CheckBreak(); yyj1355++ { + yyj1455 := 0 + for ; !r.CheckBreak(); yyj1455++ { - if yyj1355 >= len(yyv1355) { - yyv1355 = append(yyv1355, JobCondition{}) // var yyz1355 JobCondition - yyc1355 = true + if yyj1455 >= len(yyv1455) { + yyv1455 = append(yyv1455, JobCondition{}) // var yyz1455 JobCondition + yyc1455 = true } - yyh1355.ElemContainerState(yyj1355) - if yyj1355 < len(yyv1355) { + yyh1455.ElemContainerState(yyj1455) + if yyj1455 < len(yyv1455) { if r.TryDecodeAsNil() { - yyv1355[yyj1355] = JobCondition{} + yyv1455[yyj1455] = JobCondition{} } else { - yyv1358 := &yyv1355[yyj1355] - yyv1358.CodecDecodeSelf(d) + yyv1458 := &yyv1455[yyj1455] + yyv1458.CodecDecodeSelf(d) } } else { @@ -16606,17 +17814,17 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De } } - if yyj1355 < len(yyv1355) { - yyv1355 = yyv1355[:yyj1355] - yyc1355 = true - } else if yyj1355 == 0 && yyv1355 == nil { - yyv1355 = []JobCondition{} - yyc1355 = true + if yyj1455 < len(yyv1455) { + yyv1455 = yyv1455[:yyj1455] + yyc1455 = true + } else if yyj1455 == 0 && yyv1455 == nil { + yyv1455 = []JobCondition{} + yyc1455 = true } } - yyh1355.End() - if yyc1355 { - *v = yyv1355 + yyh1455.End() + if yyc1455 { + *v = yyv1455 } } @@ -16625,10 +17833,10 @@ func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1359 := range v { + for _, yyv1459 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1360 := &yyv1359 - yy1360.CodecEncodeSelf(e) + yy1460 := &yyv1459 + yy1460.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16638,83 +17846,83 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1361 := *v - yyh1361, yyl1361 := z.DecSliceHelperStart() - var yyc1361 bool - if yyl1361 == 0 { - if yyv1361 == nil { - yyv1361 = []Ingress{} - yyc1361 = true - } else if len(yyv1361) != 0 { - yyv1361 = yyv1361[:0] - yyc1361 = true + yyv1461 := *v + yyh1461, yyl1461 := z.DecSliceHelperStart() + var yyc1461 bool + if yyl1461 == 0 { + if yyv1461 == nil { + yyv1461 = []Ingress{} + yyc1461 = true + } else if len(yyv1461) != 0 { + yyv1461 = yyv1461[:0] + yyc1461 = true } - } else if yyl1361 > 0 { - var yyrr1361, yyrl1361 int - var yyrt1361 bool - if yyl1361 > cap(yyv1361) { + } else if yyl1461 > 0 { + var yyrr1461, yyrl1461 int + var yyrt1461 bool + if yyl1461 > cap(yyv1461) { - yyrg1361 := len(yyv1361) > 0 - yyv21361 := yyv1361 - yyrl1361, yyrt1361 = z.DecInferLen(yyl1361, z.DecBasicHandle().MaxInitLen, 248) - if yyrt1361 { - if yyrl1361 <= cap(yyv1361) { - yyv1361 = yyv1361[:yyrl1361] + yyrg1461 := len(yyv1461) > 0 + yyv21461 := yyv1461 + yyrl1461, yyrt1461 = z.DecInferLen(yyl1461, z.DecBasicHandle().MaxInitLen, 248) + if yyrt1461 { + if yyrl1461 <= cap(yyv1461) { + yyv1461 = yyv1461[:yyrl1461] } else { - yyv1361 = make([]Ingress, yyrl1361) + yyv1461 = make([]Ingress, yyrl1461) } } else { - yyv1361 = make([]Ingress, yyrl1361) + yyv1461 = make([]Ingress, yyrl1461) } - yyc1361 = true - yyrr1361 = len(yyv1361) - if yyrg1361 { - copy(yyv1361, yyv21361) + yyc1461 = true + yyrr1461 = len(yyv1461) + if yyrg1461 { + copy(yyv1461, yyv21461) } - } else if yyl1361 != len(yyv1361) { - yyv1361 = yyv1361[:yyl1361] - yyc1361 = true + } else if yyl1461 != len(yyv1461) { + yyv1461 = yyv1461[:yyl1461] + yyc1461 = true } - yyj1361 := 0 - for ; yyj1361 < yyrr1361; yyj1361++ { - yyh1361.ElemContainerState(yyj1361) + yyj1461 := 0 + for ; yyj1461 < yyrr1461; yyj1461++ { + yyh1461.ElemContainerState(yyj1461) if r.TryDecodeAsNil() { - yyv1361[yyj1361] = Ingress{} + yyv1461[yyj1461] = Ingress{} } else { - yyv1362 := &yyv1361[yyj1361] - yyv1362.CodecDecodeSelf(d) + yyv1462 := &yyv1461[yyj1461] + yyv1462.CodecDecodeSelf(d) } } - if yyrt1361 { - for ; yyj1361 < yyl1361; yyj1361++ { - yyv1361 = append(yyv1361, Ingress{}) - yyh1361.ElemContainerState(yyj1361) + if yyrt1461 { + for ; yyj1461 < yyl1461; yyj1461++ { + yyv1461 = append(yyv1461, Ingress{}) + yyh1461.ElemContainerState(yyj1461) if r.TryDecodeAsNil() { - yyv1361[yyj1361] = Ingress{} + yyv1461[yyj1461] = Ingress{} } else { - yyv1363 := &yyv1361[yyj1361] - yyv1363.CodecDecodeSelf(d) + yyv1463 := &yyv1461[yyj1461] + yyv1463.CodecDecodeSelf(d) } } } } else { - yyj1361 := 0 - for ; !r.CheckBreak(); yyj1361++ { + yyj1461 := 0 + for ; !r.CheckBreak(); yyj1461++ { - if yyj1361 >= len(yyv1361) { - yyv1361 = append(yyv1361, Ingress{}) // var yyz1361 Ingress - yyc1361 = true + if yyj1461 >= len(yyv1461) { + yyv1461 = append(yyv1461, Ingress{}) // var yyz1461 Ingress + yyc1461 = true } - yyh1361.ElemContainerState(yyj1361) - if yyj1361 < len(yyv1361) { + yyh1461.ElemContainerState(yyj1461) + if yyj1461 < len(yyv1461) { if r.TryDecodeAsNil() { - yyv1361[yyj1361] = Ingress{} + yyv1461[yyj1461] = Ingress{} } else { - yyv1364 := &yyv1361[yyj1361] - yyv1364.CodecDecodeSelf(d) + yyv1464 := &yyv1461[yyj1461] + yyv1464.CodecDecodeSelf(d) } } else { @@ -16722,17 +17930,17 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { } } - if yyj1361 < len(yyv1361) { - yyv1361 = yyv1361[:yyj1361] - yyc1361 = true - } else if yyj1361 == 0 && yyv1361 == nil { - yyv1361 = []Ingress{} - yyc1361 = true + if yyj1461 < len(yyv1461) { + yyv1461 = yyv1461[:yyj1461] + yyc1461 = true + } else if yyj1461 == 0 && yyv1461 == nil { + yyv1461 = []Ingress{} + yyc1461 = true } } - yyh1361.End() - if yyc1361 { - *v = yyv1361 + yyh1461.End() + if yyc1461 { + *v = yyv1461 } } @@ -16741,10 +17949,10 @@ func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1365 := range v { + for _, yyv1465 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1366 := &yyv1365 - yy1366.CodecEncodeSelf(e) + yy1466 := &yyv1465 + yy1466.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16754,83 +17962,83 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1367 := *v - yyh1367, yyl1367 := z.DecSliceHelperStart() - var yyc1367 bool - if yyl1367 == 0 { - if yyv1367 == nil { - yyv1367 = []IngressRule{} - yyc1367 = true - } else if len(yyv1367) != 0 { - yyv1367 = yyv1367[:0] - yyc1367 = true + yyv1467 := *v + yyh1467, yyl1467 := z.DecSliceHelperStart() + var yyc1467 bool + if yyl1467 == 0 { + if yyv1467 == nil { + yyv1467 = []IngressRule{} + yyc1467 = true + } else if len(yyv1467) != 0 { + yyv1467 = yyv1467[:0] + yyc1467 = true } - } else if yyl1367 > 0 { - var yyrr1367, yyrl1367 int - var yyrt1367 bool - if yyl1367 > cap(yyv1367) { + } else if yyl1467 > 0 { + var yyrr1467, yyrl1467 int + var yyrt1467 bool + if yyl1467 > cap(yyv1467) { - yyrg1367 := len(yyv1367) > 0 - yyv21367 := yyv1367 - yyrl1367, yyrt1367 = z.DecInferLen(yyl1367, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1367 { - if yyrl1367 <= cap(yyv1367) { - yyv1367 = yyv1367[:yyrl1367] + yyrg1467 := len(yyv1467) > 0 + yyv21467 := yyv1467 + yyrl1467, yyrt1467 = z.DecInferLen(yyl1467, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1467 { + if yyrl1467 <= cap(yyv1467) { + yyv1467 = yyv1467[:yyrl1467] } else { - yyv1367 = make([]IngressRule, yyrl1367) + yyv1467 = make([]IngressRule, yyrl1467) } } else { - yyv1367 = make([]IngressRule, yyrl1367) + yyv1467 = make([]IngressRule, yyrl1467) } - yyc1367 = true - yyrr1367 = len(yyv1367) - if yyrg1367 { - copy(yyv1367, yyv21367) + yyc1467 = true + yyrr1467 = len(yyv1467) + if yyrg1467 { + copy(yyv1467, yyv21467) } - } else if yyl1367 != len(yyv1367) { - yyv1367 = yyv1367[:yyl1367] - yyc1367 = true + } else if yyl1467 != len(yyv1467) { + yyv1467 = yyv1467[:yyl1467] + yyc1467 = true } - yyj1367 := 0 - for ; yyj1367 < yyrr1367; yyj1367++ { - yyh1367.ElemContainerState(yyj1367) + yyj1467 := 0 + for ; yyj1467 < yyrr1467; yyj1467++ { + yyh1467.ElemContainerState(yyj1467) if r.TryDecodeAsNil() { - yyv1367[yyj1367] = IngressRule{} + yyv1467[yyj1467] = IngressRule{} } else { - yyv1368 := &yyv1367[yyj1367] - yyv1368.CodecDecodeSelf(d) + yyv1468 := &yyv1467[yyj1467] + yyv1468.CodecDecodeSelf(d) } } - if yyrt1367 { - for ; yyj1367 < yyl1367; yyj1367++ { - yyv1367 = append(yyv1367, IngressRule{}) - yyh1367.ElemContainerState(yyj1367) + if yyrt1467 { + for ; yyj1467 < yyl1467; yyj1467++ { + yyv1467 = append(yyv1467, IngressRule{}) + yyh1467.ElemContainerState(yyj1467) if r.TryDecodeAsNil() { - yyv1367[yyj1367] = IngressRule{} + yyv1467[yyj1467] = IngressRule{} } else { - yyv1369 := &yyv1367[yyj1367] - yyv1369.CodecDecodeSelf(d) + yyv1469 := &yyv1467[yyj1467] + yyv1469.CodecDecodeSelf(d) } } } } else { - yyj1367 := 0 - for ; !r.CheckBreak(); yyj1367++ { + yyj1467 := 0 + for ; !r.CheckBreak(); yyj1467++ { - if yyj1367 >= len(yyv1367) { - yyv1367 = append(yyv1367, IngressRule{}) // var yyz1367 IngressRule - yyc1367 = true + if yyj1467 >= len(yyv1467) { + yyv1467 = append(yyv1467, IngressRule{}) // var yyz1467 IngressRule + yyc1467 = true } - yyh1367.ElemContainerState(yyj1367) - if yyj1367 < len(yyv1367) { + yyh1467.ElemContainerState(yyj1467) + if yyj1467 < len(yyv1467) { if r.TryDecodeAsNil() { - yyv1367[yyj1367] = IngressRule{} + yyv1467[yyj1467] = IngressRule{} } else { - yyv1370 := &yyv1367[yyj1367] - yyv1370.CodecDecodeSelf(d) + yyv1470 := &yyv1467[yyj1467] + yyv1470.CodecDecodeSelf(d) } } else { @@ -16838,17 +18046,17 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco } } - if yyj1367 < len(yyv1367) { - yyv1367 = yyv1367[:yyj1367] - yyc1367 = true - } else if yyj1367 == 0 && yyv1367 == nil { - yyv1367 = []IngressRule{} - yyc1367 = true + if yyj1467 < len(yyv1467) { + yyv1467 = yyv1467[:yyj1467] + yyc1467 = true + } else if yyj1467 == 0 && yyv1467 == nil { + yyv1467 = []IngressRule{} + yyc1467 = true } } - yyh1367.End() - if yyc1367 { - *v = yyv1367 + yyh1467.End() + if yyc1467 { + *v = yyv1467 } } @@ -16857,10 +18065,10 @@ func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1371 := range v { + for _, yyv1471 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1372 := &yyv1371 - yy1372.CodecEncodeSelf(e) + yy1472 := &yyv1471 + yy1472.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16870,83 +18078,83 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1373 := *v - yyh1373, yyl1373 := z.DecSliceHelperStart() - var yyc1373 bool - if yyl1373 == 0 { - if yyv1373 == nil { - yyv1373 = []HTTPIngressPath{} - yyc1373 = true - } else if len(yyv1373) != 0 { - yyv1373 = yyv1373[:0] - yyc1373 = true + yyv1473 := *v + yyh1473, yyl1473 := z.DecSliceHelperStart() + var yyc1473 bool + if yyl1473 == 0 { + if yyv1473 == nil { + yyv1473 = []HTTPIngressPath{} + yyc1473 = true + } else if len(yyv1473) != 0 { + yyv1473 = yyv1473[:0] + yyc1473 = true } - } else if yyl1373 > 0 { - var yyrr1373, yyrl1373 int - var yyrt1373 bool - if yyl1373 > cap(yyv1373) { + } else if yyl1473 > 0 { + var yyrr1473, yyrl1473 int + var yyrt1473 bool + if yyl1473 > cap(yyv1473) { - yyrg1373 := len(yyv1373) > 0 - yyv21373 := yyv1373 - yyrl1373, yyrt1373 = z.DecInferLen(yyl1373, z.DecBasicHandle().MaxInitLen, 64) - if yyrt1373 { - if yyrl1373 <= cap(yyv1373) { - yyv1373 = yyv1373[:yyrl1373] + yyrg1473 := len(yyv1473) > 0 + yyv21473 := yyv1473 + yyrl1473, yyrt1473 = z.DecInferLen(yyl1473, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1473 { + if yyrl1473 <= cap(yyv1473) { + yyv1473 = yyv1473[:yyrl1473] } else { - yyv1373 = make([]HTTPIngressPath, yyrl1373) + yyv1473 = make([]HTTPIngressPath, yyrl1473) } } else { - yyv1373 = make([]HTTPIngressPath, yyrl1373) + yyv1473 = make([]HTTPIngressPath, yyrl1473) } - yyc1373 = true - yyrr1373 = len(yyv1373) - if yyrg1373 { - copy(yyv1373, yyv21373) + yyc1473 = true + yyrr1473 = len(yyv1473) + if yyrg1473 { + copy(yyv1473, yyv21473) } - } else if yyl1373 != len(yyv1373) { - yyv1373 = yyv1373[:yyl1373] - yyc1373 = true + } else if yyl1473 != len(yyv1473) { + yyv1473 = yyv1473[:yyl1473] + yyc1473 = true } - yyj1373 := 0 - for ; yyj1373 < yyrr1373; yyj1373++ { - yyh1373.ElemContainerState(yyj1373) + yyj1473 := 0 + for ; yyj1473 < yyrr1473; yyj1473++ { + yyh1473.ElemContainerState(yyj1473) if r.TryDecodeAsNil() { - yyv1373[yyj1373] = HTTPIngressPath{} + yyv1473[yyj1473] = HTTPIngressPath{} } else { - yyv1374 := &yyv1373[yyj1373] - yyv1374.CodecDecodeSelf(d) + yyv1474 := &yyv1473[yyj1473] + yyv1474.CodecDecodeSelf(d) } } - if yyrt1373 { - for ; yyj1373 < yyl1373; yyj1373++ { - yyv1373 = append(yyv1373, HTTPIngressPath{}) - yyh1373.ElemContainerState(yyj1373) + if yyrt1473 { + for ; yyj1473 < yyl1473; yyj1473++ { + yyv1473 = append(yyv1473, HTTPIngressPath{}) + yyh1473.ElemContainerState(yyj1473) if r.TryDecodeAsNil() { - yyv1373[yyj1373] = HTTPIngressPath{} + yyv1473[yyj1473] = HTTPIngressPath{} } else { - yyv1375 := &yyv1373[yyj1373] - yyv1375.CodecDecodeSelf(d) + yyv1475 := &yyv1473[yyj1473] + yyv1475.CodecDecodeSelf(d) } } } } else { - yyj1373 := 0 - for ; !r.CheckBreak(); yyj1373++ { + yyj1473 := 0 + for ; !r.CheckBreak(); yyj1473++ { - if yyj1373 >= len(yyv1373) { - yyv1373 = append(yyv1373, HTTPIngressPath{}) // var yyz1373 HTTPIngressPath - yyc1373 = true + if yyj1473 >= len(yyv1473) { + yyv1473 = append(yyv1473, HTTPIngressPath{}) // var yyz1473 HTTPIngressPath + yyc1473 = true } - yyh1373.ElemContainerState(yyj1373) - if yyj1373 < len(yyv1373) { + yyh1473.ElemContainerState(yyj1473) + if yyj1473 < len(yyv1473) { if r.TryDecodeAsNil() { - yyv1373[yyj1373] = HTTPIngressPath{} + yyv1473[yyj1473] = HTTPIngressPath{} } else { - yyv1376 := &yyv1373[yyj1373] - yyv1376.CodecDecodeSelf(d) + yyv1476 := &yyv1473[yyj1473] + yyv1476.CodecDecodeSelf(d) } } else { @@ -16954,17 +18162,17 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 } } - if yyj1373 < len(yyv1373) { - yyv1373 = yyv1373[:yyj1373] - yyc1373 = true - } else if yyj1373 == 0 && yyv1373 == nil { - yyv1373 = []HTTPIngressPath{} - yyc1373 = true + if yyj1473 < len(yyv1473) { + yyv1473 = yyv1473[:yyj1473] + yyc1473 = true + } else if yyj1473 == 0 && yyv1473 == nil { + yyv1473 = []HTTPIngressPath{} + yyc1473 = true } } - yyh1373.End() - if yyc1373 { - *v = yyv1373 + yyh1473.End() + if yyc1473 { + *v = yyv1473 } } @@ -16973,10 +18181,10 @@ func (x codecSelfer1234) encSliceNodeUtilization(v []NodeUtilization, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1377 := range v { + for _, yyv1477 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1378 := &yyv1377 - yy1378.CodecEncodeSelf(e) + yy1478 := &yyv1477 + yy1478.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16986,83 +18194,83 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1379 := *v - yyh1379, yyl1379 := z.DecSliceHelperStart() - var yyc1379 bool - if yyl1379 == 0 { - if yyv1379 == nil { - yyv1379 = []NodeUtilization{} - yyc1379 = true - } else if len(yyv1379) != 0 { - yyv1379 = yyv1379[:0] - yyc1379 = true + yyv1479 := *v + yyh1479, yyl1479 := z.DecSliceHelperStart() + var yyc1479 bool + if yyl1479 == 0 { + if yyv1479 == nil { + yyv1479 = []NodeUtilization{} + yyc1479 = true + } else if len(yyv1479) != 0 { + yyv1479 = yyv1479[:0] + yyc1479 = true } - } else if yyl1379 > 0 { - var yyrr1379, yyrl1379 int - var yyrt1379 bool - if yyl1379 > cap(yyv1379) { + } else if yyl1479 > 0 { + var yyrr1479, yyrl1479 int + var yyrt1479 bool + if yyl1479 > cap(yyv1479) { - yyrg1379 := len(yyv1379) > 0 - yyv21379 := yyv1379 - yyrl1379, yyrt1379 = z.DecInferLen(yyl1379, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1379 { - if yyrl1379 <= cap(yyv1379) { - yyv1379 = yyv1379[:yyrl1379] + yyrg1479 := len(yyv1479) > 0 + yyv21479 := yyv1479 + yyrl1479, yyrt1479 = z.DecInferLen(yyl1479, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1479 { + if yyrl1479 <= cap(yyv1479) { + yyv1479 = yyv1479[:yyrl1479] } else { - yyv1379 = make([]NodeUtilization, yyrl1379) + yyv1479 = make([]NodeUtilization, yyrl1479) } } else { - yyv1379 = make([]NodeUtilization, yyrl1379) + yyv1479 = make([]NodeUtilization, yyrl1479) } - yyc1379 = true - yyrr1379 = len(yyv1379) - if yyrg1379 { - copy(yyv1379, yyv21379) + yyc1479 = true + yyrr1479 = len(yyv1479) + if yyrg1479 { + copy(yyv1479, yyv21479) } - } else if yyl1379 != len(yyv1379) { - yyv1379 = yyv1379[:yyl1379] - yyc1379 = true + } else if yyl1479 != len(yyv1479) { + yyv1479 = yyv1479[:yyl1479] + yyc1479 = true } - yyj1379 := 0 - for ; yyj1379 < yyrr1379; yyj1379++ { - yyh1379.ElemContainerState(yyj1379) + yyj1479 := 0 + for ; yyj1479 < yyrr1479; yyj1479++ { + yyh1479.ElemContainerState(yyj1479) if r.TryDecodeAsNil() { - yyv1379[yyj1379] = NodeUtilization{} + yyv1479[yyj1479] = NodeUtilization{} } else { - yyv1380 := &yyv1379[yyj1379] - yyv1380.CodecDecodeSelf(d) + yyv1480 := &yyv1479[yyj1479] + yyv1480.CodecDecodeSelf(d) } } - if yyrt1379 { - for ; yyj1379 < yyl1379; yyj1379++ { - yyv1379 = append(yyv1379, NodeUtilization{}) - yyh1379.ElemContainerState(yyj1379) + if yyrt1479 { + for ; yyj1479 < yyl1479; yyj1479++ { + yyv1479 = append(yyv1479, NodeUtilization{}) + yyh1479.ElemContainerState(yyj1479) if r.TryDecodeAsNil() { - yyv1379[yyj1379] = NodeUtilization{} + yyv1479[yyj1479] = NodeUtilization{} } else { - yyv1381 := &yyv1379[yyj1379] - yyv1381.CodecDecodeSelf(d) + yyv1481 := &yyv1479[yyj1479] + yyv1481.CodecDecodeSelf(d) } } } } else { - yyj1379 := 0 - for ; !r.CheckBreak(); yyj1379++ { + yyj1479 := 0 + for ; !r.CheckBreak(); yyj1479++ { - if yyj1379 >= len(yyv1379) { - yyv1379 = append(yyv1379, NodeUtilization{}) // var yyz1379 NodeUtilization - yyc1379 = true + if yyj1479 >= len(yyv1479) { + yyv1479 = append(yyv1479, NodeUtilization{}) // var yyz1479 NodeUtilization + yyc1479 = true } - yyh1379.ElemContainerState(yyj1379) - if yyj1379 < len(yyv1379) { + yyh1479.ElemContainerState(yyj1479) + if yyj1479 < len(yyv1479) { if r.TryDecodeAsNil() { - yyv1379[yyj1379] = NodeUtilization{} + yyv1479[yyj1479] = NodeUtilization{} } else { - yyv1382 := &yyv1379[yyj1379] - yyv1382.CodecDecodeSelf(d) + yyv1482 := &yyv1479[yyj1479] + yyv1482.CodecDecodeSelf(d) } } else { @@ -17070,17 +18278,17 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 } } - if yyj1379 < len(yyv1379) { - yyv1379 = yyv1379[:yyj1379] - yyc1379 = true - } else if yyj1379 == 0 && yyv1379 == nil { - yyv1379 = []NodeUtilization{} - yyc1379 = true + if yyj1479 < len(yyv1479) { + yyv1479 = yyv1479[:yyj1479] + yyc1479 = true + } else if yyj1479 == 0 && yyv1479 == nil { + yyv1479 = []NodeUtilization{} + yyc1479 = true } } - yyh1379.End() - if yyc1379 { - *v = yyv1379 + yyh1479.End() + if yyc1479 { + *v = yyv1479 } } @@ -17089,10 +18297,10 @@ func (x codecSelfer1234) encSliceClusterAutoscaler(v []ClusterAutoscaler, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1383 := range v { + for _, yyv1483 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1384 := &yyv1383 - yy1384.CodecEncodeSelf(e) + yy1484 := &yyv1483 + yy1484.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17102,83 +18310,83 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1385 := *v - yyh1385, yyl1385 := z.DecSliceHelperStart() - var yyc1385 bool - if yyl1385 == 0 { - if yyv1385 == nil { - yyv1385 = []ClusterAutoscaler{} - yyc1385 = true - } else if len(yyv1385) != 0 { - yyv1385 = yyv1385[:0] - yyc1385 = true + yyv1485 := *v + yyh1485, yyl1485 := z.DecSliceHelperStart() + var yyc1485 bool + if yyl1485 == 0 { + if yyv1485 == nil { + yyv1485 = []ClusterAutoscaler{} + yyc1485 = true + } else if len(yyv1485) != 0 { + yyv1485 = yyv1485[:0] + yyc1485 = true } - } else if yyl1385 > 0 { - var yyrr1385, yyrl1385 int - var yyrt1385 bool - if yyl1385 > cap(yyv1385) { + } else if yyl1485 > 0 { + var yyrr1485, yyrl1485 int + var yyrt1485 bool + if yyl1485 > cap(yyv1485) { - yyrg1385 := len(yyv1385) > 0 - yyv21385 := yyv1385 - yyrl1385, yyrt1385 = z.DecInferLen(yyl1385, z.DecBasicHandle().MaxInitLen, 224) - if yyrt1385 { - if yyrl1385 <= cap(yyv1385) { - yyv1385 = yyv1385[:yyrl1385] + yyrg1485 := len(yyv1485) > 0 + yyv21485 := yyv1485 + yyrl1485, yyrt1485 = z.DecInferLen(yyl1485, z.DecBasicHandle().MaxInitLen, 224) + if yyrt1485 { + if yyrl1485 <= cap(yyv1485) { + yyv1485 = yyv1485[:yyrl1485] } else { - yyv1385 = make([]ClusterAutoscaler, yyrl1385) + yyv1485 = make([]ClusterAutoscaler, yyrl1485) } } else { - yyv1385 = make([]ClusterAutoscaler, yyrl1385) + yyv1485 = make([]ClusterAutoscaler, yyrl1485) } - yyc1385 = true - yyrr1385 = len(yyv1385) - if yyrg1385 { - copy(yyv1385, yyv21385) + yyc1485 = true + yyrr1485 = len(yyv1485) + if yyrg1485 { + copy(yyv1485, yyv21485) } - } else if yyl1385 != len(yyv1385) { - yyv1385 = yyv1385[:yyl1385] - yyc1385 = true + } else if yyl1485 != len(yyv1485) { + yyv1485 = yyv1485[:yyl1485] + yyc1485 = true } - yyj1385 := 0 - for ; yyj1385 < yyrr1385; yyj1385++ { - yyh1385.ElemContainerState(yyj1385) + yyj1485 := 0 + for ; yyj1485 < yyrr1485; yyj1485++ { + yyh1485.ElemContainerState(yyj1485) if r.TryDecodeAsNil() { - yyv1385[yyj1385] = ClusterAutoscaler{} + yyv1485[yyj1485] = ClusterAutoscaler{} } else { - yyv1386 := &yyv1385[yyj1385] - yyv1386.CodecDecodeSelf(d) + yyv1486 := &yyv1485[yyj1485] + yyv1486.CodecDecodeSelf(d) } } - if yyrt1385 { - for ; yyj1385 < yyl1385; yyj1385++ { - yyv1385 = append(yyv1385, ClusterAutoscaler{}) - yyh1385.ElemContainerState(yyj1385) + if yyrt1485 { + for ; yyj1485 < yyl1485; yyj1485++ { + yyv1485 = append(yyv1485, ClusterAutoscaler{}) + yyh1485.ElemContainerState(yyj1485) if r.TryDecodeAsNil() { - yyv1385[yyj1385] = ClusterAutoscaler{} + yyv1485[yyj1485] = ClusterAutoscaler{} } else { - yyv1387 := &yyv1385[yyj1385] - yyv1387.CodecDecodeSelf(d) + yyv1487 := &yyv1485[yyj1485] + yyv1487.CodecDecodeSelf(d) } } } } else { - yyj1385 := 0 - for ; !r.CheckBreak(); yyj1385++ { + yyj1485 := 0 + for ; !r.CheckBreak(); yyj1485++ { - if yyj1385 >= len(yyv1385) { - yyv1385 = append(yyv1385, ClusterAutoscaler{}) // var yyz1385 ClusterAutoscaler - yyc1385 = true + if yyj1485 >= len(yyv1485) { + yyv1485 = append(yyv1485, ClusterAutoscaler{}) // var yyz1485 ClusterAutoscaler + yyc1485 = true } - yyh1385.ElemContainerState(yyj1385) - if yyj1385 < len(yyv1385) { + yyh1485.ElemContainerState(yyj1485) + if yyj1485 < len(yyv1485) { if r.TryDecodeAsNil() { - yyv1385[yyj1385] = ClusterAutoscaler{} + yyv1485[yyj1485] = ClusterAutoscaler{} } else { - yyv1388 := &yyv1385[yyj1385] - yyv1388.CodecDecodeSelf(d) + yyv1488 := &yyv1485[yyj1485] + yyv1488.CodecDecodeSelf(d) } } else { @@ -17186,17 +18394,17 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co } } - if yyj1385 < len(yyv1385) { - yyv1385 = yyv1385[:yyj1385] - yyc1385 = true - } else if yyj1385 == 0 && yyv1385 == nil { - yyv1385 = []ClusterAutoscaler{} - yyc1385 = true + if yyj1485 < len(yyv1485) { + yyv1485 = yyv1485[:yyj1485] + yyc1485 = true + } else if yyj1485 == 0 && yyv1485 == nil { + yyv1485 = []ClusterAutoscaler{} + yyc1485 = true } } - yyh1385.End() - if yyc1385 { - *v = yyv1385 + yyh1485.End() + if yyc1485 { + *v = yyv1485 } } @@ -17205,10 +18413,10 @@ func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequi z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1389 := range v { + for _, yyv1489 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1390 := &yyv1389 - yy1390.CodecEncodeSelf(e) + yy1490 := &yyv1489 + yy1490.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17218,83 +18426,83 @@ func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequ z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1391 := *v - yyh1391, yyl1391 := z.DecSliceHelperStart() - var yyc1391 bool - if yyl1391 == 0 { - if yyv1391 == nil { - yyv1391 = []LabelSelectorRequirement{} - yyc1391 = true - } else if len(yyv1391) != 0 { - yyv1391 = yyv1391[:0] - yyc1391 = true + yyv1491 := *v + yyh1491, yyl1491 := z.DecSliceHelperStart() + var yyc1491 bool + if yyl1491 == 0 { + if yyv1491 == nil { + yyv1491 = []LabelSelectorRequirement{} + yyc1491 = true + } else if len(yyv1491) != 0 { + yyv1491 = yyv1491[:0] + yyc1491 = true } - } else if yyl1391 > 0 { - var yyrr1391, yyrl1391 int - var yyrt1391 bool - if yyl1391 > cap(yyv1391) { + } else if yyl1491 > 0 { + var yyrr1491, yyrl1491 int + var yyrt1491 bool + if yyl1491 > cap(yyv1491) { - yyrg1391 := len(yyv1391) > 0 - yyv21391 := yyv1391 - yyrl1391, yyrt1391 = z.DecInferLen(yyl1391, z.DecBasicHandle().MaxInitLen, 56) - if yyrt1391 { - if yyrl1391 <= cap(yyv1391) { - yyv1391 = yyv1391[:yyrl1391] + yyrg1491 := len(yyv1491) > 0 + yyv21491 := yyv1491 + yyrl1491, yyrt1491 = z.DecInferLen(yyl1491, z.DecBasicHandle().MaxInitLen, 56) + if yyrt1491 { + if yyrl1491 <= cap(yyv1491) { + yyv1491 = yyv1491[:yyrl1491] } else { - yyv1391 = make([]LabelSelectorRequirement, yyrl1391) + yyv1491 = make([]LabelSelectorRequirement, yyrl1491) } } else { - yyv1391 = make([]LabelSelectorRequirement, yyrl1391) + yyv1491 = make([]LabelSelectorRequirement, yyrl1491) } - yyc1391 = true - yyrr1391 = len(yyv1391) - if yyrg1391 { - copy(yyv1391, yyv21391) + yyc1491 = true + yyrr1491 = len(yyv1491) + if yyrg1491 { + copy(yyv1491, yyv21491) } - } else if yyl1391 != len(yyv1391) { - yyv1391 = yyv1391[:yyl1391] - yyc1391 = true + } else if yyl1491 != len(yyv1491) { + yyv1491 = yyv1491[:yyl1491] + yyc1491 = true } - yyj1391 := 0 - for ; yyj1391 < yyrr1391; yyj1391++ { - yyh1391.ElemContainerState(yyj1391) + yyj1491 := 0 + for ; yyj1491 < yyrr1491; yyj1491++ { + yyh1491.ElemContainerState(yyj1491) if r.TryDecodeAsNil() { - yyv1391[yyj1391] = LabelSelectorRequirement{} + yyv1491[yyj1491] = LabelSelectorRequirement{} } else { - yyv1392 := &yyv1391[yyj1391] - yyv1392.CodecDecodeSelf(d) + yyv1492 := &yyv1491[yyj1491] + yyv1492.CodecDecodeSelf(d) } } - if yyrt1391 { - for ; yyj1391 < yyl1391; yyj1391++ { - yyv1391 = append(yyv1391, LabelSelectorRequirement{}) - yyh1391.ElemContainerState(yyj1391) + if yyrt1491 { + for ; yyj1491 < yyl1491; yyj1491++ { + yyv1491 = append(yyv1491, LabelSelectorRequirement{}) + yyh1491.ElemContainerState(yyj1491) if r.TryDecodeAsNil() { - yyv1391[yyj1391] = LabelSelectorRequirement{} + yyv1491[yyj1491] = LabelSelectorRequirement{} } else { - yyv1393 := &yyv1391[yyj1391] - yyv1393.CodecDecodeSelf(d) + yyv1493 := &yyv1491[yyj1491] + yyv1493.CodecDecodeSelf(d) } } } } else { - yyj1391 := 0 - for ; !r.CheckBreak(); yyj1391++ { + yyj1491 := 0 + for ; !r.CheckBreak(); yyj1491++ { - if yyj1391 >= len(yyv1391) { - yyv1391 = append(yyv1391, LabelSelectorRequirement{}) // var yyz1391 LabelSelectorRequirement - yyc1391 = true + if yyj1491 >= len(yyv1491) { + yyv1491 = append(yyv1491, LabelSelectorRequirement{}) // var yyz1491 LabelSelectorRequirement + yyc1491 = true } - yyh1391.ElemContainerState(yyj1391) - if yyj1391 < len(yyv1391) { + yyh1491.ElemContainerState(yyj1491) + if yyj1491 < len(yyv1491) { if r.TryDecodeAsNil() { - yyv1391[yyj1391] = LabelSelectorRequirement{} + yyv1491[yyj1491] = LabelSelectorRequirement{} } else { - yyv1394 := &yyv1391[yyj1391] - yyv1394.CodecDecodeSelf(d) + yyv1494 := &yyv1491[yyj1491] + yyv1494.CodecDecodeSelf(d) } } else { @@ -17302,17 +18510,17 @@ func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequ } } - if yyj1391 < len(yyv1391) { - yyv1391 = yyv1391[:yyj1391] - yyc1391 = true - } else if yyj1391 == 0 && yyv1391 == nil { - yyv1391 = []LabelSelectorRequirement{} - yyc1391 = true + if yyj1491 < len(yyv1491) { + yyv1491 = yyv1491[:yyj1491] + yyc1491 = true + } else if yyj1491 == 0 && yyv1491 == nil { + yyv1491 = []LabelSelectorRequirement{} + yyc1491 = true } } - yyh1391.End() - if yyc1391 { - *v = yyv1391 + yyh1491.End() + if yyc1491 { + *v = yyv1491 } } @@ -17321,10 +18529,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1395 := range v { + for _, yyv1495 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1396 := &yyv1395 - yy1396.CodecEncodeSelf(e) + yy1496 := &yyv1495 + yy1496.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17334,83 +18542,83 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1397 := *v - yyh1397, yyl1397 := z.DecSliceHelperStart() - var yyc1397 bool - if yyl1397 == 0 { - if yyv1397 == nil { - yyv1397 = []ConfigMap{} - yyc1397 = true - } else if len(yyv1397) != 0 { - yyv1397 = yyv1397[:0] - yyc1397 = true + yyv1497 := *v + yyh1497, yyl1497 := z.DecSliceHelperStart() + var yyc1497 bool + if yyl1497 == 0 { + if yyv1497 == nil { + yyv1497 = []ConfigMap{} + yyc1497 = true + } else if len(yyv1497) != 0 { + yyv1497 = yyv1497[:0] + yyc1497 = true } - } else if yyl1397 > 0 { - var yyrr1397, yyrl1397 int - var yyrt1397 bool - if yyl1397 > cap(yyv1397) { + } else if yyl1497 > 0 { + var yyrr1497, yyrl1497 int + var yyrt1497 bool + if yyl1497 > cap(yyv1497) { - yyrg1397 := len(yyv1397) > 0 - yyv21397 := yyv1397 - yyrl1397, yyrt1397 = z.DecInferLen(yyl1397, z.DecBasicHandle().MaxInitLen, 200) - if yyrt1397 { - if yyrl1397 <= cap(yyv1397) { - yyv1397 = yyv1397[:yyrl1397] + yyrg1497 := len(yyv1497) > 0 + yyv21497 := yyv1497 + yyrl1497, yyrt1497 = z.DecInferLen(yyl1497, z.DecBasicHandle().MaxInitLen, 200) + if yyrt1497 { + if yyrl1497 <= cap(yyv1497) { + yyv1497 = yyv1497[:yyrl1497] } else { - yyv1397 = make([]ConfigMap, yyrl1397) + yyv1497 = make([]ConfigMap, yyrl1497) } } else { - yyv1397 = make([]ConfigMap, yyrl1397) + yyv1497 = make([]ConfigMap, yyrl1497) } - yyc1397 = true - yyrr1397 = len(yyv1397) - if yyrg1397 { - copy(yyv1397, yyv21397) + yyc1497 = true + yyrr1497 = len(yyv1497) + if yyrg1497 { + copy(yyv1497, yyv21497) } - } else if yyl1397 != len(yyv1397) { - yyv1397 = yyv1397[:yyl1397] - yyc1397 = true + } else if yyl1497 != len(yyv1497) { + yyv1497 = yyv1497[:yyl1497] + yyc1497 = true } - yyj1397 := 0 - for ; yyj1397 < yyrr1397; yyj1397++ { - yyh1397.ElemContainerState(yyj1397) + yyj1497 := 0 + for ; yyj1497 < yyrr1497; yyj1497++ { + yyh1497.ElemContainerState(yyj1497) if r.TryDecodeAsNil() { - yyv1397[yyj1397] = ConfigMap{} + yyv1497[yyj1497] = ConfigMap{} } else { - yyv1398 := &yyv1397[yyj1397] - yyv1398.CodecDecodeSelf(d) + yyv1498 := &yyv1497[yyj1497] + yyv1498.CodecDecodeSelf(d) } } - if yyrt1397 { - for ; yyj1397 < yyl1397; yyj1397++ { - yyv1397 = append(yyv1397, ConfigMap{}) - yyh1397.ElemContainerState(yyj1397) + if yyrt1497 { + for ; yyj1497 < yyl1497; yyj1497++ { + yyv1497 = append(yyv1497, ConfigMap{}) + yyh1497.ElemContainerState(yyj1497) if r.TryDecodeAsNil() { - yyv1397[yyj1397] = ConfigMap{} + yyv1497[yyj1497] = ConfigMap{} } else { - yyv1399 := &yyv1397[yyj1397] - yyv1399.CodecDecodeSelf(d) + yyv1499 := &yyv1497[yyj1497] + yyv1499.CodecDecodeSelf(d) } } } } else { - yyj1397 := 0 - for ; !r.CheckBreak(); yyj1397++ { + yyj1497 := 0 + for ; !r.CheckBreak(); yyj1497++ { - if yyj1397 >= len(yyv1397) { - yyv1397 = append(yyv1397, ConfigMap{}) // var yyz1397 ConfigMap - yyc1397 = true + if yyj1497 >= len(yyv1497) { + yyv1497 = append(yyv1497, ConfigMap{}) // var yyz1497 ConfigMap + yyc1497 = true } - yyh1397.ElemContainerState(yyj1397) - if yyj1397 < len(yyv1397) { + yyh1497.ElemContainerState(yyj1497) + if yyj1497 < len(yyv1497) { if r.TryDecodeAsNil() { - yyv1397[yyj1397] = ConfigMap{} + yyv1497[yyj1497] = ConfigMap{} } else { - yyv1400 := &yyv1397[yyj1397] - yyv1400.CodecDecodeSelf(d) + yyv1500 := &yyv1497[yyj1497] + yyv1500.CodecDecodeSelf(d) } } else { @@ -17418,16 +18626,132 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj1397 < len(yyv1397) { - yyv1397 = yyv1397[:yyj1397] - yyc1397 = true - } else if yyj1397 == 0 && yyv1397 == nil { - yyv1397 = []ConfigMap{} - yyc1397 = true + if yyj1497 < len(yyv1497) { + yyv1497 = yyv1497[:yyj1497] + yyc1497 = true + } else if yyj1497 == 0 && yyv1497 == nil { + yyv1497 = []ConfigMap{} + yyc1497 = true } } - yyh1397.End() - if yyc1397 { - *v = yyv1397 + yyh1497.End() + if yyc1497 { + *v = yyv1497 + } +} + +func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1501 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1502 := &yyv1501 + yy1502.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1503 := *v + yyh1503, yyl1503 := z.DecSliceHelperStart() + var yyc1503 bool + if yyl1503 == 0 { + if yyv1503 == nil { + yyv1503 = []ReplicaSet{} + yyc1503 = true + } else if len(yyv1503) != 0 { + yyv1503 = yyv1503[:0] + yyc1503 = true + } + } else if yyl1503 > 0 { + var yyrr1503, yyrl1503 int + var yyrt1503 bool + if yyl1503 > cap(yyv1503) { + + yyrg1503 := len(yyv1503) > 0 + yyv21503 := yyv1503 + yyrl1503, yyrt1503 = z.DecInferLen(yyl1503, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1503 { + if yyrl1503 <= cap(yyv1503) { + yyv1503 = yyv1503[:yyrl1503] + } else { + yyv1503 = make([]ReplicaSet, yyrl1503) + } + } else { + yyv1503 = make([]ReplicaSet, yyrl1503) + } + yyc1503 = true + yyrr1503 = len(yyv1503) + if yyrg1503 { + copy(yyv1503, yyv21503) + } + } else if yyl1503 != len(yyv1503) { + yyv1503 = yyv1503[:yyl1503] + yyc1503 = true + } + yyj1503 := 0 + for ; yyj1503 < yyrr1503; yyj1503++ { + yyh1503.ElemContainerState(yyj1503) + if r.TryDecodeAsNil() { + yyv1503[yyj1503] = ReplicaSet{} + } else { + yyv1504 := &yyv1503[yyj1503] + yyv1504.CodecDecodeSelf(d) + } + + } + if yyrt1503 { + for ; yyj1503 < yyl1503; yyj1503++ { + yyv1503 = append(yyv1503, ReplicaSet{}) + yyh1503.ElemContainerState(yyj1503) + if r.TryDecodeAsNil() { + yyv1503[yyj1503] = ReplicaSet{} + } else { + yyv1505 := &yyv1503[yyj1503] + yyv1505.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1503 := 0 + for ; !r.CheckBreak(); yyj1503++ { + + if yyj1503 >= len(yyv1503) { + yyv1503 = append(yyv1503, ReplicaSet{}) // var yyz1503 ReplicaSet + yyc1503 = true + } + yyh1503.ElemContainerState(yyj1503) + if yyj1503 < len(yyv1503) { + if r.TryDecodeAsNil() { + yyv1503[yyj1503] = ReplicaSet{} + } else { + yyv1506 := &yyv1503[yyj1503] + yyv1506.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1503 < len(yyv1503) { + yyv1503 = yyv1503[:yyj1503] + yyc1503 = true + } else if yyj1503 == 0 && yyv1503 == nil { + yyv1503 = []ReplicaSet{} + yyc1503 = true + } + } + yyh1503.End() + if yyc1503 { + *v = yyv1503 } } diff --git a/pkg/apis/extensions/v1beta1/types.go b/pkg/apis/extensions/v1beta1/types.go index ba7339fc154..3c0e4206ead 100644 --- a/pkg/apis/extensions/v1beta1/types.go +++ b/pkg/apis/extensions/v1beta1/types.go @@ -819,3 +819,66 @@ type ConfigMapList struct { // Items is the list of ConfigMaps. Items []ConfigMap `json:"items,omitempty"` } + +// ReplicaSet represents the configuration of a ReplicaSet. +type ReplicaSet struct { + unversioned.TypeMeta `json:",inline"` + + // If the Labels of a ReplicaSet are empty, they are defaulted to + // be the same as the Pod(s) that the ReplicaSet manages. + // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + v1.ObjectMeta `json:"metadata,omitempty"` + + // Spec defines the specification of the desired behavior of the ReplicaSet. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + Spec ReplicaSetSpec `json:"spec,omitempty"` + + // Status is the most recently observed status of the ReplicaSet. + // This data may be out of date by some window of time. + // Populated by the system. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + Status ReplicaSetStatus `json:"status,omitempty"` +} + +// ReplicaSetList is a collection of ReplicaSets. +type ReplicaSetList struct { + unversioned.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + unversioned.ListMeta `json:"metadata,omitempty"` + + // List of ReplicaSets. + // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md + Items []ReplicaSet `json:"items"` +} + +// ReplicaSetSpec is the specification of a ReplicaSet. +type ReplicaSetSpec struct { + // Replicas is the number of desired replicas. + // This is a pointer to distinguish between explicit zero and unspecified. + // Defaults to 1. + // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller + Replicas *int32 `json:"replicas,omitempty"` + + // Selector is a label query over pods that should match the replica count. + // If the selector is empty, it is defaulted to the labels present on the pod template. + // Label keys and values that must match in order to be controlled by this replica set. + // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + Selector *LabelSelector `json:"selector,omitempty"` + + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. + // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template + Template *v1.PodTemplateSpec `json:"template,omitempty"` +} + +// ReplicaSetStatus represents the current status of a ReplicaSet. +type ReplicaSetStatus struct { + // Replicas is the most recently oberved number of replicas. + // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller + Replicas int32 `json:"replicas"` + + // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} diff --git a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go index 1dd3e28856c..686c0f2b2bd 100644 --- a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go @@ -448,6 +448,48 @@ func (NodeUtilization) SwaggerDoc() map[string]string { return map_NodeUtilization } +var map_ReplicaSet = map[string]string{ + "": "ReplicaSet represents the configuration of a ReplicaSet.", + "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", +} + +func (ReplicaSet) SwaggerDoc() map[string]string { + return map_ReplicaSet +} + +var map_ReplicaSetList = map[string]string{ + "": "ReplicaSetList is a collection of ReplicaSets.", + "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "items": "List of ReplicaSets. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md", +} + +func (ReplicaSetList) SwaggerDoc() map[string]string { + return map_ReplicaSetList +} + +var map_ReplicaSetSpec = map[string]string{ + "": "ReplicaSetSpec is the specification of a ReplicaSet.", + "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller", + "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. 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 if insufficient replicas are detected. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template", +} + +func (ReplicaSetSpec) SwaggerDoc() map[string]string { + return map_ReplicaSetSpec +} + +var map_ReplicaSetStatus = map[string]string{ + "": "ReplicaSetStatus represents the current status of a ReplicaSet.", + "replicas": "Replicas is the most recently oberved number of replicas. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller", + "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", +} + +func (ReplicaSetStatus) SwaggerDoc() map[string]string { + return map_ReplicaSetStatus +} + var map_ReplicationControllerDummy = map[string]string{ "": "Dummy definition", } diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index 79ff6624d22..fa9fa491a55 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -655,6 +655,86 @@ func ValidateConfigMapUpdate(newCfg, oldCfg *extensions.ConfigMap) field.ErrorLi allErrs := field.ErrorList{} allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&newCfg.ObjectMeta, &oldCfg.ObjectMeta, field.NewPath("metadata"))...) allErrs = append(allErrs, ValidateConfigMap(newCfg)...) - + return allErrs +} + +// ValidateReplicaSetName can be used to check whether the given ReplicaSet +// name is valid. +// Prefix indicates this name will be used as part of generation, in which case +// trailing dashes are allowed. +func ValidateReplicaSetName(name string, prefix bool) (bool, string) { + return apivalidation.NameIsDNSSubdomain(name, prefix) +} + +// ValidateReplicaSet tests if required fields in the ReplicaSet are set. +func ValidateReplicaSet(rs *extensions.ReplicaSet) field.ErrorList { + allErrs := apivalidation.ValidateObjectMeta(&rs.ObjectMeta, true, ValidateReplicaSetName, field.NewPath("metadata")) + allErrs = append(allErrs, ValidateReplicaSetSpec(&rs.Spec, field.NewPath("spec"))...) + return allErrs +} + +// ValidateReplicaSetUpdate tests if required fields in the ReplicaSet are set. +func ValidateReplicaSetUpdate(rs, oldRs *extensions.ReplicaSet) field.ErrorList { + allErrs := field.ErrorList{} + allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&rs.ObjectMeta, &oldRs.ObjectMeta, field.NewPath("metadata"))...) + allErrs = append(allErrs, ValidateReplicaSetSpec(&rs.Spec, field.NewPath("spec"))...) + return allErrs +} + +// ValidateReplicaSetStatusUpdate tests if required fields in the ReplicaSet are set. +func ValidateReplicaSetStatusUpdate(rs, oldRs *extensions.ReplicaSet) field.ErrorList { + allErrs := field.ErrorList{} + allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&rs.ObjectMeta, &oldRs.ObjectMeta, field.NewPath("metadata"))...) + allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(rs.Status.Replicas), field.NewPath("status", "replicas"))...) + allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(rs.Status.ObservedGeneration), field.NewPath("status", "observedGeneration"))...) + return allErrs +} + +// ValidateReplicaSetSpec tests if required fields in the ReplicaSet spec are set. +func ValidateReplicaSetSpec(spec *extensions.ReplicaSetSpec, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(spec.Replicas), fldPath.Child("replicas"))...) + + if spec.Selector == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("selector"), "")) + } else { + allErrs = append(allErrs, ValidateLabelSelector(spec.Selector, fldPath.Child("selector"))...) + if len(spec.Selector.MatchLabels)+len(spec.Selector.MatchExpressions) == 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("selector"), spec.Selector, "empty selector is not valid for deployment.")) + } + } + + selector, err := extensions.LabelSelectorAsSelector(spec.Selector) + if err != nil { + allErrs = append(allErrs, field.Invalid(fldPath.Child("selector"), spec.Selector, "failed to convert LabelSelector to Selector.")) + } else { + allErrs = append(allErrs, ValidatePodTemplateSpecForReplicaSet(spec.Template, selector, spec.Replicas, fldPath.Child("template"))...) + } + return allErrs +} + +// Validates the given template and ensures that it is in accordance with the desired selector and replicas. +func ValidatePodTemplateSpecForReplicaSet(template *api.PodTemplateSpec, selector labels.Selector, replicas int, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if template == nil { + allErrs = append(allErrs, field.Required(fldPath, "")) + } else { + if !selector.Empty() { + // Verify that the ReplicaSet selector matches the labels in template. + labels := labels.Set(template.Labels) + if !selector.Matches(labels) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("metadata", "labels"), template.Labels, "`selector` does not match template `labels`")) + } + } + allErrs = append(allErrs, apivalidation.ValidatePodTemplateSpec(template, fldPath)...) + if replicas > 1 { + allErrs = append(allErrs, apivalidation.ValidateReadOnlyPersistentDisks(template.Spec.Volumes, fldPath.Child("spec", "volumes"))...) + } + // RestartPolicy has already been first-order validated as per ValidatePodTemplateSpec(). + if template.Spec.RestartPolicy != api.RestartPolicyAlways { + allErrs = append(allErrs, field.NotSupported(fldPath.Child("spec", "restartPolicy"), template.Spec.RestartPolicy, []string{string(api.RestartPolicyAlways)})) + } + } return allErrs } diff --git a/pkg/apis/extensions/validation/validation_test.go b/pkg/apis/extensions/validation/validation_test.go index d071fcf9665..2358bc85cf3 100644 --- a/pkg/apis/extensions/validation/validation_test.go +++ b/pkg/apis/extensions/validation/validation_test.go @@ -1458,12 +1458,6 @@ func TestValidateScale(t *testing.T) { } } -func newInt(val int) *int { - p := new(int) - *p = val - return p -} - func TestValidateConfigMap(t *testing.T) { newConfigMap := func(name, namespace string, data map[string]string) extensions.ConfigMap { return extensions.ConfigMap{ @@ -1565,3 +1559,474 @@ func TestValidateConfigMapUpdate(t *testing.T) { } } } + +func TestValidateReplicaSetStatusUpdate(t *testing.T) { + validLabels := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + }, + }, + } + type rcUpdateTest struct { + old extensions.ReplicaSet + update extensions.ReplicaSet + } + successCases := []rcUpdateTest{ + { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + Status: extensions.ReplicaSetStatus{ + Replicas: 2, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 3, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + Status: extensions.ReplicaSetStatus{ + Replicas: 4, + }, + }, + }, + } + for _, successCase := range successCases { + successCase.old.ObjectMeta.ResourceVersion = "1" + successCase.update.ObjectMeta.ResourceVersion = "1" + if errs := ValidateReplicaSetStatusUpdate(&successCase.update, &successCase.old); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + errorCases := map[string]rcUpdateTest{ + "negative replicas": { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + Status: extensions.ReplicaSetStatus{ + Replicas: 3, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 2, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + Status: extensions.ReplicaSetStatus{ + Replicas: -3, + }, + }, + }, + } + for testName, errorCase := range errorCases { + if errs := ValidateReplicaSetStatusUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 { + t.Errorf("expected failure: %s", testName) + } + } + +} + +func TestValidateReplicaSetUpdate(t *testing.T) { + validLabels := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + }, + }, + } + readWriteVolumePodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, + }, + }, + } + invalidLabels := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} + invalidPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + ObjectMeta: api.ObjectMeta{ + Labels: invalidLabels, + }, + }, + } + type rcUpdateTest struct { + old extensions.ReplicaSet + update extensions.ReplicaSet + } + successCases := []rcUpdateTest{ + { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 3, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + }, + { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 1, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + }, + } + for _, successCase := range successCases { + successCase.old.ObjectMeta.ResourceVersion = "1" + successCase.update.ObjectMeta.ResourceVersion = "1" + if errs := ValidateReplicaSetUpdate(&successCase.update, &successCase.old); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + errorCases := map[string]rcUpdateTest{ + "more than one read/write": { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 2, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + }, + "invalid selector": { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 2, + Selector: &extensions.LabelSelector{MatchLabels: invalidLabels}, + Template: &validPodTemplate.Template, + }, + }, + }, + "invalid pod": { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 2, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &invalidPodTemplate.Template, + }, + }, + }, + "negative replicas": { + old: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + update: extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: -1, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + }, + } + for testName, errorCase := range errorCases { + if errs := ValidateReplicaSetUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 { + t.Errorf("expected failure: %s", testName) + } + } +} + +func TestValidateReplicaSet(t *testing.T) { + validLabels := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + }, + }, + } + readWriteVolumePodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + }, + }, + } + invalidLabels := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} + invalidPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + ObjectMeta: api.ObjectMeta{ + Labels: invalidLabels, + }, + }, + } + successCases := []extensions.ReplicaSet{ + { + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + { + ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + { + ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 1, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + } + for _, successCase := range successCases { + if errs := ValidateReplicaSet(&successCase); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := map[string]extensions.ReplicaSet{ + "zero-length ID": { + ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + "missing-namespace": { + ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + "empty selector": { + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Template: &validPodTemplate.Template, + }, + }, + "selector_doesnt_match": { + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + Template: &validPodTemplate.Template, + }, + }, + "invalid manifest": { + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + }, + }, + "read-write persistent disk with > 1 pod": { + ObjectMeta: api.ObjectMeta{Name: "abc"}, + Spec: extensions.ReplicaSetSpec{ + Replicas: 2, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + "negative_replicas": { + ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + Spec: extensions.ReplicaSetSpec{ + Replicas: -1, + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + }, + }, + "invalid_label": { + ObjectMeta: api.ObjectMeta{ + Name: "abc-123", + Namespace: api.NamespaceDefault, + Labels: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + "invalid_label 2": { + ObjectMeta: api.ObjectMeta{ + Name: "abc-123", + Namespace: api.NamespaceDefault, + Labels: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: extensions.ReplicaSetSpec{ + Template: &invalidPodTemplate.Template, + }, + }, + "invalid_annotation": { + ObjectMeta: api.ObjectMeta{ + Name: "abc-123", + Namespace: api.NamespaceDefault, + Annotations: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &validPodTemplate.Template, + }, + }, + "invalid restart policy 1": { + ObjectMeta: api.ObjectMeta{ + Name: "abc-123", + Namespace: api.NamespaceDefault, + }, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyOnFailure, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + }, + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + }, + }, + }, + "invalid restart policy 2": { + ObjectMeta: api.ObjectMeta{ + Name: "abc-123", + Namespace: api.NamespaceDefault, + }, + Spec: extensions.ReplicaSetSpec{ + Selector: &extensions.LabelSelector{MatchLabels: validLabels}, + Template: &api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyNever, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + }, + ObjectMeta: api.ObjectMeta{ + Labels: validLabels, + }, + }, + }, + }, + } + for k, v := range errorCases { + errs := ValidateReplicaSet(&v) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + for i := range errs { + field := errs[i].Field + if !strings.HasPrefix(field, "spec.template.") && + field != "metadata.name" && + field != "metadata.namespace" && + field != "spec.selector" && + field != "spec.template" && + field != "GCEPersistentDisk.ReadOnly" && + field != "spec.replicas" && + field != "spec.template.labels" && + field != "metadata.annotations" && + field != "metadata.labels" && + field != "status.replicas" { + t.Errorf("%s: missing prefix for: %v", k, errs[i]) + } + } + } +} + +func newInt(val int) *int { + p := new(int) + *p = val + return p +}