1 Star 0 Fork 0

zhuchance / kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.generated.go 41.76 KB
一键复制 编辑 原始数据 按行查看 历史
jianhuiz 提交于 2016-08-22 23:00 . add generated files
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752
/*
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.
// ************************************************************
package v1alpha1
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
pkg4_types "k8s.io/kubernetes/pkg/types"
pkg1_intstr "k8s.io/kubernetes/pkg/util/intstr"
"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
var yyq24 [4]bool
_, _, _ = yysep24, yyq24, yy2arr24
const yyr24 bool = false
var yynn24 int
if yyr24 || yy2arr24 {
r.EncodeArrayStart(4)
} else {
yynn24 = 4
for _, b := range yyq24 {
if b {
yynn24++
}
}
r.EncodeMapStart(yynn24)
yynn24 = 0
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym26 := z.EncBinary()
_ = yym26
if false {
} else {
r.EncodeBool(bool(x.PodDisruptionAllowed))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym27 := z.EncBinary()
_ = yym27
if false {
} else {
r.EncodeBool(bool(x.PodDisruptionAllowed))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym29 := z.EncBinary()
_ = yym29
if false {
} else {
r.EncodeInt(int64(x.CurrentHealthy))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym30 := z.EncBinary()
_ = yym30
if false {
} else {
r.EncodeInt(int64(x.CurrentHealthy))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym32 := z.EncBinary()
_ = yym32
if false {
} else {
r.EncodeInt(int64(x.DesiredHealthy))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym33 := z.EncBinary()
_ = yym33
if false {
} else {
r.EncodeInt(int64(x.DesiredHealthy))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym35 := z.EncBinary()
_ = yym35
if false {
} else {
r.EncodeInt(int64(x.ExpectedPods))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym36 := z.EncBinary()
_ = yym36
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
yym37 := z.DecBinary()
_ = yym37
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct38 := r.ContainerType()
if yyct38 == codecSelferValueTypeMap1234 {
yyl38 := r.ReadMapStart()
if yyl38 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl38, d)
}
} else if yyct38 == codecSelferValueTypeArray1234 {
yyl38 := r.ReadArrayStart()
if yyl38 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl38, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys39Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys39Slc
var yyhl39 bool = l >= 0
for yyj39 := 0; ; yyj39++ {
if yyhl39 {
if yyj39 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys39Slc = r.DecodeBytes(yys39Slc, true, true)
yys39 := string(yys39Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys39 {
case "disruptionAllowed":
if r.TryDecodeAsNil() {
x.PodDisruptionAllowed = false
} else {
x.PodDisruptionAllowed = bool(r.DecodeBool())
}
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:
z.DecStructFieldNotFound(-1, yys39)
} // end switch yys39
} // end for yyj39
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj44 int
var yyb44 bool
var yyhl44 bool = l >= 0
yyj44++
if yyhl44 {
yyb44 = yyj44 > l
} else {
yyb44 = r.CheckBreak()
}
if yyb44 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.PodDisruptionAllowed = false
} else {
x.PodDisruptionAllowed = bool(r.DecodeBool())
}
yyj44++
if yyhl44 {
yyb44 = yyj44 > l
} else {
yyb44 = r.CheckBreak()
}
if yyb44 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CurrentHealthy = 0
} else {
x.CurrentHealthy = int32(r.DecodeInt(32))
}
yyj44++
if yyhl44 {
yyb44 = yyj44 > l
} else {
yyb44 = r.CheckBreak()
}
if yyb44 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.DesiredHealthy = 0
} else {
x.DesiredHealthy = int32(r.DecodeInt(32))
}
yyj44++
if yyhl44 {
yyb44 = yyj44 > l
} else {
yyb44 = r.CheckBreak()
}
if yyb44 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ExpectedPods = 0
} else {
x.ExpectedPods = int32(r.DecodeInt(32))
}
for {
yyj44++
if yyhl44 {
yyb44 = yyj44 > l
} else {
yyb44 = r.CheckBreak()
}
if yyb44 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj44-1, "")
}
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 {
yym49 := z.EncBinary()
_ = yym49
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep50 := !z.EncBinary()
yy2arr50 := z.EncBasicHandle().StructToArray
var yyq50 [5]bool
_, _, _ = yysep50, yyq50, yy2arr50
const yyr50 bool = false
yyq50[0] = x.Kind != ""
yyq50[1] = x.APIVersion != ""
yyq50[2] = true
yyq50[3] = true
yyq50[4] = true
var yynn50 int
if yyr50 || yy2arr50 {
r.EncodeArrayStart(5)
} else {
yynn50 = 0
for _, b := range yyq50 {
if b {
yynn50++
}
}
r.EncodeMapStart(yynn50)
yynn50 = 0
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[0] {
yym52 := z.EncBinary()
_ = yym52
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq50[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym53 := z.EncBinary()
_ = yym53
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[1] {
yym55 := z.EncBinary()
_ = yym55
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq50[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym56 := z.EncBinary()
_ = yym56
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[2] {
yy58 := &x.ObjectMeta
yy58.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq50[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy59 := &x.ObjectMeta
yy59.CodecEncodeSelf(e)
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[3] {
yy61 := &x.Spec
yy61.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq50[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy62 := &x.Spec
yy62.CodecEncodeSelf(e)
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[4] {
yy64 := &x.Status
yy64.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq50[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy65 := &x.Status
yy65.CodecEncodeSelf(e)
}
}
if yyr50 || yy2arr50 {
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
yym66 := z.DecBinary()
_ = yym66
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct67 := r.ContainerType()
if yyct67 == codecSelferValueTypeMap1234 {
yyl67 := r.ReadMapStart()
if yyl67 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl67, d)
}
} else if yyct67 == codecSelferValueTypeArray1234 {
yyl67 := r.ReadArrayStart()
if yyl67 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl67, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys68Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys68Slc
var yyhl68 bool = l >= 0
for yyj68 := 0; ; yyj68++ {
if yyhl68 {
if yyj68 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys68Slc = r.DecodeBytes(yys68Slc, true, true)
yys68 := string(yys68Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys68 {
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 {
yyv71 := &x.ObjectMeta
yyv71.CodecDecodeSelf(d)
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = PodDisruptionBudgetSpec{}
} else {
yyv72 := &x.Spec
yyv72.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = PodDisruptionBudgetStatus{}
} else {
yyv73 := &x.Status
yyv73.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys68)
} // end switch yys68
} // end for yyj68
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj74 int
var yyb74 bool
var yyhl74 bool = l >= 0
yyj74++
if yyhl74 {
yyb74 = yyj74 > l
} else {
yyb74 = r.CheckBreak()
}
if yyb74 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj74++
if yyhl74 {
yyb74 = yyj74 > l
} else {
yyb74 = r.CheckBreak()
}
if yyb74 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj74++
if yyhl74 {
yyb74 = yyj74 > l
} else {
yyb74 = r.CheckBreak()
}
if yyb74 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg3_v1.ObjectMeta{}
} else {
yyv77 := &x.ObjectMeta
yyv77.CodecDecodeSelf(d)
}
yyj74++
if yyhl74 {
yyb74 = yyj74 > l
} else {
yyb74 = r.CheckBreak()
}
if yyb74 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = PodDisruptionBudgetSpec{}
} else {
yyv78 := &x.Spec
yyv78.CodecDecodeSelf(d)
}
yyj74++
if yyhl74 {
yyb74 = yyj74 > l
} else {
yyb74 = r.CheckBreak()
}
if yyb74 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = PodDisruptionBudgetStatus{}
} else {
yyv79 := &x.Status
yyv79.CodecDecodeSelf(d)
}
for {
yyj74++
if yyhl74 {
yyb74 = yyj74 > l
} else {
yyb74 = r.CheckBreak()
}
if yyb74 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj74-1, "")
}
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 {
yym80 := z.EncBinary()
_ = yym80
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep81 := !z.EncBinary()
yy2arr81 := z.EncBasicHandle().StructToArray
var yyq81 [4]bool
_, _, _ = yysep81, yyq81, yy2arr81
const yyr81 bool = false
yyq81[0] = x.Kind != ""
yyq81[1] = x.APIVersion != ""
yyq81[2] = true
var yynn81 int
if yyr81 || yy2arr81 {
r.EncodeArrayStart(4)
} else {
yynn81 = 1
for _, b := range yyq81 {
if b {
yynn81++
}
}
r.EncodeMapStart(yynn81)
yynn81 = 0
}
if yyr81 || yy2arr81 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq81[0] {
yym83 := z.EncBinary()
_ = yym83
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq81[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym84 := z.EncBinary()
_ = yym84
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr81 || yy2arr81 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq81[1] {
yym86 := z.EncBinary()
_ = yym86
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq81[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym87 := z.EncBinary()
_ = yym87
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr81 || yy2arr81 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq81[2] {
yy89 := &x.ListMeta
yym90 := z.EncBinary()
_ = yym90
if false {
} else if z.HasExtensions() && z.EncExt(yy89) {
} else {
z.EncFallback(yy89)
}
} else {
r.EncodeNil()
}
} else {
if yyq81[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy91 := &x.ListMeta
yym92 := z.EncBinary()
_ = yym92
if false {
} else if z.HasExtensions() && z.EncExt(yy91) {
} else {
z.EncFallback(yy91)
}
}
}
if yyr81 || yy2arr81 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil {
r.EncodeNil()
} else {
yym94 := z.EncBinary()
_ = yym94
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 {
yym95 := z.EncBinary()
_ = yym95
if false {
} else {
h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
}
}
}
if yyr81 || yy2arr81 {
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
yym96 := z.DecBinary()
_ = yym96
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct97 := r.ContainerType()
if yyct97 == codecSelferValueTypeMap1234 {
yyl97 := r.ReadMapStart()
if yyl97 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl97, d)
}
} else if yyct97 == codecSelferValueTypeArray1234 {
yyl97 := r.ReadArrayStart()
if yyl97 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl97, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys98Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys98Slc
var yyhl98 bool = l >= 0
for yyj98 := 0; ; yyj98++ {
if yyhl98 {
if yyj98 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys98Slc = r.DecodeBytes(yys98Slc, true, true)
yys98 := string(yys98Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys98 {
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 {
yyv101 := &x.ListMeta
yym102 := z.DecBinary()
_ = yym102
if false {
} else if z.HasExtensions() && z.DecExt(yyv101) {
} else {
z.DecFallback(yyv101, false)
}
}
case "items":
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv103 := &x.Items
yym104 := z.DecBinary()
_ = yym104
if false {
} else {
h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv103), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys98)
} // end switch yys98
} // end for yyj98
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj105 int
var yyb105 bool
var yyhl105 bool = l >= 0
yyj105++
if yyhl105 {
yyb105 = yyj105 > l
} else {
yyb105 = r.CheckBreak()
}
if yyb105 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj105++
if yyhl105 {
yyb105 = yyj105 > l
} else {
yyb105 = r.CheckBreak()
}
if yyb105 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj105++
if yyhl105 {
yyb105 = yyj105 > l
} else {
yyb105 = r.CheckBreak()
}
if yyb105 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg2_unversioned.ListMeta{}
} else {
yyv108 := &x.ListMeta
yym109 := z.DecBinary()
_ = yym109
if false {
} else if z.HasExtensions() && z.DecExt(yyv108) {
} else {
z.DecFallback(yyv108, false)
}
}
yyj105++
if yyhl105 {
yyb105 = yyj105 > l
} else {
yyb105 = r.CheckBreak()
}
if yyb105 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv110 := &x.Items
yym111 := z.DecBinary()
_ = yym111
if false {
} else {
h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv110), d)
}
}
for {
yyj105++
if yyhl105 {
yyb105 = yyj105 > l
} else {
yyb105 = r.CheckBreak()
}
if yyb105 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj105-1, "")
}
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 {
yym112 := z.EncBinary()
_ = yym112
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep113 := !z.EncBinary()
yy2arr113 := z.EncBasicHandle().StructToArray
var yyq113 [4]bool
_, _, _ = yysep113, yyq113, yy2arr113
const yyr113 bool = false
yyq113[0] = x.Kind != ""
yyq113[1] = x.APIVersion != ""
yyq113[2] = true
yyq113[3] = x.DeleteOptions != nil
var yynn113 int
if yyr113 || yy2arr113 {
r.EncodeArrayStart(4)
} else {
yynn113 = 0
for _, b := range yyq113 {
if b {
yynn113++
}
}
r.EncodeMapStart(yynn113)
yynn113 = 0
}
if yyr113 || yy2arr113 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq113[0] {
yym115 := z.EncBinary()
_ = yym115
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq113[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym116 := z.EncBinary()
_ = yym116
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr113 || yy2arr113 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq113[1] {
yym118 := z.EncBinary()
_ = yym118
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq113[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym119 := z.EncBinary()
_ = yym119
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr113 || yy2arr113 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq113[2] {
yy121 := &x.ObjectMeta
yy121.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq113[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy122 := &x.ObjectMeta
yy122.CodecEncodeSelf(e)
}
}
if yyr113 || yy2arr113 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq113[3] {
if x.DeleteOptions == nil {
r.EncodeNil()
} else {
x.DeleteOptions.CodecEncodeSelf(e)
}
} else {
r.EncodeNil()
}
} else {
if yyq113[3] {
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)
}
}
}
if yyr113 || yy2arr113 {
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
yym124 := z.DecBinary()
_ = yym124
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct125 := r.ContainerType()
if yyct125 == codecSelferValueTypeMap1234 {
yyl125 := r.ReadMapStart()
if yyl125 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl125, d)
}
} else if yyct125 == codecSelferValueTypeArray1234 {
yyl125 := r.ReadArrayStart()
if yyl125 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl125, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys126Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys126Slc
var yyhl126 bool = l >= 0
for yyj126 := 0; ; yyj126++ {
if yyhl126 {
if yyj126 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys126Slc = r.DecodeBytes(yys126Slc, true, true)
yys126 := string(yys126Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys126 {
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 {
yyv129 := &x.ObjectMeta
yyv129.CodecDecodeSelf(d)
}
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:
z.DecStructFieldNotFound(-1, yys126)
} // end switch yys126
} // end for yyj126
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj131 int
var yyb131 bool
var yyhl131 bool = l >= 0
yyj131++
if yyhl131 {
yyb131 = yyj131 > l
} else {
yyb131 = r.CheckBreak()
}
if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj131++
if yyhl131 {
yyb131 = yyj131 > l
} else {
yyb131 = r.CheckBreak()
}
if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj131++
if yyhl131 {
yyb131 = yyj131 > l
} else {
yyb131 = r.CheckBreak()
}
if yyb131 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg3_v1.ObjectMeta{}
} else {
yyv134 := &x.ObjectMeta
yyv134.CodecDecodeSelf(d)
}
yyj131++
if yyhl131 {
yyb131 = yyj131 > l
} else {
yyb131 = r.CheckBreak()
}
if yyb131 {
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 {
yyj131++
if yyhl131 {
yyb131 = yyj131 > l
} else {
yyb131 = r.CheckBreak()
}
if yyb131 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj131-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv136 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy137 := &yyv136
yy137.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv138 := *v
yyh138, yyl138 := z.DecSliceHelperStart()
var yyc138 bool
if yyl138 == 0 {
if yyv138 == nil {
yyv138 = []PodDisruptionBudget{}
yyc138 = true
} else if len(yyv138) != 0 {
yyv138 = yyv138[:0]
yyc138 = true
}
} else if yyl138 > 0 {
var yyrr138, yyrl138 int
var yyrt138 bool
if yyl138 > cap(yyv138) {
yyrg138 := len(yyv138) > 0
yyv2138 := yyv138
yyrl138, yyrt138 = z.DecInferLen(yyl138, z.DecBasicHandle().MaxInitLen, 312)
if yyrt138 {
if yyrl138 <= cap(yyv138) {
yyv138 = yyv138[:yyrl138]
} else {
yyv138 = make([]PodDisruptionBudget, yyrl138)
}
} else {
yyv138 = make([]PodDisruptionBudget, yyrl138)
}
yyc138 = true
yyrr138 = len(yyv138)
if yyrg138 {
copy(yyv138, yyv2138)
}
} else if yyl138 != len(yyv138) {
yyv138 = yyv138[:yyl138]
yyc138 = true
}
yyj138 := 0
for ; yyj138 < yyrr138; yyj138++ {
yyh138.ElemContainerState(yyj138)
if r.TryDecodeAsNil() {
yyv138[yyj138] = PodDisruptionBudget{}
} else {
yyv139 := &yyv138[yyj138]
yyv139.CodecDecodeSelf(d)
}
}
if yyrt138 {
for ; yyj138 < yyl138; yyj138++ {
yyv138 = append(yyv138, PodDisruptionBudget{})
yyh138.ElemContainerState(yyj138)
if r.TryDecodeAsNil() {
yyv138[yyj138] = PodDisruptionBudget{}
} else {
yyv140 := &yyv138[yyj138]
yyv140.CodecDecodeSelf(d)
}
}
}
} else {
yyj138 := 0
for ; !r.CheckBreak(); yyj138++ {
if yyj138 >= len(yyv138) {
yyv138 = append(yyv138, PodDisruptionBudget{}) // var yyz138 PodDisruptionBudget
yyc138 = true
}
yyh138.ElemContainerState(yyj138)
if yyj138 < len(yyv138) {
if r.TryDecodeAsNil() {
yyv138[yyj138] = PodDisruptionBudget{}
} else {
yyv141 := &yyv138[yyj138]
yyv141.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj138 < len(yyv138) {
yyv138 = yyv138[:yyj138]
yyc138 = true
} else if yyj138 == 0 && yyv138 == nil {
yyv138 = []PodDisruptionBudget{}
yyc138 = true
}
}
yyh138.End()
if yyc138 {
*v = yyv138
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.4.0-beta.5

搜索帮助

344bd9b3 5694891 D2dac590 5694891