traefik/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go

1987 lines
48 KiB
Go
Raw Normal View History

2017-02-07 21:33:23 +00:00
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// ************************************************************
// DO NOT EDIT.
// THIS FILE IS AUTO-GENERATED BY codecgen.
// ************************************************************
2017-04-07 10:49:53 +00:00
package v1beta1
2017-02-07 21:33:23 +00:00
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
2017-04-07 10:49:53 +00:00
pkg2_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg3_v1 "k8s.io/client-go/pkg/api/v1"
pkg4_types "k8s.io/client-go/pkg/types"
pkg1_intstr "k8s.io/client-go/pkg/util/intstr"
2017-02-07 21:33:23 +00:00
"reflect"
"runtime"
time "time"
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
)
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_unversioned.LabelSelector
var v1 pkg3_v1.ObjectMeta
var v2 pkg4_types.UID
var v3 pkg1_intstr.IntOrString
var v4 time.Time
_, _, _, _, _ = v0, v1, v2, v3, v4
}
}
func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym1 := z.EncBinary()
_ = yym1
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [2]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[0] = true
yyq2[1] = x.Selector != nil
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
} else {
yynn2 = 0
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yy4 := &x.MinAvailable
yym5 := z.EncBinary()
_ = yym5
if false {
} else if z.HasExtensions() && z.EncExt(yy4) {
} else if !yym5 && z.IsJSONHandle() {
z.EncJSONMarshal(yy4)
} else {
z.EncFallback(yy4)
}
} else {
r.EncodeNil()
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("minAvailable"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy6 := &x.MinAvailable
yym7 := z.EncBinary()
_ = yym7
if false {
} else if z.HasExtensions() && z.EncExt(yy6) {
} else if !yym7 && z.IsJSONHandle() {
z.EncJSONMarshal(yy6)
} else {
z.EncFallback(yy6)
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
if x.Selector == nil {
r.EncodeNil()
} else {
yym9 := z.EncBinary()
_ = yym9
if false {
} else if z.HasExtensions() && z.EncExt(x.Selector) {
} else {
z.EncFallback(x.Selector)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("selector"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Selector == nil {
r.EncodeNil()
} else {
yym10 := z.EncBinary()
_ = yym10
if false {
} else if z.HasExtensions() && z.EncExt(x.Selector) {
} else {
z.EncFallback(x.Selector)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym11 := z.DecBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct12 := r.ContainerType()
if yyct12 == codecSelferValueTypeMap1234 {
yyl12 := r.ReadMapStart()
if yyl12 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl12, d)
}
} else if yyct12 == codecSelferValueTypeArray1234 {
yyl12 := r.ReadArrayStart()
if yyl12 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl12, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys13Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys13Slc
var yyhl13 bool = l >= 0
for yyj13 := 0; ; yyj13++ {
if yyhl13 {
if yyj13 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys13Slc = r.DecodeBytes(yys13Slc, true, true)
yys13 := string(yys13Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys13 {
case "minAvailable":
if r.TryDecodeAsNil() {
x.MinAvailable = pkg1_intstr.IntOrString{}
} else {
yyv14 := &x.MinAvailable
yym15 := z.DecBinary()
_ = yym15
if false {
} else if z.HasExtensions() && z.DecExt(yyv14) {
} else if !yym15 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv14)
} else {
z.DecFallback(yyv14, false)
}
}
case "selector":
if r.TryDecodeAsNil() {
if x.Selector != nil {
x.Selector = nil
}
} else {
if x.Selector == nil {
x.Selector = new(pkg2_unversioned.LabelSelector)
}
yym17 := z.DecBinary()
_ = yym17
if false {
} else if z.HasExtensions() && z.DecExt(x.Selector) {
} else {
z.DecFallback(x.Selector, false)
}
}
default:
z.DecStructFieldNotFound(-1, yys13)
} // end switch yys13
} // end for yyj13
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj18 int
var yyb18 bool
var yyhl18 bool = l >= 0
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb18 = r.CheckBreak()
}
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.MinAvailable = pkg1_intstr.IntOrString{}
} else {
yyv19 := &x.MinAvailable
yym20 := z.DecBinary()
_ = yym20
if false {
} else if z.HasExtensions() && z.DecExt(yyv19) {
} else if !yym20 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv19)
} else {
z.DecFallback(yyv19, false)
}
}
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb18 = r.CheckBreak()
}
if yyb18 {
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(pkg2_unversioned.LabelSelector)
}
yym22 := z.DecBinary()
_ = yym22
if false {
} else if z.HasExtensions() && z.DecExt(x.Selector) {
} else {
z.DecFallback(x.Selector, false)
}
}
for {
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb18 = r.CheckBreak()
}
if yyb18 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj18-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym23 := z.EncBinary()
_ = yym23
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep24 := !z.EncBinary()
yy2arr24 := z.EncBasicHandle().StructToArray
2017-04-07 10:49:53 +00:00
var yyq24 [6]bool
2017-02-07 21:33:23 +00:00
_, _, _ = yysep24, yyq24, yy2arr24
const yyr24 bool = false
2017-04-07 10:49:53 +00:00
yyq24[0] = x.ObservedGeneration != 0
2017-02-07 21:33:23 +00:00
var yynn24 int
if yyr24 || yy2arr24 {
2017-04-07 10:49:53 +00:00
r.EncodeArrayStart(6)
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yynn24 = 5
2017-02-07 21:33:23 +00:00
for _, b := range yyq24 {
if b {
yynn24++
}
}
r.EncodeMapStart(yynn24)
yynn24 = 0
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq24[0] {
yym26 := z.EncBinary()
_ = yym26
if false {
} else {
r.EncodeInt(int64(x.ObservedGeneration))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq24[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym27 := z.EncBinary()
_ = yym27
if false {
} else {
r.EncodeInt(int64(x.ObservedGeneration))
}
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.DisruptedPods == nil {
r.EncodeNil()
} else {
yym29 := z.EncBinary()
_ = yym29
if false {
} else {
h.encMapstringunversioned_Time((map[string]pkg2_unversioned.Time)(x.DisruptedPods), e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("disruptedPods"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.DisruptedPods == nil {
r.EncodeNil()
} else {
yym30 := z.EncBinary()
_ = yym30
if false {
} else {
h.encMapstringunversioned_Time((map[string]pkg2_unversioned.Time)(x.DisruptedPods), e)
}
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym32 := z.EncBinary()
_ = yym32
2017-02-07 21:33:23 +00:00
if false {
} else {
2017-04-07 10:49:53 +00:00
r.EncodeInt(int64(x.PodDisruptionsAllowed))
2017-02-07 21:33:23 +00:00
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
2017-04-07 10:49:53 +00:00
r.EncodeString(codecSelferC_UTF81234, string("disruptionsAllowed"))
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym33 := z.EncBinary()
_ = yym33
2017-02-07 21:33:23 +00:00
if false {
} else {
2017-04-07 10:49:53 +00:00
r.EncodeInt(int64(x.PodDisruptionsAllowed))
2017-02-07 21:33:23 +00:00
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
yym35 := z.EncBinary()
_ = yym35
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeInt(int64(x.CurrentHealthy))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym36 := z.EncBinary()
_ = yym36
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeInt(int64(x.CurrentHealthy))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
yym38 := z.EncBinary()
_ = yym38
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeInt(int64(x.DesiredHealthy))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym39 := z.EncBinary()
_ = yym39
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeInt(int64(x.DesiredHealthy))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
yym41 := z.EncBinary()
_ = yym41
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeInt(int64(x.ExpectedPods))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym42 := z.EncBinary()
_ = yym42
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeInt(int64(x.ExpectedPods))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
yym43 := z.DecBinary()
_ = yym43
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yyct44 := r.ContainerType()
if yyct44 == codecSelferValueTypeMap1234 {
yyl44 := r.ReadMapStart()
if yyl44 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromMap(yyl44, d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
} else if yyct44 == codecSelferValueTypeArray1234 {
yyl44 := r.ReadArrayStart()
if yyl44 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromArray(yyl44, d)
2017-02-07 21:33:23 +00:00
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yys45Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys45Slc
var yyhl45 bool = l >= 0
for yyj45 := 0; ; yyj45++ {
if yyhl45 {
if yyj45 >= l {
2017-02-07 21:33:23 +00:00
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
2017-04-07 10:49:53 +00:00
yys45Slc = r.DecodeBytes(yys45Slc, true, true)
yys45 := string(yys45Slc)
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
switch yys45 {
case "observedGeneration":
2017-02-07 21:33:23 +00:00
if r.TryDecodeAsNil() {
2017-04-07 10:49:53 +00:00
x.ObservedGeneration = 0
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
x.ObservedGeneration = int64(r.DecodeInt(64))
}
case "disruptedPods":
if r.TryDecodeAsNil() {
x.DisruptedPods = nil
} else {
yyv47 := &x.DisruptedPods
yym48 := z.DecBinary()
_ = yym48
if false {
} else {
h.decMapstringunversioned_Time((*map[string]pkg2_unversioned.Time)(yyv47), d)
}
}
case "disruptionsAllowed":
if r.TryDecodeAsNil() {
x.PodDisruptionsAllowed = 0
} else {
x.PodDisruptionsAllowed = int32(r.DecodeInt(32))
2017-02-07 21:33:23 +00:00
}
case "currentHealthy":
if r.TryDecodeAsNil() {
x.CurrentHealthy = 0
} else {
x.CurrentHealthy = int32(r.DecodeInt(32))
}
case "desiredHealthy":
if r.TryDecodeAsNil() {
x.DesiredHealthy = 0
} else {
x.DesiredHealthy = int32(r.DecodeInt(32))
}
case "expectedPods":
if r.TryDecodeAsNil() {
x.ExpectedPods = 0
} else {
x.ExpectedPods = int32(r.DecodeInt(32))
}
default:
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(-1, yys45)
} // end switch yys45
} // end for yyj45
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yyj53 int
var yyb53 bool
var yyhl53 bool = l >= 0
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb53 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb53 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
2017-04-07 10:49:53 +00:00
x.ObservedGeneration = 0
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
x.ObservedGeneration = int64(r.DecodeInt(64))
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb53 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb53 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.DisruptedPods = nil
} else {
yyv55 := &x.DisruptedPods
yym56 := z.DecBinary()
_ = yym56
if false {
} else {
h.decMapstringunversioned_Time((*map[string]pkg2_unversioned.Time)(yyv55), d)
}
}
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
} else {
yyb53 = r.CheckBreak()
}
if yyb53 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.PodDisruptionsAllowed = 0
} else {
x.PodDisruptionsAllowed = int32(r.DecodeInt(32))
}
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
} else {
yyb53 = r.CheckBreak()
}
if yyb53 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CurrentHealthy = 0
} else {
x.CurrentHealthy = int32(r.DecodeInt(32))
}
2017-04-07 10:49:53 +00:00
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb53 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb53 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.DesiredHealthy = 0
} else {
x.DesiredHealthy = int32(r.DecodeInt(32))
}
2017-04-07 10:49:53 +00:00
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb53 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb53 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ExpectedPods = 0
} else {
x.ExpectedPods = int32(r.DecodeInt(32))
}
for {
2017-04-07 10:49:53 +00:00
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb53 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb53 {
2017-02-07 21:33:23 +00:00
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(yyj53-1, "")
2017-02-07 21:33:23 +00:00
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
2017-04-07 10:49:53 +00:00
yym61 := z.EncBinary()
_ = yym61
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yysep62 := !z.EncBinary()
yy2arr62 := z.EncBasicHandle().StructToArray
var yyq62 [5]bool
_, _, _ = yysep62, yyq62, yy2arr62
const yyr62 bool = false
yyq62[0] = x.Kind != ""
yyq62[1] = x.APIVersion != ""
yyq62[2] = true
yyq62[3] = true
yyq62[4] = true
var yynn62 int
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
r.EncodeArrayStart(5)
} else {
2017-04-07 10:49:53 +00:00
yynn62 = 0
for _, b := range yyq62 {
2017-02-07 21:33:23 +00:00
if b {
2017-04-07 10:49:53 +00:00
yynn62++
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
r.EncodeMapStart(yynn62)
yynn62 = 0
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq62[0] {
yym64 := z.EncBinary()
_ = yym64
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
2017-04-07 10:49:53 +00:00
if yyq62[0] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym65 := z.EncBinary()
_ = yym65
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
2017-04-07 10:49:53 +00:00
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq62[1] {
yym67 := z.EncBinary()
_ = yym67
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
2017-04-07 10:49:53 +00:00
if yyq62[1] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym68 := z.EncBinary()
_ = yym68
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
2017-04-07 10:49:53 +00:00
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq62[2] {
yy70 := &x.ObjectMeta
yy70.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
} else {
r.EncodeNil()
}
} else {
2017-04-07 10:49:53 +00:00
if yyq62[2] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yy71 := &x.ObjectMeta
yy71.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq62[3] {
yy73 := &x.Spec
yy73.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
} else {
r.EncodeNil()
}
} else {
2017-04-07 10:49:53 +00:00
if yyq62[3] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yy74 := &x.Spec
yy74.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq62[4] {
yy76 := &x.Status
yy76.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
} else {
r.EncodeNil()
}
} else {
2017-04-07 10:49:53 +00:00
if yyq62[4] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yy77 := &x.Status
yy77.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
if yyr62 || yy2arr62 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
yym78 := z.DecBinary()
_ = yym78
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yyct79 := r.ContainerType()
if yyct79 == codecSelferValueTypeMap1234 {
yyl79 := r.ReadMapStart()
if yyl79 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromMap(yyl79, d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
} else if yyct79 == codecSelferValueTypeArray1234 {
yyl79 := r.ReadArrayStart()
if yyl79 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromArray(yyl79, d)
2017-02-07 21:33:23 +00:00
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yys80Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys80Slc
var yyhl80 bool = l >= 0
for yyj80 := 0; ; yyj80++ {
if yyhl80 {
if yyj80 >= l {
2017-02-07 21:33:23 +00:00
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
2017-04-07 10:49:53 +00:00
yys80Slc = r.DecodeBytes(yys80Slc, true, true)
yys80 := string(yys80Slc)
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
switch yys80 {
2017-02-07 21:33:23 +00:00
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 = pkg3_v1.ObjectMeta{}
} else {
2017-04-07 10:49:53 +00:00
yyv83 := &x.ObjectMeta
yyv83.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = PodDisruptionBudgetSpec{}
} else {
2017-04-07 10:49:53 +00:00
yyv84 := &x.Spec
yyv84.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
case "status":
if r.TryDecodeAsNil() {
x.Status = PodDisruptionBudgetStatus{}
} else {
2017-04-07 10:49:53 +00:00
yyv85 := &x.Status
yyv85.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
default:
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(-1, yys80)
} // end switch yys80
} // end for yyj80
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yyj86 int
var yyb86 bool
var yyhl86 bool = l >= 0
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb86 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb86 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
2017-04-07 10:49:53 +00:00
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb86 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb86 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
2017-04-07 10:49:53 +00:00
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb86 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb86 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg3_v1.ObjectMeta{}
} else {
2017-04-07 10:49:53 +00:00
yyv89 := &x.ObjectMeta
yyv89.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb86 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb86 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = PodDisruptionBudgetSpec{}
} else {
2017-04-07 10:49:53 +00:00
yyv90 := &x.Spec
yyv90.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb86 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb86 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = PodDisruptionBudgetStatus{}
} else {
2017-04-07 10:49:53 +00:00
yyv91 := &x.Status
yyv91.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
for {
2017-04-07 10:49:53 +00:00
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb86 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb86 {
2017-02-07 21:33:23 +00:00
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(yyj86-1, "")
2017-02-07 21:33:23 +00:00
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
2017-04-07 10:49:53 +00:00
yym92 := z.EncBinary()
_ = yym92
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yysep93 := !z.EncBinary()
yy2arr93 := z.EncBasicHandle().StructToArray
var yyq93 [4]bool
_, _, _ = yysep93, yyq93, yy2arr93
const yyr93 bool = false
yyq93[0] = x.Kind != ""
yyq93[1] = x.APIVersion != ""
yyq93[2] = true
var yynn93 int
if yyr93 || yy2arr93 {
2017-02-07 21:33:23 +00:00
r.EncodeArrayStart(4)
} else {
2017-04-07 10:49:53 +00:00
yynn93 = 1
for _, b := range yyq93 {
2017-02-07 21:33:23 +00:00
if b {
2017-04-07 10:49:53 +00:00
yynn93++
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
r.EncodeMapStart(yynn93)
yynn93 = 0
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyr93 || yy2arr93 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq93[0] {
yym95 := z.EncBinary()
_ = yym95
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
2017-04-07 10:49:53 +00:00
if yyq93[0] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym96 := z.EncBinary()
_ = yym96
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
2017-04-07 10:49:53 +00:00
if yyr93 || yy2arr93 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq93[1] {
yym98 := z.EncBinary()
_ = yym98
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
2017-04-07 10:49:53 +00:00
if yyq93[1] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym99 := z.EncBinary()
_ = yym99
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
2017-04-07 10:49:53 +00:00
if yyr93 || yy2arr93 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq93[2] {
yy101 := &x.ListMeta
yym102 := z.EncBinary()
_ = yym102
2017-02-07 21:33:23 +00:00
if false {
2017-04-07 10:49:53 +00:00
} else if z.HasExtensions() && z.EncExt(yy101) {
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
z.EncFallback(yy101)
2017-02-07 21:33:23 +00:00
}
} else {
r.EncodeNil()
}
} else {
2017-04-07 10:49:53 +00:00
if yyq93[2] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yy103 := &x.ListMeta
yym104 := z.EncBinary()
_ = yym104
2017-02-07 21:33:23 +00:00
if false {
2017-04-07 10:49:53 +00:00
} else if z.HasExtensions() && z.EncExt(yy103) {
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
z.EncFallback(yy103)
2017-02-07 21:33:23 +00:00
}
}
}
2017-04-07 10:49:53 +00:00
if yyr93 || yy2arr93 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil {
r.EncodeNil()
} else {
2017-04-07 10:49:53 +00:00
yym106 := z.EncBinary()
_ = yym106
2017-02-07 21:33:23 +00:00
if false {
} else {
h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(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 {
2017-04-07 10:49:53 +00:00
yym107 := z.EncBinary()
_ = yym107
2017-02-07 21:33:23 +00:00
if false {
} else {
h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
}
}
}
2017-04-07 10:49:53 +00:00
if yyr93 || yy2arr93 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
yym108 := z.DecBinary()
_ = yym108
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yyct109 := r.ContainerType()
if yyct109 == codecSelferValueTypeMap1234 {
yyl109 := r.ReadMapStart()
if yyl109 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromMap(yyl109, d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
} else if yyct109 == codecSelferValueTypeArray1234 {
yyl109 := r.ReadArrayStart()
if yyl109 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromArray(yyl109, d)
2017-02-07 21:33:23 +00:00
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yys110Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys110Slc
var yyhl110 bool = l >= 0
for yyj110 := 0; ; yyj110++ {
if yyhl110 {
if yyj110 >= l {
2017-02-07 21:33:23 +00:00
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
2017-04-07 10:49:53 +00:00
yys110Slc = r.DecodeBytes(yys110Slc, true, true)
yys110 := string(yys110Slc)
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
switch yys110 {
2017-02-07 21:33:23 +00:00
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 = pkg2_unversioned.ListMeta{}
} else {
2017-04-07 10:49:53 +00:00
yyv113 := &x.ListMeta
yym114 := z.DecBinary()
_ = yym114
2017-02-07 21:33:23 +00:00
if false {
2017-04-07 10:49:53 +00:00
} else if z.HasExtensions() && z.DecExt(yyv113) {
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
z.DecFallback(yyv113, false)
2017-02-07 21:33:23 +00:00
}
}
case "items":
if r.TryDecodeAsNil() {
x.Items = nil
} else {
2017-04-07 10:49:53 +00:00
yyv115 := &x.Items
yym116 := z.DecBinary()
_ = yym116
2017-02-07 21:33:23 +00:00
if false {
} else {
2017-04-07 10:49:53 +00:00
h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv115), d)
2017-02-07 21:33:23 +00:00
}
}
default:
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(-1, yys110)
} // end switch yys110
} // end for yyj110
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yyj117 int
var yyb117 bool
var yyhl117 bool = l >= 0
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb117 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb117 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
2017-04-07 10:49:53 +00:00
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb117 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb117 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
2017-04-07 10:49:53 +00:00
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb117 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb117 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg2_unversioned.ListMeta{}
} else {
2017-04-07 10:49:53 +00:00
yyv120 := &x.ListMeta
yym121 := z.DecBinary()
_ = yym121
2017-02-07 21:33:23 +00:00
if false {
2017-04-07 10:49:53 +00:00
} else if z.HasExtensions() && z.DecExt(yyv120) {
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
z.DecFallback(yyv120, false)
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb117 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb117 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Items = nil
} else {
2017-04-07 10:49:53 +00:00
yyv122 := &x.Items
yym123 := z.DecBinary()
_ = yym123
2017-02-07 21:33:23 +00:00
if false {
} else {
2017-04-07 10:49:53 +00:00
h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv122), d)
2017-02-07 21:33:23 +00:00
}
}
for {
2017-04-07 10:49:53 +00:00
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb117 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb117 {
2017-02-07 21:33:23 +00:00
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(yyj117-1, "")
2017-02-07 21:33:23 +00:00
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
2017-04-07 10:49:53 +00:00
yym124 := z.EncBinary()
_ = yym124
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yysep125 := !z.EncBinary()
yy2arr125 := z.EncBasicHandle().StructToArray
var yyq125 [4]bool
_, _, _ = yysep125, yyq125, yy2arr125
const yyr125 bool = false
yyq125[0] = x.Kind != ""
yyq125[1] = x.APIVersion != ""
yyq125[2] = true
yyq125[3] = x.DeleteOptions != nil
var yynn125 int
if yyr125 || yy2arr125 {
2017-02-07 21:33:23 +00:00
r.EncodeArrayStart(4)
} else {
2017-04-07 10:49:53 +00:00
yynn125 = 0
for _, b := range yyq125 {
2017-02-07 21:33:23 +00:00
if b {
2017-04-07 10:49:53 +00:00
yynn125++
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
r.EncodeMapStart(yynn125)
yynn125 = 0
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyr125 || yy2arr125 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq125[0] {
yym127 := z.EncBinary()
_ = yym127
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
2017-04-07 10:49:53 +00:00
if yyq125[0] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym128 := z.EncBinary()
_ = yym128
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
2017-04-07 10:49:53 +00:00
if yyr125 || yy2arr125 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq125[1] {
yym130 := z.EncBinary()
_ = yym130
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
2017-04-07 10:49:53 +00:00
if yyq125[1] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yym131 := z.EncBinary()
_ = yym131
2017-02-07 21:33:23 +00:00
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
2017-04-07 10:49:53 +00:00
if yyr125 || yy2arr125 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq125[2] {
yy133 := &x.ObjectMeta
yy133.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
} else {
r.EncodeNil()
}
} else {
2017-04-07 10:49:53 +00:00
if yyq125[2] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
yy134 := &x.ObjectMeta
yy134.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
if yyr125 || yy2arr125 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
if yyq125[3] {
2017-02-07 21:33:23 +00:00
if x.DeleteOptions == nil {
r.EncodeNil()
} else {
x.DeleteOptions.CodecEncodeSelf(e)
}
} else {
r.EncodeNil()
}
} else {
2017-04-07 10:49:53 +00:00
if yyq125[3] {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deleteOptions"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.DeleteOptions == nil {
r.EncodeNil()
} else {
x.DeleteOptions.CodecEncodeSelf(e)
}
}
}
2017-04-07 10:49:53 +00:00
if yyr125 || yy2arr125 {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *Eviction) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
yym136 := z.DecBinary()
_ = yym136
2017-02-07 21:33:23 +00:00
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
2017-04-07 10:49:53 +00:00
yyct137 := r.ContainerType()
if yyct137 == codecSelferValueTypeMap1234 {
yyl137 := r.ReadMapStart()
if yyl137 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromMap(yyl137, d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
} else if yyct137 == codecSelferValueTypeArray1234 {
yyl137 := r.ReadArrayStart()
if yyl137 == 0 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
2017-04-07 10:49:53 +00:00
x.codecDecodeSelfFromArray(yyl137, d)
2017-02-07 21:33:23 +00:00
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yys138Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys138Slc
var yyhl138 bool = l >= 0
for yyj138 := 0; ; yyj138++ {
if yyhl138 {
if yyj138 >= l {
2017-02-07 21:33:23 +00:00
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
2017-04-07 10:49:53 +00:00
yys138Slc = r.DecodeBytes(yys138Slc, true, true)
yys138 := string(yys138Slc)
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapValue1234)
2017-04-07 10:49:53 +00:00
switch yys138 {
2017-02-07 21:33:23 +00:00
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 = pkg3_v1.ObjectMeta{}
} else {
2017-04-07 10:49:53 +00:00
yyv141 := &x.ObjectMeta
yyv141.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
case "deleteOptions":
if r.TryDecodeAsNil() {
if x.DeleteOptions != nil {
x.DeleteOptions = nil
}
} else {
if x.DeleteOptions == nil {
x.DeleteOptions = new(pkg3_v1.DeleteOptions)
}
x.DeleteOptions.CodecDecodeSelf(d)
}
default:
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(-1, yys138)
} // end switch yys138
} // end for yyj138
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
var yyj143 int
var yyb143 bool
var yyhl143 bool = l >= 0
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb143 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb143 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
2017-04-07 10:49:53 +00:00
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb143 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb143 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
2017-04-07 10:49:53 +00:00
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb143 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb143 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg3_v1.ObjectMeta{}
} else {
2017-04-07 10:49:53 +00:00
yyv146 := &x.ObjectMeta
yyv146.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb143 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb143 {
2017-02-07 21:33:23 +00:00
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeleteOptions != nil {
x.DeleteOptions = nil
}
} else {
if x.DeleteOptions == nil {
x.DeleteOptions = new(pkg3_v1.DeleteOptions)
}
x.DeleteOptions.CodecDecodeSelf(d)
}
for {
2017-04-07 10:49:53 +00:00
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyb143 = r.CheckBreak()
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
if yyb143 {
2017-02-07 21:33:23 +00:00
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
z.DecStructFieldNotFound(yyj143-1, "")
2017-02-07 21:33:23 +00:00
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
2017-04-07 10:49:53 +00:00
func (x codecSelfer1234) encMapstringunversioned_Time(v map[string]pkg2_unversioned.Time, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeMapStart(len(v))
for yyk148, yyv148 := range v {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
yym149 := z.EncBinary()
_ = yym149
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yyk148))
}
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy150 := &yyv148
yym151 := z.EncBinary()
_ = yym151
if false {
} else if z.HasExtensions() && z.EncExt(yy150) {
} else if yym151 {
z.EncBinaryMarshal(yy150)
} else if !yym151 && z.IsJSONHandle() {
z.EncJSONMarshal(yy150)
} else {
z.EncFallback(yy150)
}
}
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x codecSelfer1234) decMapstringunversioned_Time(v *map[string]pkg2_unversioned.Time, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv152 := *v
yyl152 := r.ReadMapStart()
yybh152 := z.DecBasicHandle()
if yyv152 == nil {
yyrl152, _ := z.DecInferLen(yyl152, yybh152.MaxInitLen, 40)
yyv152 = make(map[string]pkg2_unversioned.Time, yyrl152)
*v = yyv152
}
var yymk152 string
var yymv152 pkg2_unversioned.Time
var yymg152 bool
if yybh152.MapValueReset {
yymg152 = true
}
if yyl152 > 0 {
for yyj152 := 0; yyj152 < yyl152; yyj152++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk152 = ""
} else {
yymk152 = string(r.DecodeString())
}
if yymg152 {
yymv152 = yyv152[yymk152]
} else {
yymv152 = pkg2_unversioned.Time{}
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv152 = pkg2_unversioned.Time{}
} else {
yyv154 := &yymv152
yym155 := z.DecBinary()
_ = yym155
if false {
} else if z.HasExtensions() && z.DecExt(yyv154) {
} else if yym155 {
z.DecBinaryUnmarshal(yyv154)
} else if !yym155 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv154)
} else {
z.DecFallback(yyv154, false)
}
}
if yyv152 != nil {
yyv152[yymk152] = yymv152
}
}
} else if yyl152 < 0 {
for yyj152 := 0; !r.CheckBreak(); yyj152++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk152 = ""
} else {
yymk152 = string(r.DecodeString())
}
if yymg152 {
yymv152 = yyv152[yymk152]
} else {
yymv152 = pkg2_unversioned.Time{}
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv152 = pkg2_unversioned.Time{}
} else {
yyv157 := &yymv152
yym158 := z.DecBinary()
_ = yym158
if false {
} else if z.HasExtensions() && z.DecExt(yyv157) {
} else if yym158 {
z.DecBinaryUnmarshal(yyv157)
} else if !yym158 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv157)
} else {
z.DecFallback(yyv157, false)
}
}
if yyv152 != nil {
yyv152[yymk152] = yymv152
}
}
} // else len==0: TODO: Should we clear map entries?
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
2017-02-07 21:33:23 +00:00
func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
2017-04-07 10:49:53 +00:00
for _, yyv159 := range v {
2017-02-07 21:33:23 +00:00
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
2017-04-07 10:49:53 +00:00
yy160 := &yyv159
yy160.CodecEncodeSelf(e)
2017-02-07 21:33:23 +00:00
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
2017-04-07 10:49:53 +00:00
yyv161 := *v
yyh161, yyl161 := z.DecSliceHelperStart()
var yyc161 bool
if yyl161 == 0 {
if yyv161 == nil {
yyv161 = []PodDisruptionBudget{}
yyc161 = true
} else if len(yyv161) != 0 {
yyv161 = yyv161[:0]
yyc161 = true
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
} else if yyl161 > 0 {
var yyrr161, yyrl161 int
var yyrt161 bool
if yyl161 > cap(yyv161) {
2017-02-07 21:33:23 +00:00
2017-04-07 10:49:53 +00:00
yyrg161 := len(yyv161) > 0
yyv2161 := yyv161
yyrl161, yyrt161 = z.DecInferLen(yyl161, z.DecBasicHandle().MaxInitLen, 328)
if yyrt161 {
if yyrl161 <= cap(yyv161) {
yyv161 = yyv161[:yyrl161]
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyv161 = make([]PodDisruptionBudget, yyrl161)
2017-02-07 21:33:23 +00:00
}
} else {
2017-04-07 10:49:53 +00:00
yyv161 = make([]PodDisruptionBudget, yyrl161)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyc161 = true
yyrr161 = len(yyv161)
if yyrg161 {
copy(yyv161, yyv2161)
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
} else if yyl161 != len(yyv161) {
yyv161 = yyv161[:yyl161]
yyc161 = true
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyj161 := 0
for ; yyj161 < yyrr161; yyj161++ {
yyh161.ElemContainerState(yyj161)
2017-02-07 21:33:23 +00:00
if r.TryDecodeAsNil() {
2017-04-07 10:49:53 +00:00
yyv161[yyj161] = PodDisruptionBudget{}
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyv162 := &yyv161[yyj161]
yyv162.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
if yyrt161 {
for ; yyj161 < yyl161; yyj161++ {
yyv161 = append(yyv161, PodDisruptionBudget{})
yyh161.ElemContainerState(yyj161)
2017-02-07 21:33:23 +00:00
if r.TryDecodeAsNil() {
2017-04-07 10:49:53 +00:00
yyv161[yyj161] = PodDisruptionBudget{}
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyv163 := &yyv161[yyj161]
yyv163.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
}
}
} else {
2017-04-07 10:49:53 +00:00
yyj161 := 0
for ; !r.CheckBreak(); yyj161++ {
2017-02-07 21:33:23 +00:00
2017-04-07 10:49:53 +00:00
if yyj161 >= len(yyv161) {
yyv161 = append(yyv161, PodDisruptionBudget{}) // var yyz161 PodDisruptionBudget
yyc161 = true
2017-02-07 21:33:23 +00:00
}
2017-04-07 10:49:53 +00:00
yyh161.ElemContainerState(yyj161)
if yyj161 < len(yyv161) {
2017-02-07 21:33:23 +00:00
if r.TryDecodeAsNil() {
2017-04-07 10:49:53 +00:00
yyv161[yyj161] = PodDisruptionBudget{}
2017-02-07 21:33:23 +00:00
} else {
2017-04-07 10:49:53 +00:00
yyv164 := &yyv161[yyj161]
yyv164.CodecDecodeSelf(d)
2017-02-07 21:33:23 +00:00
}
} else {
z.DecSwallow()
}
}
2017-04-07 10:49:53 +00:00
if yyj161 < len(yyv161) {
yyv161 = yyv161[:yyj161]
yyc161 = true
} else if yyj161 == 0 && yyv161 == nil {
yyv161 = []PodDisruptionBudget{}
yyc161 = true
2017-02-07 21:33:23 +00:00
}
}
2017-04-07 10:49:53 +00:00
yyh161.End()
if yyc161 {
*v = yyv161
2017-02-07 21:33:23 +00:00
}
}