1 Star 0 Fork 0

zhuchance/kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.generated.go 47.58 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986
/*
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 policy
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg3_api "k8s.io/kubernetes/pkg/api"
pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
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 pkg3_api.ObjectMeta
var v1 pkg2_unversioned.LabelSelector
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 [6]bool
_, _, _ = yysep24, yyq24, yy2arr24
const yyr24 bool = false
yyq24[0] = x.ObservedGeneration != 0
var yynn24 int
if yyr24 || yy2arr24 {
r.EncodeArrayStart(6)
} else {
yynn24 = 5
for _, b := range yyq24 {
if b {
yynn24++
}
}
r.EncodeMapStart(yynn24)
yynn24 = 0
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
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
if false {
} else {
r.EncodeInt(int64(x.PodDisruptionsAllowed))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("disruptionsAllowed"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym33 := z.EncBinary()
_ = yym33
if false {
} else {
r.EncodeInt(int64(x.PodDisruptionsAllowed))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym35 := z.EncBinary()
_ = yym35
if false {
} else {
r.EncodeInt(int64(x.CurrentHealthy))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym36 := z.EncBinary()
_ = yym36
if false {
} else {
r.EncodeInt(int64(x.CurrentHealthy))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym38 := z.EncBinary()
_ = yym38
if false {
} else {
r.EncodeInt(int64(x.DesiredHealthy))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym39 := z.EncBinary()
_ = yym39
if false {
} else {
r.EncodeInt(int64(x.DesiredHealthy))
}
}
if yyr24 || yy2arr24 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym41 := z.EncBinary()
_ = yym41
if false {
} else {
r.EncodeInt(int64(x.ExpectedPods))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym42 := z.EncBinary()
_ = yym42
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
yym43 := z.DecBinary()
_ = yym43
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct44 := r.ContainerType()
if yyct44 == codecSelferValueTypeMap1234 {
yyl44 := r.ReadMapStart()
if yyl44 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl44, d)
}
} else if yyct44 == codecSelferValueTypeArray1234 {
yyl44 := r.ReadArrayStart()
if yyl44 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl44, 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 yys45Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys45Slc
var yyhl45 bool = l >= 0
for yyj45 := 0; ; yyj45++ {
if yyhl45 {
if yyj45 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys45Slc = r.DecodeBytes(yys45Slc, true, true)
yys45 := string(yys45Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys45 {
case "observedGeneration":
if r.TryDecodeAsNil() {
x.ObservedGeneration = 0
} else {
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))
}
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, yys45)
} // end switch yys45
} // end for yyj45
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 yyj53 int
var yyb53 bool
var yyhl53 bool = l >= 0
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.ObservedGeneration = 0
} else {
x.ObservedGeneration = int64(r.DecodeInt(64))
}
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.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 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CurrentHealthy = 0
} else {
x.CurrentHealthy = int32(r.DecodeInt(32))
}
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.DesiredHealthy = 0
} else {
x.DesiredHealthy = int32(r.DecodeInt(32))
}
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.ExpectedPods = 0
} else {
x.ExpectedPods = int32(r.DecodeInt(32))
}
for {
yyj53++
if yyhl53 {
yyb53 = yyj53 > l
} else {
yyb53 = r.CheckBreak()
}
if yyb53 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj53-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 {
yym61 := z.EncBinary()
_ = yym61
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
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 {
r.EncodeArrayStart(5)
} else {
yynn62 = 0
for _, b := range yyq62 {
if b {
yynn62++
}
}
r.EncodeMapStart(yynn62)
yynn62 = 0
}
if yyr62 || yy2arr62 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq62[0] {
yym64 := z.EncBinary()
_ = yym64
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq62[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym65 := z.EncBinary()
_ = yym65
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr62 || yy2arr62 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq62[1] {
yym67 := z.EncBinary()
_ = yym67
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq62[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym68 := z.EncBinary()
_ = yym68
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr62 || yy2arr62 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq62[2] {
yy70 := &x.ObjectMeta
yy70.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq62[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy71 := &x.ObjectMeta
yy71.CodecEncodeSelf(e)
}
}
if yyr62 || yy2arr62 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq62[3] {
yy73 := &x.Spec
yy73.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq62[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy74 := &x.Spec
yy74.CodecEncodeSelf(e)
}
}
if yyr62 || yy2arr62 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq62[4] {
yy76 := &x.Status
yy76.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq62[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy77 := &x.Status
yy77.CodecEncodeSelf(e)
}
}
if yyr62 || yy2arr62 {
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
yym78 := z.DecBinary()
_ = yym78
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct79 := r.ContainerType()
if yyct79 == codecSelferValueTypeMap1234 {
yyl79 := r.ReadMapStart()
if yyl79 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl79, d)
}
} else if yyct79 == codecSelferValueTypeArray1234 {
yyl79 := r.ReadArrayStart()
if yyl79 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl79, 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 yys80Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys80Slc
var yyhl80 bool = l >= 0
for yyj80 := 0; ; yyj80++ {
if yyhl80 {
if yyj80 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys80Slc = r.DecodeBytes(yys80Slc, true, true)
yys80 := string(yys80Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys80 {
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_api.ObjectMeta{}
} else {
yyv83 := &x.ObjectMeta
yyv83.CodecDecodeSelf(d)
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = PodDisruptionBudgetSpec{}
} else {
yyv84 := &x.Spec
yyv84.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = PodDisruptionBudgetStatus{}
} else {
yyv85 := &x.Status
yyv85.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys80)
} // end switch yys80
} // end for yyj80
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 yyj86 int
var yyb86 bool
var yyhl86 bool = l >= 0
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
} else {
yyb86 = r.CheckBreak()
}
if yyb86 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
} else {
yyb86 = r.CheckBreak()
}
if yyb86 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
} else {
yyb86 = r.CheckBreak()
}
if yyb86 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg3_api.ObjectMeta{}
} else {
yyv89 := &x.ObjectMeta
yyv89.CodecDecodeSelf(d)
}
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
} else {
yyb86 = r.CheckBreak()
}
if yyb86 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = PodDisruptionBudgetSpec{}
} else {
yyv90 := &x.Spec
yyv90.CodecDecodeSelf(d)
}
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
} else {
yyb86 = r.CheckBreak()
}
if yyb86 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = PodDisruptionBudgetStatus{}
} else {
yyv91 := &x.Status
yyv91.CodecDecodeSelf(d)
}
for {
yyj86++
if yyhl86 {
yyb86 = yyj86 > l
} else {
yyb86 = r.CheckBreak()
}
if yyb86 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj86-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 {
yym92 := z.EncBinary()
_ = yym92
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
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 {
r.EncodeArrayStart(4)
} else {
yynn93 = 1
for _, b := range yyq93 {
if b {
yynn93++
}
}
r.EncodeMapStart(yynn93)
yynn93 = 0
}
if yyr93 || yy2arr93 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq93[0] {
yym95 := z.EncBinary()
_ = yym95
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq93[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym96 := z.EncBinary()
_ = yym96
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr93 || yy2arr93 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq93[1] {
yym98 := z.EncBinary()
_ = yym98
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq93[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym99 := z.EncBinary()
_ = yym99
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr93 || yy2arr93 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq93[2] {
yy101 := &x.ListMeta
yym102 := z.EncBinary()
_ = yym102
if false {
} else if z.HasExtensions() && z.EncExt(yy101) {
} else {
z.EncFallback(yy101)
}
} else {
r.EncodeNil()
}
} else {
if yyq93[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy103 := &x.ListMeta
yym104 := z.EncBinary()
_ = yym104
if false {
} else if z.HasExtensions() && z.EncExt(yy103) {
} else {
z.EncFallback(yy103)
}
}
}
if yyr93 || yy2arr93 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil {
r.EncodeNil()
} else {
yym106 := z.EncBinary()
_ = yym106
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 {
yym107 := z.EncBinary()
_ = yym107
if false {
} else {
h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
}
}
}
if yyr93 || yy2arr93 {
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
yym108 := z.DecBinary()
_ = yym108
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct109 := r.ContainerType()
if yyct109 == codecSelferValueTypeMap1234 {
yyl109 := r.ReadMapStart()
if yyl109 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl109, d)
}
} else if yyct109 == codecSelferValueTypeArray1234 {
yyl109 := r.ReadArrayStart()
if yyl109 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl109, 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 yys110Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys110Slc
var yyhl110 bool = l >= 0
for yyj110 := 0; ; yyj110++ {
if yyhl110 {
if yyj110 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys110Slc = r.DecodeBytes(yys110Slc, true, true)
yys110 := string(yys110Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys110 {
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 {
yyv113 := &x.ListMeta
yym114 := z.DecBinary()
_ = yym114
if false {
} else if z.HasExtensions() && z.DecExt(yyv113) {
} else {
z.DecFallback(yyv113, false)
}
}
case "items":
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv115 := &x.Items
yym116 := z.DecBinary()
_ = yym116
if false {
} else {
h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv115), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys110)
} // end switch yys110
} // end for yyj110
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 yyj117 int
var yyb117 bool
var yyhl117 bool = l >= 0
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
} else {
yyb117 = r.CheckBreak()
}
if yyb117 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
} else {
yyb117 = r.CheckBreak()
}
if yyb117 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
} else {
yyb117 = r.CheckBreak()
}
if yyb117 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg2_unversioned.ListMeta{}
} else {
yyv120 := &x.ListMeta
yym121 := z.DecBinary()
_ = yym121
if false {
} else if z.HasExtensions() && z.DecExt(yyv120) {
} else {
z.DecFallback(yyv120, false)
}
}
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
} else {
yyb117 = r.CheckBreak()
}
if yyb117 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv122 := &x.Items
yym123 := z.DecBinary()
_ = yym123
if false {
} else {
h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv122), d)
}
}
for {
yyj117++
if yyhl117 {
yyb117 = yyj117 > l
} else {
yyb117 = r.CheckBreak()
}
if yyb117 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj117-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 {
yym124 := z.EncBinary()
_ = yym124
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
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 {
r.EncodeArrayStart(4)
} else {
yynn125 = 0
for _, b := range yyq125 {
if b {
yynn125++
}
}
r.EncodeMapStart(yynn125)
yynn125 = 0
}
if yyr125 || yy2arr125 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq125[0] {
yym127 := z.EncBinary()
_ = yym127
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq125[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym128 := z.EncBinary()
_ = yym128
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr125 || yy2arr125 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq125[1] {
yym130 := z.EncBinary()
_ = yym130
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq125[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym131 := z.EncBinary()
_ = yym131
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr125 || yy2arr125 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq125[2] {
yy133 := &x.ObjectMeta
yy133.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq125[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy134 := &x.ObjectMeta
yy134.CodecEncodeSelf(e)
}
}
if yyr125 || yy2arr125 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq125[3] {
if x.DeleteOptions == nil {
r.EncodeNil()
} else {
x.DeleteOptions.CodecEncodeSelf(e)
}
} else {
r.EncodeNil()
}
} else {
if yyq125[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 yyr125 || yy2arr125 {
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
yym136 := z.DecBinary()
_ = yym136
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct137 := r.ContainerType()
if yyct137 == codecSelferValueTypeMap1234 {
yyl137 := r.ReadMapStart()
if yyl137 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl137, d)
}
} else if yyct137 == codecSelferValueTypeArray1234 {
yyl137 := r.ReadArrayStart()
if yyl137 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl137, 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 yys138Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys138Slc
var yyhl138 bool = l >= 0
for yyj138 := 0; ; yyj138++ {
if yyhl138 {
if yyj138 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys138Slc = r.DecodeBytes(yys138Slc, true, true)
yys138 := string(yys138Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys138 {
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_api.ObjectMeta{}
} else {
yyv141 := &x.ObjectMeta
yyv141.CodecDecodeSelf(d)
}
case "deleteOptions":
if r.TryDecodeAsNil() {
if x.DeleteOptions != nil {
x.DeleteOptions = nil
}
} else {
if x.DeleteOptions == nil {
x.DeleteOptions = new(pkg3_api.DeleteOptions)
}
x.DeleteOptions.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys138)
} // end switch yys138
} // end for yyj138
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 yyj143 int
var yyb143 bool
var yyhl143 bool = l >= 0
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
} else {
yyb143 = r.CheckBreak()
}
if yyb143 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
} else {
yyb143 = r.CheckBreak()
}
if yyb143 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
} else {
yyb143 = r.CheckBreak()
}
if yyb143 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg3_api.ObjectMeta{}
} else {
yyv146 := &x.ObjectMeta
yyv146.CodecDecodeSelf(d)
}
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
} else {
yyb143 = r.CheckBreak()
}
if yyb143 {
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_api.DeleteOptions)
}
x.DeleteOptions.CodecDecodeSelf(d)
}
for {
yyj143++
if yyhl143 {
yyb143 = yyj143 > l
} else {
yyb143 = r.CheckBreak()
}
if yyb143 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj143-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
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)
}
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 _, yyv159 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy160 := &yyv159
yy160.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
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
}
} else if yyl161 > 0 {
var yyrr161, yyrl161 int
var yyrt161 bool
if yyl161 > cap(yyv161) {
yyrg161 := len(yyv161) > 0
yyv2161 := yyv161
yyrl161, yyrt161 = z.DecInferLen(yyl161, z.DecBasicHandle().MaxInitLen, 328)
if yyrt161 {
if yyrl161 <= cap(yyv161) {
yyv161 = yyv161[:yyrl161]
} else {
yyv161 = make([]PodDisruptionBudget, yyrl161)
}
} else {
yyv161 = make([]PodDisruptionBudget, yyrl161)
}
yyc161 = true
yyrr161 = len(yyv161)
if yyrg161 {
copy(yyv161, yyv2161)
}
} else if yyl161 != len(yyv161) {
yyv161 = yyv161[:yyl161]
yyc161 = true
}
yyj161 := 0
for ; yyj161 < yyrr161; yyj161++ {
yyh161.ElemContainerState(yyj161)
if r.TryDecodeAsNil() {
yyv161[yyj161] = PodDisruptionBudget{}
} else {
yyv162 := &yyv161[yyj161]
yyv162.CodecDecodeSelf(d)
}
}
if yyrt161 {
for ; yyj161 < yyl161; yyj161++ {
yyv161 = append(yyv161, PodDisruptionBudget{})
yyh161.ElemContainerState(yyj161)
if r.TryDecodeAsNil() {
yyv161[yyj161] = PodDisruptionBudget{}
} else {
yyv163 := &yyv161[yyj161]
yyv163.CodecDecodeSelf(d)
}
}
}
} else {
yyj161 := 0
for ; !r.CheckBreak(); yyj161++ {
if yyj161 >= len(yyv161) {
yyv161 = append(yyv161, PodDisruptionBudget{}) // var yyz161 PodDisruptionBudget
yyc161 = true
}
yyh161.ElemContainerState(yyj161)
if yyj161 < len(yyv161) {
if r.TryDecodeAsNil() {
yyv161[yyj161] = PodDisruptionBudget{}
} else {
yyv164 := &yyv161[yyj161]
yyv164.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj161 < len(yyv161) {
yyv161 = yyv161[:yyj161]
yyc161 = true
} else if yyj161 == 0 && yyv161 == nil {
yyv161 = []PodDisruptionBudget{}
yyc161 = true
}
}
yyh161.End()
if yyc161 {
*v = yyv161
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.5.0-beta.2

搜索帮助