1 Star 0 Fork 0

zhuchance / kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.generated.go 70.05 KB
一键复制 编辑 原始数据 按行查看 历史
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954
/*
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 federation
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg1_api "k8s.io/client-go/1.4/pkg/api"
pkg2_unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
pkg3_types "k8s.io/client-go/1.4/pkg/types"
"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 pkg1_api.LocalObjectReference
var v1 pkg2_unversioned.Time
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
}
}
func (x *ServerAddressByClientCIDR) 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
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
} else {
yynn2 = 2
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym4 := z.EncBinary()
_ = yym4
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClientCIDR))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("clientCIDR"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClientCIDR))
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym7 := z.EncBinary()
_ = yym7
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ServerAddress))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("serverAddress"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ServerAddress))
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ServerAddressByClientCIDR) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym9 := z.DecBinary()
_ = yym9
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct10 := r.ContainerType()
if yyct10 == codecSelferValueTypeMap1234 {
yyl10 := r.ReadMapStart()
if yyl10 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl10, d)
}
} else if yyct10 == codecSelferValueTypeArray1234 {
yyl10 := r.ReadArrayStart()
if yyl10 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl10, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ServerAddressByClientCIDR) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys11Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys11Slc
var yyhl11 bool = l >= 0
for yyj11 := 0; ; yyj11++ {
if yyhl11 {
if yyj11 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys11Slc = r.DecodeBytes(yys11Slc, true, true)
yys11 := string(yys11Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys11 {
case "clientCIDR":
if r.TryDecodeAsNil() {
x.ClientCIDR = ""
} else {
x.ClientCIDR = string(r.DecodeString())
}
case "serverAddress":
if r.TryDecodeAsNil() {
x.ServerAddress = ""
} else {
x.ServerAddress = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys11)
} // end switch yys11
} // end for yyj11
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ServerAddressByClientCIDR) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj14 int
var yyb14 bool
var yyhl14 bool = l >= 0
yyj14++
if yyhl14 {
yyb14 = yyj14 > l
} else {
yyb14 = r.CheckBreak()
}
if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ClientCIDR = ""
} else {
x.ClientCIDR = string(r.DecodeString())
}
yyj14++
if yyhl14 {
yyb14 = yyj14 > l
} else {
yyb14 = r.CheckBreak()
}
if yyb14 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ServerAddress = ""
} else {
x.ServerAddress = string(r.DecodeString())
}
for {
yyj14++
if yyhl14 {
yyb14 = yyj14 > l
} else {
yyb14 = r.CheckBreak()
}
if yyb14 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj14-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ClusterSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym17 := z.EncBinary()
_ = yym17
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep18 := !z.EncBinary()
yy2arr18 := z.EncBasicHandle().StructToArray
var yyq18 [2]bool
_, _, _ = yysep18, yyq18, yy2arr18
const yyr18 bool = false
yyq18[1] = x.SecretRef != nil
var yynn18 int
if yyr18 || yy2arr18 {
r.EncodeArrayStart(2)
} else {
yynn18 = 1
for _, b := range yyq18 {
if b {
yynn18++
}
}
r.EncodeMapStart(yynn18)
yynn18 = 0
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.ServerAddressByClientCIDRs == nil {
r.EncodeNil()
} else {
yym20 := z.EncBinary()
_ = yym20
if false {
} else {
h.encSliceServerAddressByClientCIDR(([]ServerAddressByClientCIDR)(x.ServerAddressByClientCIDRs), e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("serverAddressByClientCIDRs"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ServerAddressByClientCIDRs == nil {
r.EncodeNil()
} else {
yym21 := z.EncBinary()
_ = yym21
if false {
} else {
h.encSliceServerAddressByClientCIDR(([]ServerAddressByClientCIDR)(x.ServerAddressByClientCIDRs), e)
}
}
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq18[1] {
if x.SecretRef == nil {
r.EncodeNil()
} else {
x.SecretRef.CodecEncodeSelf(e)
}
} else {
r.EncodeNil()
}
} else {
if yyq18[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.SecretRef == nil {
r.EncodeNil()
} else {
x.SecretRef.CodecEncodeSelf(e)
}
}
}
if yyr18 || yy2arr18 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ClusterSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym23 := z.DecBinary()
_ = yym23
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct24 := r.ContainerType()
if yyct24 == codecSelferValueTypeMap1234 {
yyl24 := r.ReadMapStart()
if yyl24 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl24, d)
}
} else if yyct24 == codecSelferValueTypeArray1234 {
yyl24 := r.ReadArrayStart()
if yyl24 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl24, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ClusterSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys25Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys25Slc
var yyhl25 bool = l >= 0
for yyj25 := 0; ; yyj25++ {
if yyhl25 {
if yyj25 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys25Slc = r.DecodeBytes(yys25Slc, true, true)
yys25 := string(yys25Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys25 {
case "serverAddressByClientCIDRs":
if r.TryDecodeAsNil() {
x.ServerAddressByClientCIDRs = nil
} else {
yyv26 := &x.ServerAddressByClientCIDRs
yym27 := z.DecBinary()
_ = yym27
if false {
} else {
h.decSliceServerAddressByClientCIDR((*[]ServerAddressByClientCIDR)(yyv26), d)
}
}
case "secretRef":
if r.TryDecodeAsNil() {
if x.SecretRef != nil {
x.SecretRef = nil
}
} else {
if x.SecretRef == nil {
x.SecretRef = new(pkg1_api.LocalObjectReference)
}
x.SecretRef.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys25)
} // end switch yys25
} // end for yyj25
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ClusterSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj29 int
var yyb29 bool
var yyhl29 bool = l >= 0
yyj29++
if yyhl29 {
yyb29 = yyj29 > l
} else {
yyb29 = r.CheckBreak()
}
if yyb29 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ServerAddressByClientCIDRs = nil
} else {
yyv30 := &x.ServerAddressByClientCIDRs
yym31 := z.DecBinary()
_ = yym31
if false {
} else {
h.decSliceServerAddressByClientCIDR((*[]ServerAddressByClientCIDR)(yyv30), d)
}
}
yyj29++
if yyhl29 {
yyb29 = yyj29 > l
} else {
yyb29 = r.CheckBreak()
}
if yyb29 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.SecretRef != nil {
x.SecretRef = nil
}
} else {
if x.SecretRef == nil {
x.SecretRef = new(pkg1_api.LocalObjectReference)
}
x.SecretRef.CodecDecodeSelf(d)
}
for {
yyj29++
if yyhl29 {
yyb29 = yyj29 > l
} else {
yyb29 = r.CheckBreak()
}
if yyb29 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj29-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x ClusterConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
yym33 := z.EncBinary()
_ = yym33
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x))
}
}
func (x *ClusterConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym34 := z.DecBinary()
_ = yym34
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
*((*string)(x)) = r.DecodeString()
}
}
func (x *ClusterCondition) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym35 := z.EncBinary()
_ = yym35
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep36 := !z.EncBinary()
yy2arr36 := z.EncBasicHandle().StructToArray
var yyq36 [6]bool
_, _, _ = yysep36, yyq36, yy2arr36
const yyr36 bool = false
yyq36[2] = true
yyq36[3] = true
yyq36[4] = x.Reason != ""
yyq36[5] = x.Message != ""
var yynn36 int
if yyr36 || yy2arr36 {
r.EncodeArrayStart(6)
} else {
yynn36 = 2
for _, b := range yyq36 {
if b {
yynn36++
}
}
r.EncodeMapStart(yynn36)
yynn36 = 0
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
x.Type.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("type"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
x.Type.CodecEncodeSelf(e)
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym39 := z.EncBinary()
_ = yym39
if false {
} else if z.HasExtensions() && z.EncExt(x.Status) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Status))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym40 := z.EncBinary()
_ = yym40
if false {
} else if z.HasExtensions() && z.EncExt(x.Status) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Status))
}
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq36[2] {
yy42 := &x.LastProbeTime
yym43 := z.EncBinary()
_ = yym43
if false {
} else if z.HasExtensions() && z.EncExt(yy42) {
} else if yym43 {
z.EncBinaryMarshal(yy42)
} else if !yym43 && z.IsJSONHandle() {
z.EncJSONMarshal(yy42)
} else {
z.EncFallback(yy42)
}
} else {
r.EncodeNil()
}
} else {
if yyq36[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy44 := &x.LastProbeTime
yym45 := z.EncBinary()
_ = yym45
if false {
} else if z.HasExtensions() && z.EncExt(yy44) {
} else if yym45 {
z.EncBinaryMarshal(yy44)
} else if !yym45 && z.IsJSONHandle() {
z.EncJSONMarshal(yy44)
} else {
z.EncFallback(yy44)
}
}
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq36[3] {
yy47 := &x.LastTransitionTime
yym48 := z.EncBinary()
_ = yym48
if false {
} else if z.HasExtensions() && z.EncExt(yy47) {
} else if yym48 {
z.EncBinaryMarshal(yy47)
} else if !yym48 && z.IsJSONHandle() {
z.EncJSONMarshal(yy47)
} else {
z.EncFallback(yy47)
}
} else {
r.EncodeNil()
}
} else {
if yyq36[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy49 := &x.LastTransitionTime
yym50 := z.EncBinary()
_ = yym50
if false {
} else if z.HasExtensions() && z.EncExt(yy49) {
} else if yym50 {
z.EncBinaryMarshal(yy49)
} else if !yym50 && z.IsJSONHandle() {
z.EncJSONMarshal(yy49)
} else {
z.EncFallback(yy49)
}
}
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq36[4] {
yym52 := z.EncBinary()
_ = yym52
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq36[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("reason"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym53 := z.EncBinary()
_ = yym53
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
}
}
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq36[5] {
yym55 := z.EncBinary()
_ = yym55
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Message))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq36[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("message"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym56 := z.EncBinary()
_ = yym56
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Message))
}
}
}
if yyr36 || yy2arr36 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ClusterCondition) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym57 := z.DecBinary()
_ = yym57
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct58 := r.ContainerType()
if yyct58 == codecSelferValueTypeMap1234 {
yyl58 := r.ReadMapStart()
if yyl58 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl58, d)
}
} else if yyct58 == codecSelferValueTypeArray1234 {
yyl58 := r.ReadArrayStart()
if yyl58 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl58, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ClusterCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys59Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys59Slc
var yyhl59 bool = l >= 0
for yyj59 := 0; ; yyj59++ {
if yyhl59 {
if yyj59 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys59Slc = r.DecodeBytes(yys59Slc, true, true)
yys59 := string(yys59Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys59 {
case "type":
if r.TryDecodeAsNil() {
x.Type = ""
} else {
x.Type = ClusterConditionType(r.DecodeString())
}
case "status":
if r.TryDecodeAsNil() {
x.Status = ""
} else {
x.Status = pkg1_api.ConditionStatus(r.DecodeString())
}
case "lastProbeTime":
if r.TryDecodeAsNil() {
x.LastProbeTime = pkg2_unversioned.Time{}
} else {
yyv62 := &x.LastProbeTime
yym63 := z.DecBinary()
_ = yym63
if false {
} else if z.HasExtensions() && z.DecExt(yyv62) {
} else if yym63 {
z.DecBinaryUnmarshal(yyv62)
} else if !yym63 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv62)
} else {
z.DecFallback(yyv62, false)
}
}
case "lastTransitionTime":
if r.TryDecodeAsNil() {
x.LastTransitionTime = pkg2_unversioned.Time{}
} else {
yyv64 := &x.LastTransitionTime
yym65 := z.DecBinary()
_ = yym65
if false {
} else if z.HasExtensions() && z.DecExt(yyv64) {
} else if yym65 {
z.DecBinaryUnmarshal(yyv64)
} else if !yym65 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv64)
} else {
z.DecFallback(yyv64, false)
}
}
case "reason":
if r.TryDecodeAsNil() {
x.Reason = ""
} else {
x.Reason = string(r.DecodeString())
}
case "message":
if r.TryDecodeAsNil() {
x.Message = ""
} else {
x.Message = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys59)
} // end switch yys59
} // end for yyj59
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ClusterCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj68 int
var yyb68 bool
var yyhl68 bool = l >= 0
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Type = ""
} else {
x.Type = ClusterConditionType(r.DecodeString())
}
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = ""
} else {
x.Status = pkg1_api.ConditionStatus(r.DecodeString())
}
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.LastProbeTime = pkg2_unversioned.Time{}
} else {
yyv71 := &x.LastProbeTime
yym72 := z.DecBinary()
_ = yym72
if false {
} else if z.HasExtensions() && z.DecExt(yyv71) {
} else if yym72 {
z.DecBinaryUnmarshal(yyv71)
} else if !yym72 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv71)
} else {
z.DecFallback(yyv71, false)
}
}
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.LastTransitionTime = pkg2_unversioned.Time{}
} else {
yyv73 := &x.LastTransitionTime
yym74 := z.DecBinary()
_ = yym74
if false {
} else if z.HasExtensions() && z.DecExt(yyv73) {
} else if yym74 {
z.DecBinaryUnmarshal(yyv73)
} else if !yym74 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv73)
} else {
z.DecFallback(yyv73, false)
}
}
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Reason = ""
} else {
x.Reason = string(r.DecodeString())
}
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Message = ""
} else {
x.Message = string(r.DecodeString())
}
for {
yyj68++
if yyhl68 {
yyb68 = yyj68 > l
} else {
yyb68 = r.CheckBreak()
}
if yyb68 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj68-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym77 := z.EncBinary()
_ = yym77
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep78 := !z.EncBinary()
yy2arr78 := z.EncBasicHandle().StructToArray
var yyq78 [3]bool
_, _, _ = yysep78, yyq78, yy2arr78
const yyr78 bool = false
yyq78[0] = len(x.Conditions) != 0
yyq78[1] = len(x.Zones) != 0
yyq78[2] = x.Region != ""
var yynn78 int
if yyr78 || yy2arr78 {
r.EncodeArrayStart(3)
} else {
yynn78 = 0
for _, b := range yyq78 {
if b {
yynn78++
}
}
r.EncodeMapStart(yynn78)
yynn78 = 0
}
if yyr78 || yy2arr78 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq78[0] {
if x.Conditions == nil {
r.EncodeNil()
} else {
yym80 := z.EncBinary()
_ = yym80
if false {
} else {
h.encSliceClusterCondition(([]ClusterCondition)(x.Conditions), e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq78[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("conditions"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Conditions == nil {
r.EncodeNil()
} else {
yym81 := z.EncBinary()
_ = yym81
if false {
} else {
h.encSliceClusterCondition(([]ClusterCondition)(x.Conditions), e)
}
}
}
}
if yyr78 || yy2arr78 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq78[1] {
if x.Zones == nil {
r.EncodeNil()
} else {
yym83 := z.EncBinary()
_ = yym83
if false {
} else {
z.F.EncSliceStringV(x.Zones, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq78[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("zones"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Zones == nil {
r.EncodeNil()
} else {
yym84 := z.EncBinary()
_ = yym84
if false {
} else {
z.F.EncSliceStringV(x.Zones, false, e)
}
}
}
}
if yyr78 || yy2arr78 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq78[2] {
yym86 := z.EncBinary()
_ = yym86
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Region))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq78[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("region"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym87 := z.EncBinary()
_ = yym87
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Region))
}
}
}
if yyr78 || yy2arr78 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ClusterStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym88 := z.DecBinary()
_ = yym88
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct89 := r.ContainerType()
if yyct89 == codecSelferValueTypeMap1234 {
yyl89 := r.ReadMapStart()
if yyl89 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl89, d)
}
} else if yyct89 == codecSelferValueTypeArray1234 {
yyl89 := r.ReadArrayStart()
if yyl89 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl89, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys90Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys90Slc
var yyhl90 bool = l >= 0
for yyj90 := 0; ; yyj90++ {
if yyhl90 {
if yyj90 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys90Slc = r.DecodeBytes(yys90Slc, true, true)
yys90 := string(yys90Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys90 {
case "conditions":
if r.TryDecodeAsNil() {
x.Conditions = nil
} else {
yyv91 := &x.Conditions
yym92 := z.DecBinary()
_ = yym92
if false {
} else {
h.decSliceClusterCondition((*[]ClusterCondition)(yyv91), d)
}
}
case "zones":
if r.TryDecodeAsNil() {
x.Zones = nil
} else {
yyv93 := &x.Zones
yym94 := z.DecBinary()
_ = yym94
if false {
} else {
z.F.DecSliceStringX(yyv93, false, d)
}
}
case "region":
if r.TryDecodeAsNil() {
x.Region = ""
} else {
x.Region = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys90)
} // end switch yys90
} // end for yyj90
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj96 int
var yyb96 bool
var yyhl96 bool = l >= 0
yyj96++
if yyhl96 {
yyb96 = yyj96 > l
} else {
yyb96 = r.CheckBreak()
}
if yyb96 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Conditions = nil
} else {
yyv97 := &x.Conditions
yym98 := z.DecBinary()
_ = yym98
if false {
} else {
h.decSliceClusterCondition((*[]ClusterCondition)(yyv97), d)
}
}
yyj96++
if yyhl96 {
yyb96 = yyj96 > l
} else {
yyb96 = r.CheckBreak()
}
if yyb96 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Zones = nil
} else {
yyv99 := &x.Zones
yym100 := z.DecBinary()
_ = yym100
if false {
} else {
z.F.DecSliceStringX(yyv99, false, d)
}
}
yyj96++
if yyhl96 {
yyb96 = yyj96 > l
} else {
yyb96 = r.CheckBreak()
}
if yyb96 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Region = ""
} else {
x.Region = string(r.DecodeString())
}
for {
yyj96++
if yyhl96 {
yyb96 = yyj96 > l
} else {
yyb96 = r.CheckBreak()
}
if yyb96 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj96-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym102 := z.EncBinary()
_ = yym102
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep103 := !z.EncBinary()
yy2arr103 := z.EncBasicHandle().StructToArray
var yyq103 [5]bool
_, _, _ = yysep103, yyq103, yy2arr103
const yyr103 bool = false
yyq103[0] = x.Kind != ""
yyq103[1] = x.APIVersion != ""
yyq103[2] = true
yyq103[3] = true
yyq103[4] = true
var yynn103 int
if yyr103 || yy2arr103 {
r.EncodeArrayStart(5)
} else {
yynn103 = 0
for _, b := range yyq103 {
if b {
yynn103++
}
}
r.EncodeMapStart(yynn103)
yynn103 = 0
}
if yyr103 || yy2arr103 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq103[0] {
yym105 := z.EncBinary()
_ = yym105
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq103[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym106 := z.EncBinary()
_ = yym106
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr103 || yy2arr103 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq103[1] {
yym108 := z.EncBinary()
_ = yym108
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq103[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym109 := z.EncBinary()
_ = yym109
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr103 || yy2arr103 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq103[2] {
yy111 := &x.ObjectMeta
yy111.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq103[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy112 := &x.ObjectMeta
yy112.CodecEncodeSelf(e)
}
}
if yyr103 || yy2arr103 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq103[3] {
yy114 := &x.Spec
yy114.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq103[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy115 := &x.Spec
yy115.CodecEncodeSelf(e)
}
}
if yyr103 || yy2arr103 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq103[4] {
yy117 := &x.Status
yy117.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq103[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy118 := &x.Status
yy118.CodecEncodeSelf(e)
}
}
if yyr103 || yy2arr103 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *Cluster) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym119 := z.DecBinary()
_ = yym119
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct120 := r.ContainerType()
if yyct120 == codecSelferValueTypeMap1234 {
yyl120 := r.ReadMapStart()
if yyl120 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl120, d)
}
} else if yyct120 == codecSelferValueTypeArray1234 {
yyl120 := r.ReadArrayStart()
if yyl120 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl120, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys121Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys121Slc
var yyhl121 bool = l >= 0
for yyj121 := 0; ; yyj121++ {
if yyhl121 {
if yyj121 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys121Slc = r.DecodeBytes(yys121Slc, true, true)
yys121 := string(yys121Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys121 {
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 = pkg1_api.ObjectMeta{}
} else {
yyv124 := &x.ObjectMeta
yyv124.CodecDecodeSelf(d)
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = ClusterSpec{}
} else {
yyv125 := &x.Spec
yyv125.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = ClusterStatus{}
} else {
yyv126 := &x.Status
yyv126.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys121)
} // end switch yys121
} // end for yyj121
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj127 int
var yyb127 bool
var yyhl127 bool = l >= 0
yyj127++
if yyhl127 {
yyb127 = yyj127 > l
} else {
yyb127 = r.CheckBreak()
}
if yyb127 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj127++
if yyhl127 {
yyb127 = yyj127 > l
} else {
yyb127 = r.CheckBreak()
}
if yyb127 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj127++
if yyhl127 {
yyb127 = yyj127 > l
} else {
yyb127 = r.CheckBreak()
}
if yyb127 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg1_api.ObjectMeta{}
} else {
yyv130 := &x.ObjectMeta
yyv130.CodecDecodeSelf(d)
}
yyj127++
if yyhl127 {
yyb127 = yyj127 > l
} else {
yyb127 = r.CheckBreak()
}
if yyb127 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = ClusterSpec{}
} else {
yyv131 := &x.Spec
yyv131.CodecDecodeSelf(d)
}
yyj127++
if yyhl127 {
yyb127 = yyj127 > l
} else {
yyb127 = r.CheckBreak()
}
if yyb127 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = ClusterStatus{}
} else {
yyv132 := &x.Status
yyv132.CodecDecodeSelf(d)
}
for {
yyj127++
if yyhl127 {
yyb127 = yyj127 > l
} else {
yyb127 = r.CheckBreak()
}
if yyb127 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj127-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ClusterList) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym133 := z.EncBinary()
_ = yym133
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep134 := !z.EncBinary()
yy2arr134 := z.EncBasicHandle().StructToArray
var yyq134 [4]bool
_, _, _ = yysep134, yyq134, yy2arr134
const yyr134 bool = false
yyq134[0] = x.Kind != ""
yyq134[1] = x.APIVersion != ""
yyq134[2] = true
var yynn134 int
if yyr134 || yy2arr134 {
r.EncodeArrayStart(4)
} else {
yynn134 = 1
for _, b := range yyq134 {
if b {
yynn134++
}
}
r.EncodeMapStart(yynn134)
yynn134 = 0
}
if yyr134 || yy2arr134 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq134[0] {
yym136 := z.EncBinary()
_ = yym136
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq134[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym137 := z.EncBinary()
_ = yym137
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr134 || yy2arr134 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq134[1] {
yym139 := z.EncBinary()
_ = yym139
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq134[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym140 := z.EncBinary()
_ = yym140
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr134 || yy2arr134 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq134[2] {
yy142 := &x.ListMeta
yym143 := z.EncBinary()
_ = yym143
if false {
} else if z.HasExtensions() && z.EncExt(yy142) {
} else {
z.EncFallback(yy142)
}
} else {
r.EncodeNil()
}
} else {
if yyq134[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy144 := &x.ListMeta
yym145 := z.EncBinary()
_ = yym145
if false {
} else if z.HasExtensions() && z.EncExt(yy144) {
} else {
z.EncFallback(yy144)
}
}
}
if yyr134 || yy2arr134 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil {
r.EncodeNil()
} else {
yym147 := z.EncBinary()
_ = yym147
if false {
} else {
h.encSliceCluster(([]Cluster)(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 {
yym148 := z.EncBinary()
_ = yym148
if false {
} else {
h.encSliceCluster(([]Cluster)(x.Items), e)
}
}
}
if yyr134 || yy2arr134 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ClusterList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym149 := z.DecBinary()
_ = yym149
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct150 := r.ContainerType()
if yyct150 == codecSelferValueTypeMap1234 {
yyl150 := r.ReadMapStart()
if yyl150 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl150, d)
}
} else if yyct150 == codecSelferValueTypeArray1234 {
yyl150 := r.ReadArrayStart()
if yyl150 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl150, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ClusterList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys151Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys151Slc
var yyhl151 bool = l >= 0
for yyj151 := 0; ; yyj151++ {
if yyhl151 {
if yyj151 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys151Slc = r.DecodeBytes(yys151Slc, true, true)
yys151 := string(yys151Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys151 {
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 {
yyv154 := &x.ListMeta
yym155 := z.DecBinary()
_ = yym155
if false {
} else if z.HasExtensions() && z.DecExt(yyv154) {
} else {
z.DecFallback(yyv154, false)
}
}
case "items":
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv156 := &x.Items
yym157 := z.DecBinary()
_ = yym157
if false {
} else {
h.decSliceCluster((*[]Cluster)(yyv156), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys151)
} // end switch yys151
} // end for yyj151
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ClusterList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj158 int
var yyb158 bool
var yyhl158 bool = l >= 0
yyj158++
if yyhl158 {
yyb158 = yyj158 > l
} else {
yyb158 = r.CheckBreak()
}
if yyb158 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj158++
if yyhl158 {
yyb158 = yyj158 > l
} else {
yyb158 = r.CheckBreak()
}
if yyb158 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj158++
if yyhl158 {
yyb158 = yyj158 > l
} else {
yyb158 = r.CheckBreak()
}
if yyb158 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg2_unversioned.ListMeta{}
} else {
yyv161 := &x.ListMeta
yym162 := z.DecBinary()
_ = yym162
if false {
} else if z.HasExtensions() && z.DecExt(yyv161) {
} else {
z.DecFallback(yyv161, false)
}
}
yyj158++
if yyhl158 {
yyb158 = yyj158 > l
} else {
yyb158 = r.CheckBreak()
}
if yyb158 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv163 := &x.Items
yym164 := z.DecBinary()
_ = yym164
if false {
} else {
h.decSliceCluster((*[]Cluster)(yyv163), d)
}
}
for {
yyj158++
if yyhl158 {
yyb158 = yyj158 > l
} else {
yyb158 = r.CheckBreak()
}
if yyb158 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj158-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *FederatedReplicaSetPreferences) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym165 := z.EncBinary()
_ = yym165
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep166 := !z.EncBinary()
yy2arr166 := z.EncBasicHandle().StructToArray
var yyq166 [2]bool
_, _, _ = yysep166, yyq166, yy2arr166
const yyr166 bool = false
yyq166[0] = x.Rebalance != false
yyq166[1] = len(x.Clusters) != 0
var yynn166 int
if yyr166 || yy2arr166 {
r.EncodeArrayStart(2)
} else {
yynn166 = 0
for _, b := range yyq166 {
if b {
yynn166++
}
}
r.EncodeMapStart(yynn166)
yynn166 = 0
}
if yyr166 || yy2arr166 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq166[0] {
yym168 := z.EncBinary()
_ = yym168
if false {
} else {
r.EncodeBool(bool(x.Rebalance))
}
} else {
r.EncodeBool(false)
}
} else {
if yyq166[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("rebalance"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym169 := z.EncBinary()
_ = yym169
if false {
} else {
r.EncodeBool(bool(x.Rebalance))
}
}
}
if yyr166 || yy2arr166 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq166[1] {
if x.Clusters == nil {
r.EncodeNil()
} else {
yym171 := z.EncBinary()
_ = yym171
if false {
} else {
h.encMapstringClusterReplicaSetPreferences((map[string]ClusterReplicaSetPreferences)(x.Clusters), e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq166[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("clusters"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Clusters == nil {
r.EncodeNil()
} else {
yym172 := z.EncBinary()
_ = yym172
if false {
} else {
h.encMapstringClusterReplicaSetPreferences((map[string]ClusterReplicaSetPreferences)(x.Clusters), e)
}
}
}
}
if yyr166 || yy2arr166 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *FederatedReplicaSetPreferences) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym173 := z.DecBinary()
_ = yym173
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct174 := r.ContainerType()
if yyct174 == codecSelferValueTypeMap1234 {
yyl174 := r.ReadMapStart()
if yyl174 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl174, d)
}
} else if yyct174 == codecSelferValueTypeArray1234 {
yyl174 := r.ReadArrayStart()
if yyl174 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl174, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *FederatedReplicaSetPreferences) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys175Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys175Slc
var yyhl175 bool = l >= 0
for yyj175 := 0; ; yyj175++ {
if yyhl175 {
if yyj175 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys175Slc = r.DecodeBytes(yys175Slc, true, true)
yys175 := string(yys175Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys175 {
case "rebalance":
if r.TryDecodeAsNil() {
x.Rebalance = false
} else {
x.Rebalance = bool(r.DecodeBool())
}
case "clusters":
if r.TryDecodeAsNil() {
x.Clusters = nil
} else {
yyv177 := &x.Clusters
yym178 := z.DecBinary()
_ = yym178
if false {
} else {
h.decMapstringClusterReplicaSetPreferences((*map[string]ClusterReplicaSetPreferences)(yyv177), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys175)
} // end switch yys175
} // end for yyj175
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *FederatedReplicaSetPreferences) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj179 int
var yyb179 bool
var yyhl179 bool = l >= 0
yyj179++
if yyhl179 {
yyb179 = yyj179 > l
} else {
yyb179 = r.CheckBreak()
}
if yyb179 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Rebalance = false
} else {
x.Rebalance = bool(r.DecodeBool())
}
yyj179++
if yyhl179 {
yyb179 = yyj179 > l
} else {
yyb179 = r.CheckBreak()
}
if yyb179 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Clusters = nil
} else {
yyv181 := &x.Clusters
yym182 := z.DecBinary()
_ = yym182
if false {
} else {
h.decMapstringClusterReplicaSetPreferences((*map[string]ClusterReplicaSetPreferences)(yyv181), d)
}
}
for {
yyj179++
if yyhl179 {
yyb179 = yyj179 > l
} else {
yyb179 = r.CheckBreak()
}
if yyb179 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj179-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ClusterReplicaSetPreferences) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym183 := z.EncBinary()
_ = yym183
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep184 := !z.EncBinary()
yy2arr184 := z.EncBasicHandle().StructToArray
var yyq184 [3]bool
_, _, _ = yysep184, yyq184, yy2arr184
const yyr184 bool = false
yyq184[0] = x.MinReplicas != 0
yyq184[1] = x.MaxReplicas != nil
var yynn184 int
if yyr184 || yy2arr184 {
r.EncodeArrayStart(3)
} else {
yynn184 = 1
for _, b := range yyq184 {
if b {
yynn184++
}
}
r.EncodeMapStart(yynn184)
yynn184 = 0
}
if yyr184 || yy2arr184 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq184[0] {
yym186 := z.EncBinary()
_ = yym186
if false {
} else {
r.EncodeInt(int64(x.MinReplicas))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq184[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("minReplicas"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym187 := z.EncBinary()
_ = yym187
if false {
} else {
r.EncodeInt(int64(x.MinReplicas))
}
}
}
if yyr184 || yy2arr184 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq184[1] {
if x.MaxReplicas == nil {
r.EncodeNil()
} else {
yy189 := *x.MaxReplicas
yym190 := z.EncBinary()
_ = yym190
if false {
} else {
r.EncodeInt(int64(yy189))
}
}
} else {
r.EncodeNil()
}
} else {
if yyq184[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("maxReplicas"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.MaxReplicas == nil {
r.EncodeNil()
} else {
yy191 := *x.MaxReplicas
yym192 := z.EncBinary()
_ = yym192
if false {
} else {
r.EncodeInt(int64(yy191))
}
}
}
}
if yyr184 || yy2arr184 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym194 := z.EncBinary()
_ = yym194
if false {
} else {
r.EncodeInt(int64(x.Weight))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Weight"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym195 := z.EncBinary()
_ = yym195
if false {
} else {
r.EncodeInt(int64(x.Weight))
}
}
if yyr184 || yy2arr184 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ClusterReplicaSetPreferences) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym196 := z.DecBinary()
_ = yym196
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct197 := r.ContainerType()
if yyct197 == codecSelferValueTypeMap1234 {
yyl197 := r.ReadMapStart()
if yyl197 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl197, d)
}
} else if yyct197 == codecSelferValueTypeArray1234 {
yyl197 := r.ReadArrayStart()
if yyl197 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl197, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ClusterReplicaSetPreferences) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys198Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys198Slc
var yyhl198 bool = l >= 0
for yyj198 := 0; ; yyj198++ {
if yyhl198 {
if yyj198 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys198Slc = r.DecodeBytes(yys198Slc, true, true)
yys198 := string(yys198Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys198 {
case "minReplicas":
if r.TryDecodeAsNil() {
x.MinReplicas = 0
} else {
x.MinReplicas = int64(r.DecodeInt(64))
}
case "maxReplicas":
if r.TryDecodeAsNil() {
if x.MaxReplicas != nil {
x.MaxReplicas = nil
}
} else {
if x.MaxReplicas == nil {
x.MaxReplicas = new(int64)
}
yym201 := z.DecBinary()
_ = yym201
if false {
} else {
*((*int64)(x.MaxReplicas)) = int64(r.DecodeInt(64))
}
}
case "Weight":
if r.TryDecodeAsNil() {
x.Weight = 0
} else {
x.Weight = int64(r.DecodeInt(64))
}
default:
z.DecStructFieldNotFound(-1, yys198)
} // end switch yys198
} // end for yyj198
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ClusterReplicaSetPreferences) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj203 int
var yyb203 bool
var yyhl203 bool = l >= 0
yyj203++
if yyhl203 {
yyb203 = yyj203 > l
} else {
yyb203 = r.CheckBreak()
}
if yyb203 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.MinReplicas = 0
} else {
x.MinReplicas = int64(r.DecodeInt(64))
}
yyj203++
if yyhl203 {
yyb203 = yyj203 > l
} else {
yyb203 = r.CheckBreak()
}
if yyb203 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.MaxReplicas != nil {
x.MaxReplicas = nil
}
} else {
if x.MaxReplicas == nil {
x.MaxReplicas = new(int64)
}
yym206 := z.DecBinary()
_ = yym206
if false {
} else {
*((*int64)(x.MaxReplicas)) = int64(r.DecodeInt(64))
}
}
yyj203++
if yyhl203 {
yyb203 = yyj203 > l
} else {
yyb203 = r.CheckBreak()
}
if yyb203 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Weight = 0
} else {
x.Weight = int64(r.DecodeInt(64))
}
for {
yyj203++
if yyhl203 {
yyb203 = yyj203 > l
} else {
yyb203 = r.CheckBreak()
}
if yyb203 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj203-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) encSliceServerAddressByClientCIDR(v []ServerAddressByClientCIDR, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv208 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy209 := &yyv208
yy209.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceServerAddressByClientCIDR(v *[]ServerAddressByClientCIDR, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv210 := *v
yyh210, yyl210 := z.DecSliceHelperStart()
var yyc210 bool
if yyl210 == 0 {
if yyv210 == nil {
yyv210 = []ServerAddressByClientCIDR{}
yyc210 = true
} else if len(yyv210) != 0 {
yyv210 = yyv210[:0]
yyc210 = true
}
} else if yyl210 > 0 {
var yyrr210, yyrl210 int
var yyrt210 bool
if yyl210 > cap(yyv210) {
yyrg210 := len(yyv210) > 0
yyv2210 := yyv210
yyrl210, yyrt210 = z.DecInferLen(yyl210, z.DecBasicHandle().MaxInitLen, 32)
if yyrt210 {
if yyrl210 <= cap(yyv210) {
yyv210 = yyv210[:yyrl210]
} else {
yyv210 = make([]ServerAddressByClientCIDR, yyrl210)
}
} else {
yyv210 = make([]ServerAddressByClientCIDR, yyrl210)
}
yyc210 = true
yyrr210 = len(yyv210)
if yyrg210 {
copy(yyv210, yyv2210)
}
} else if yyl210 != len(yyv210) {
yyv210 = yyv210[:yyl210]
yyc210 = true
}
yyj210 := 0
for ; yyj210 < yyrr210; yyj210++ {
yyh210.ElemContainerState(yyj210)
if r.TryDecodeAsNil() {
yyv210[yyj210] = ServerAddressByClientCIDR{}
} else {
yyv211 := &yyv210[yyj210]
yyv211.CodecDecodeSelf(d)
}
}
if yyrt210 {
for ; yyj210 < yyl210; yyj210++ {
yyv210 = append(yyv210, ServerAddressByClientCIDR{})
yyh210.ElemContainerState(yyj210)
if r.TryDecodeAsNil() {
yyv210[yyj210] = ServerAddressByClientCIDR{}
} else {
yyv212 := &yyv210[yyj210]
yyv212.CodecDecodeSelf(d)
}
}
}
} else {
yyj210 := 0
for ; !r.CheckBreak(); yyj210++ {
if yyj210 >= len(yyv210) {
yyv210 = append(yyv210, ServerAddressByClientCIDR{}) // var yyz210 ServerAddressByClientCIDR
yyc210 = true
}
yyh210.ElemContainerState(yyj210)
if yyj210 < len(yyv210) {
if r.TryDecodeAsNil() {
yyv210[yyj210] = ServerAddressByClientCIDR{}
} else {
yyv213 := &yyv210[yyj210]
yyv213.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj210 < len(yyv210) {
yyv210 = yyv210[:yyj210]
yyc210 = true
} else if yyj210 == 0 && yyv210 == nil {
yyv210 = []ServerAddressByClientCIDR{}
yyc210 = true
}
}
yyh210.End()
if yyc210 {
*v = yyv210
}
}
func (x codecSelfer1234) encSliceClusterCondition(v []ClusterCondition, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv214 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy215 := &yyv214
yy215.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceClusterCondition(v *[]ClusterCondition, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv216 := *v
yyh216, yyl216 := z.DecSliceHelperStart()
var yyc216 bool
if yyl216 == 0 {
if yyv216 == nil {
yyv216 = []ClusterCondition{}
yyc216 = true
} else if len(yyv216) != 0 {
yyv216 = yyv216[:0]
yyc216 = true
}
} else if yyl216 > 0 {
var yyrr216, yyrl216 int
var yyrt216 bool
if yyl216 > cap(yyv216) {
yyrg216 := len(yyv216) > 0
yyv2216 := yyv216
yyrl216, yyrt216 = z.DecInferLen(yyl216, z.DecBasicHandle().MaxInitLen, 112)
if yyrt216 {
if yyrl216 <= cap(yyv216) {
yyv216 = yyv216[:yyrl216]
} else {
yyv216 = make([]ClusterCondition, yyrl216)
}
} else {
yyv216 = make([]ClusterCondition, yyrl216)
}
yyc216 = true
yyrr216 = len(yyv216)
if yyrg216 {
copy(yyv216, yyv2216)
}
} else if yyl216 != len(yyv216) {
yyv216 = yyv216[:yyl216]
yyc216 = true
}
yyj216 := 0
for ; yyj216 < yyrr216; yyj216++ {
yyh216.ElemContainerState(yyj216)
if r.TryDecodeAsNil() {
yyv216[yyj216] = ClusterCondition{}
} else {
yyv217 := &yyv216[yyj216]
yyv217.CodecDecodeSelf(d)
}
}
if yyrt216 {
for ; yyj216 < yyl216; yyj216++ {
yyv216 = append(yyv216, ClusterCondition{})
yyh216.ElemContainerState(yyj216)
if r.TryDecodeAsNil() {
yyv216[yyj216] = ClusterCondition{}
} else {
yyv218 := &yyv216[yyj216]
yyv218.CodecDecodeSelf(d)
}
}
}
} else {
yyj216 := 0
for ; !r.CheckBreak(); yyj216++ {
if yyj216 >= len(yyv216) {
yyv216 = append(yyv216, ClusterCondition{}) // var yyz216 ClusterCondition
yyc216 = true
}
yyh216.ElemContainerState(yyj216)
if yyj216 < len(yyv216) {
if r.TryDecodeAsNil() {
yyv216[yyj216] = ClusterCondition{}
} else {
yyv219 := &yyv216[yyj216]
yyv219.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj216 < len(yyv216) {
yyv216 = yyv216[:yyj216]
yyc216 = true
} else if yyj216 == 0 && yyv216 == nil {
yyv216 = []ClusterCondition{}
yyc216 = true
}
}
yyh216.End()
if yyc216 {
*v = yyv216
}
}
func (x codecSelfer1234) encSliceCluster(v []Cluster, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv220 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy221 := &yyv220
yy221.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv222 := *v
yyh222, yyl222 := z.DecSliceHelperStart()
var yyc222 bool
if yyl222 == 0 {
if yyv222 == nil {
yyv222 = []Cluster{}
yyc222 = true
} else if len(yyv222) != 0 {
yyv222 = yyv222[:0]
yyc222 = true
}
} else if yyl222 > 0 {
var yyrr222, yyrl222 int
var yyrt222 bool
if yyl222 > cap(yyv222) {
yyrg222 := len(yyv222) > 0
yyv2222 := yyv222
yyrl222, yyrt222 = z.DecInferLen(yyl222, z.DecBasicHandle().MaxInitLen, 352)
if yyrt222 {
if yyrl222 <= cap(yyv222) {
yyv222 = yyv222[:yyrl222]
} else {
yyv222 = make([]Cluster, yyrl222)
}
} else {
yyv222 = make([]Cluster, yyrl222)
}
yyc222 = true
yyrr222 = len(yyv222)
if yyrg222 {
copy(yyv222, yyv2222)
}
} else if yyl222 != len(yyv222) {
yyv222 = yyv222[:yyl222]
yyc222 = true
}
yyj222 := 0
for ; yyj222 < yyrr222; yyj222++ {
yyh222.ElemContainerState(yyj222)
if r.TryDecodeAsNil() {
yyv222[yyj222] = Cluster{}
} else {
yyv223 := &yyv222[yyj222]
yyv223.CodecDecodeSelf(d)
}
}
if yyrt222 {
for ; yyj222 < yyl222; yyj222++ {
yyv222 = append(yyv222, Cluster{})
yyh222.ElemContainerState(yyj222)
if r.TryDecodeAsNil() {
yyv222[yyj222] = Cluster{}
} else {
yyv224 := &yyv222[yyj222]
yyv224.CodecDecodeSelf(d)
}
}
}
} else {
yyj222 := 0
for ; !r.CheckBreak(); yyj222++ {
if yyj222 >= len(yyv222) {
yyv222 = append(yyv222, Cluster{}) // var yyz222 Cluster
yyc222 = true
}
yyh222.ElemContainerState(yyj222)
if yyj222 < len(yyv222) {
if r.TryDecodeAsNil() {
yyv222[yyj222] = Cluster{}
} else {
yyv225 := &yyv222[yyj222]
yyv225.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj222 < len(yyv222) {
yyv222 = yyv222[:yyj222]
yyc222 = true
} else if yyj222 == 0 && yyv222 == nil {
yyv222 = []Cluster{}
yyc222 = true
}
}
yyh222.End()
if yyc222 {
*v = yyv222
}
}
func (x codecSelfer1234) encMapstringClusterReplicaSetPreferences(v map[string]ClusterReplicaSetPreferences, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeMapStart(len(v))
for yyk226, yyv226 := range v {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
yym227 := z.EncBinary()
_ = yym227
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yyk226))
}
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy228 := &yyv226
yy228.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x codecSelfer1234) decMapstringClusterReplicaSetPreferences(v *map[string]ClusterReplicaSetPreferences, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv229 := *v
yyl229 := r.ReadMapStart()
yybh229 := z.DecBasicHandle()
if yyv229 == nil {
yyrl229, _ := z.DecInferLen(yyl229, yybh229.MaxInitLen, 40)
yyv229 = make(map[string]ClusterReplicaSetPreferences, yyrl229)
*v = yyv229
}
var yymk229 string
var yymv229 ClusterReplicaSetPreferences
var yymg229 bool
if yybh229.MapValueReset {
yymg229 = true
}
if yyl229 > 0 {
for yyj229 := 0; yyj229 < yyl229; yyj229++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk229 = ""
} else {
yymk229 = string(r.DecodeString())
}
if yymg229 {
yymv229 = yyv229[yymk229]
} else {
yymv229 = ClusterReplicaSetPreferences{}
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv229 = ClusterReplicaSetPreferences{}
} else {
yyv231 := &yymv229
yyv231.CodecDecodeSelf(d)
}
if yyv229 != nil {
yyv229[yymk229] = yymv229
}
}
} else if yyl229 < 0 {
for yyj229 := 0; !r.CheckBreak(); yyj229++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk229 = ""
} else {
yymk229 = string(r.DecodeString())
}
if yymg229 {
yymv229 = yyv229[yymk229]
} else {
yymv229 = ClusterReplicaSetPreferences{}
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv229 = ClusterReplicaSetPreferences{}
} else {
yyv233 := &yymv229
yyv233.CodecDecodeSelf(d)
}
if yyv229 != nil {
yyv229[yymk229] = yymv229
}
}
} // else len==0: TODO: Should we clear map entries?
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.4.2-beta.0

搜索帮助

344bd9b3 5694891 D2dac590 5694891