1 Star 0 Fork 0

zhuchance/kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.generated.go 135.14 KB
一键复制 编辑 原始数据 按行查看 历史
jianhuiz 提交于 2016-08-22 23:00 . add generated files
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607
/*
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 authorization
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/kubernetes/pkg/api"
pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
pkg3_types "k8s.io/kubernetes/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 pkg2_api.ObjectMeta
var v1 pkg1_unversioned.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
}
}
func (x *SubjectAccessReview) 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 [19]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
yyq2[2] = x.Name != ""
yyq2[3] = x.GenerateName != ""
yyq2[4] = x.Namespace != ""
yyq2[5] = x.SelfLink != ""
yyq2[6] = x.UID != ""
yyq2[7] = x.ResourceVersion != ""
yyq2[8] = x.Generation != 0
yyq2[9] = true
yyq2[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil
yyq2[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil
yyq2[12] = len(x.Labels) != 0
yyq2[13] = len(x.Annotations) != 0
yyq2[14] = len(x.OwnerReferences) != 0
yyq2[15] = len(x.Finalizers) != 0
yyq2[16] = x.ClusterName != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(19)
} else {
yynn2 = 2
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yym10 := z.EncBinary()
_ = yym10
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("name"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym11 := z.EncBinary()
_ = yym11
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] {
yym13 := z.EncBinary()
_ = yym13
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("generateName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[4] {
yym16 := z.EncBinary()
_ = yym16
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("namespace"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym17 := z.EncBinary()
_ = yym17
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
yym19 := z.EncBinary()
_ = yym19
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("selfLink"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym20 := z.EncBinary()
_ = yym20
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[6] {
yym22 := z.EncBinary()
_ = yym22
if false {
} else if z.HasExtensions() && z.EncExt(x.UID) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[6] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("uid"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym23 := z.EncBinary()
_ = yym23
if false {
} else if z.HasExtensions() && z.EncExt(x.UID) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[7] {
yym25 := z.EncBinary()
_ = yym25
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[7] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym26 := z.EncBinary()
_ = yym26
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[8] {
yym28 := z.EncBinary()
_ = yym28
if false {
} else {
r.EncodeInt(int64(x.Generation))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq2[8] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("generation"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym29 := z.EncBinary()
_ = yym29
if false {
} else {
r.EncodeInt(int64(x.Generation))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[9] {
yy31 := &x.CreationTimestamp
yym32 := z.EncBinary()
_ = yym32
if false {
} else if z.HasExtensions() && z.EncExt(yy31) {
} else if yym32 {
z.EncBinaryMarshal(yy31)
} else if !yym32 && z.IsJSONHandle() {
z.EncJSONMarshal(yy31)
} else {
z.EncFallback(yy31)
}
} else {
r.EncodeNil()
}
} else {
if yyq2[9] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy33 := &x.CreationTimestamp
yym34 := z.EncBinary()
_ = yym34
if false {
} else if z.HasExtensions() && z.EncExt(yy33) {
} else if yym34 {
z.EncBinaryMarshal(yy33)
} else if !yym34 && z.IsJSONHandle() {
z.EncJSONMarshal(yy33)
} else {
z.EncFallback(yy33)
}
}
}
var yyn35 bool
if x.ObjectMeta.DeletionTimestamp == nil {
yyn35 = true
goto LABEL35
}
LABEL35:
if yyr2 || yy2arr2 {
if yyn35 {
r.EncodeNil()
} else {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[10] {
if x.DeletionTimestamp == nil {
r.EncodeNil()
} else {
yym36 := z.EncBinary()
_ = yym36
if false {
} else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
} else if yym36 {
z.EncBinaryMarshal(x.DeletionTimestamp)
} else if !yym36 && z.IsJSONHandle() {
z.EncJSONMarshal(x.DeletionTimestamp)
} else {
z.EncFallback(x.DeletionTimestamp)
}
}
} else {
r.EncodeNil()
}
}
} else {
if yyq2[10] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyn35 {
r.EncodeNil()
} else {
if x.DeletionTimestamp == nil {
r.EncodeNil()
} else {
yym37 := z.EncBinary()
_ = yym37
if false {
} else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
} else if yym37 {
z.EncBinaryMarshal(x.DeletionTimestamp)
} else if !yym37 && z.IsJSONHandle() {
z.EncJSONMarshal(x.DeletionTimestamp)
} else {
z.EncFallback(x.DeletionTimestamp)
}
}
}
}
}
var yyn38 bool
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
yyn38 = true
goto LABEL38
}
LABEL38:
if yyr2 || yy2arr2 {
if yyn38 {
r.EncodeNil()
} else {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[11] {
if x.DeletionGracePeriodSeconds == nil {
r.EncodeNil()
} else {
yy39 := *x.DeletionGracePeriodSeconds
yym40 := z.EncBinary()
_ = yym40
if false {
} else {
r.EncodeInt(int64(yy39))
}
}
} else {
r.EncodeNil()
}
}
} else {
if yyq2[11] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyn38 {
r.EncodeNil()
} else {
if x.DeletionGracePeriodSeconds == nil {
r.EncodeNil()
} else {
yy41 := *x.DeletionGracePeriodSeconds
yym42 := z.EncBinary()
_ = yym42
if false {
} else {
r.EncodeInt(int64(yy41))
}
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[12] {
if x.Labels == nil {
r.EncodeNil()
} else {
yym44 := z.EncBinary()
_ = yym44
if false {
} else {
z.F.EncMapStringStringV(x.Labels, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[12] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("labels"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Labels == nil {
r.EncodeNil()
} else {
yym45 := z.EncBinary()
_ = yym45
if false {
} else {
z.F.EncMapStringStringV(x.Labels, false, e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[13] {
if x.Annotations == nil {
r.EncodeNil()
} else {
yym47 := z.EncBinary()
_ = yym47
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[13] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("annotations"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Annotations == nil {
r.EncodeNil()
} else {
yym48 := z.EncBinary()
_ = yym48
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[14] {
if x.OwnerReferences == nil {
r.EncodeNil()
} else {
yym50 := z.EncBinary()
_ = yym50
if false {
} else {
h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[14] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("ownerReferences"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.OwnerReferences == nil {
r.EncodeNil()
} else {
yym51 := z.EncBinary()
_ = yym51
if false {
} else {
h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[15] {
if x.Finalizers == nil {
r.EncodeNil()
} else {
yym53 := z.EncBinary()
_ = yym53
if false {
} else {
z.F.EncSliceStringV(x.Finalizers, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[15] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Finalizers == nil {
r.EncodeNil()
} else {
yym54 := z.EncBinary()
_ = yym54
if false {
} else {
z.F.EncSliceStringV(x.Finalizers, false, e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[16] {
yym56 := z.EncBinary()
_ = yym56
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[16] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym57 := z.EncBinary()
_ = yym57
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy59 := &x.Spec
yy59.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy60 := &x.Spec
yy60.CodecEncodeSelf(e)
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy62 := &x.Status
yy62.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy63 := &x.Status
yy63.CodecEncodeSelf(e)
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym64 := z.DecBinary()
_ = yym64
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct65 := r.ContainerType()
if yyct65 == codecSelferValueTypeMap1234 {
yyl65 := r.ReadMapStart()
if yyl65 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl65, d)
}
} else if yyct65 == codecSelferValueTypeArray1234 {
yyl65 := r.ReadArrayStart()
if yyl65 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl65, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys66Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys66Slc
var yyhl66 bool = l >= 0
for yyj66 := 0; ; yyj66++ {
if yyhl66 {
if yyj66 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys66Slc = r.DecodeBytes(yys66Slc, true, true)
yys66 := string(yys66Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys66 {
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 "name":
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
case "generateName":
if r.TryDecodeAsNil() {
x.GenerateName = ""
} else {
x.GenerateName = string(r.DecodeString())
}
case "namespace":
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
case "selfLink":
if r.TryDecodeAsNil() {
x.SelfLink = ""
} else {
x.SelfLink = string(r.DecodeString())
}
case "uid":
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = pkg3_types.UID(r.DecodeString())
}
case "resourceVersion":
if r.TryDecodeAsNil() {
x.ResourceVersion = ""
} else {
x.ResourceVersion = string(r.DecodeString())
}
case "generation":
if r.TryDecodeAsNil() {
x.Generation = 0
} else {
x.Generation = int64(r.DecodeInt(64))
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
} else {
yyv76 := &x.CreationTimestamp
yym77 := z.DecBinary()
_ = yym77
if false {
} else if z.HasExtensions() && z.DecExt(yyv76) {
} else if yym77 {
z.DecBinaryUnmarshal(yyv76)
} else if !yym77 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv76)
} else {
z.DecFallback(yyv76, false)
}
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
x.DeletionTimestamp = nil
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yym79 := z.DecBinary()
_ = yym79
if false {
} else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
} else if yym79 {
z.DecBinaryUnmarshal(x.DeletionTimestamp)
} else if !yym79 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.DeletionTimestamp)
} else {
z.DecFallback(x.DeletionTimestamp, false)
}
}
case "deletionGracePeriodSeconds":
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
}
if r.TryDecodeAsNil() {
if x.DeletionGracePeriodSeconds != nil {
x.DeletionGracePeriodSeconds = nil
}
} else {
if x.DeletionGracePeriodSeconds == nil {
x.DeletionGracePeriodSeconds = new(int64)
}
yym81 := z.DecBinary()
_ = yym81
if false {
} else {
*((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
}
}
case "labels":
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
yyv82 := &x.Labels
yym83 := z.DecBinary()
_ = yym83
if false {
} else {
z.F.DecMapStringStringX(yyv82, false, d)
}
}
case "annotations":
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv84 := &x.Annotations
yym85 := z.DecBinary()
_ = yym85
if false {
} else {
z.F.DecMapStringStringX(yyv84, false, d)
}
}
case "ownerReferences":
if r.TryDecodeAsNil() {
x.OwnerReferences = nil
} else {
yyv86 := &x.OwnerReferences
yym87 := z.DecBinary()
_ = yym87
if false {
} else {
h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv86), d)
}
}
case "finalizers":
if r.TryDecodeAsNil() {
x.Finalizers = nil
} else {
yyv88 := &x.Finalizers
yym89 := z.DecBinary()
_ = yym89
if false {
} else {
z.F.DecSliceStringX(yyv88, false, d)
}
}
case "clusterName":
if r.TryDecodeAsNil() {
x.ClusterName = ""
} else {
x.ClusterName = string(r.DecodeString())
}
case "Spec":
if r.TryDecodeAsNil() {
x.Spec = SubjectAccessReviewSpec{}
} else {
yyv91 := &x.Spec
yyv91.CodecDecodeSelf(d)
}
case "Status":
if r.TryDecodeAsNil() {
x.Status = SubjectAccessReviewStatus{}
} else {
yyv92 := &x.Status
yyv92.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys66)
} // end switch yys66
} // end for yyj66
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj93 int
var yyb93 bool
var yyhl93 bool = l >= 0
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.GenerateName = ""
} else {
x.GenerateName = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.SelfLink = ""
} else {
x.SelfLink = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = pkg3_types.UID(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ResourceVersion = ""
} else {
x.ResourceVersion = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Generation = 0
} else {
x.Generation = int64(r.DecodeInt(64))
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
} else {
yyv103 := &x.CreationTimestamp
yym104 := z.DecBinary()
_ = yym104
if false {
} else if z.HasExtensions() && z.DecExt(yyv103) {
} else if yym104 {
z.DecBinaryUnmarshal(yyv103)
} else if !yym104 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv103)
} else {
z.DecFallback(yyv103, false)
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
x.DeletionTimestamp = nil
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yym106 := z.DecBinary()
_ = yym106
if false {
} else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
} else if yym106 {
z.DecBinaryUnmarshal(x.DeletionTimestamp)
} else if !yym106 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.DeletionTimestamp)
} else {
z.DecFallback(x.DeletionTimestamp, false)
}
}
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeletionGracePeriodSeconds != nil {
x.DeletionGracePeriodSeconds = nil
}
} else {
if x.DeletionGracePeriodSeconds == nil {
x.DeletionGracePeriodSeconds = new(int64)
}
yym108 := z.DecBinary()
_ = yym108
if false {
} else {
*((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
}
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
yyv109 := &x.Labels
yym110 := z.DecBinary()
_ = yym110
if false {
} else {
z.F.DecMapStringStringX(yyv109, false, d)
}
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv111 := &x.Annotations
yym112 := z.DecBinary()
_ = yym112
if false {
} else {
z.F.DecMapStringStringX(yyv111, false, d)
}
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.OwnerReferences = nil
} else {
yyv113 := &x.OwnerReferences
yym114 := z.DecBinary()
_ = yym114
if false {
} else {
h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv113), d)
}
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Finalizers = nil
} else {
yyv115 := &x.Finalizers
yym116 := z.DecBinary()
_ = yym116
if false {
} else {
z.F.DecSliceStringX(yyv115, false, d)
}
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ClusterName = ""
} else {
x.ClusterName = string(r.DecodeString())
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = SubjectAccessReviewSpec{}
} else {
yyv118 := &x.Spec
yyv118.CodecDecodeSelf(d)
}
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = SubjectAccessReviewStatus{}
} else {
yyv119 := &x.Status
yyv119.CodecDecodeSelf(d)
}
for {
yyj93++
if yyhl93 {
yyb93 = yyj93 > l
} else {
yyb93 = r.CheckBreak()
}
if yyb93 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj93-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym120 := z.EncBinary()
_ = yym120
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep121 := !z.EncBinary()
yy2arr121 := z.EncBasicHandle().StructToArray
var yyq121 [19]bool
_, _, _ = yysep121, yyq121, yy2arr121
const yyr121 bool = false
yyq121[0] = x.Kind != ""
yyq121[1] = x.APIVersion != ""
yyq121[2] = x.Name != ""
yyq121[3] = x.GenerateName != ""
yyq121[4] = x.Namespace != ""
yyq121[5] = x.SelfLink != ""
yyq121[6] = x.UID != ""
yyq121[7] = x.ResourceVersion != ""
yyq121[8] = x.Generation != 0
yyq121[9] = true
yyq121[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil
yyq121[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil
yyq121[12] = len(x.Labels) != 0
yyq121[13] = len(x.Annotations) != 0
yyq121[14] = len(x.OwnerReferences) != 0
yyq121[15] = len(x.Finalizers) != 0
yyq121[16] = x.ClusterName != ""
var yynn121 int
if yyr121 || yy2arr121 {
r.EncodeArrayStart(19)
} else {
yynn121 = 2
for _, b := range yyq121 {
if b {
yynn121++
}
}
r.EncodeMapStart(yynn121)
yynn121 = 0
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[0] {
yym123 := z.EncBinary()
_ = yym123
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym124 := z.EncBinary()
_ = yym124
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[1] {
yym126 := z.EncBinary()
_ = yym126
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym127 := z.EncBinary()
_ = yym127
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[2] {
yym129 := z.EncBinary()
_ = yym129
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("name"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym130 := z.EncBinary()
_ = yym130
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[3] {
yym132 := z.EncBinary()
_ = yym132
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("generateName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym133 := z.EncBinary()
_ = yym133
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[4] {
yym135 := z.EncBinary()
_ = yym135
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("namespace"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym136 := z.EncBinary()
_ = yym136
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[5] {
yym138 := z.EncBinary()
_ = yym138
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("selfLink"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym139 := z.EncBinary()
_ = yym139
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[6] {
yym141 := z.EncBinary()
_ = yym141
if false {
} else if z.HasExtensions() && z.EncExt(x.UID) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[6] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("uid"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym142 := z.EncBinary()
_ = yym142
if false {
} else if z.HasExtensions() && z.EncExt(x.UID) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[7] {
yym144 := z.EncBinary()
_ = yym144
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[7] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym145 := z.EncBinary()
_ = yym145
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[8] {
yym147 := z.EncBinary()
_ = yym147
if false {
} else {
r.EncodeInt(int64(x.Generation))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq121[8] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("generation"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym148 := z.EncBinary()
_ = yym148
if false {
} else {
r.EncodeInt(int64(x.Generation))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[9] {
yy150 := &x.CreationTimestamp
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)
}
} else {
r.EncodeNil()
}
} else {
if yyq121[9] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy152 := &x.CreationTimestamp
yym153 := z.EncBinary()
_ = yym153
if false {
} else if z.HasExtensions() && z.EncExt(yy152) {
} else if yym153 {
z.EncBinaryMarshal(yy152)
} else if !yym153 && z.IsJSONHandle() {
z.EncJSONMarshal(yy152)
} else {
z.EncFallback(yy152)
}
}
}
var yyn154 bool
if x.ObjectMeta.DeletionTimestamp == nil {
yyn154 = true
goto LABEL154
}
LABEL154:
if yyr121 || yy2arr121 {
if yyn154 {
r.EncodeNil()
} else {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[10] {
if x.DeletionTimestamp == nil {
r.EncodeNil()
} else {
yym155 := z.EncBinary()
_ = yym155
if false {
} else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
} else if yym155 {
z.EncBinaryMarshal(x.DeletionTimestamp)
} else if !yym155 && z.IsJSONHandle() {
z.EncJSONMarshal(x.DeletionTimestamp)
} else {
z.EncFallback(x.DeletionTimestamp)
}
}
} else {
r.EncodeNil()
}
}
} else {
if yyq121[10] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyn154 {
r.EncodeNil()
} else {
if x.DeletionTimestamp == nil {
r.EncodeNil()
} else {
yym156 := z.EncBinary()
_ = yym156
if false {
} else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
} else if yym156 {
z.EncBinaryMarshal(x.DeletionTimestamp)
} else if !yym156 && z.IsJSONHandle() {
z.EncJSONMarshal(x.DeletionTimestamp)
} else {
z.EncFallback(x.DeletionTimestamp)
}
}
}
}
}
var yyn157 bool
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
yyn157 = true
goto LABEL157
}
LABEL157:
if yyr121 || yy2arr121 {
if yyn157 {
r.EncodeNil()
} else {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[11] {
if x.DeletionGracePeriodSeconds == nil {
r.EncodeNil()
} else {
yy158 := *x.DeletionGracePeriodSeconds
yym159 := z.EncBinary()
_ = yym159
if false {
} else {
r.EncodeInt(int64(yy158))
}
}
} else {
r.EncodeNil()
}
}
} else {
if yyq121[11] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyn157 {
r.EncodeNil()
} else {
if x.DeletionGracePeriodSeconds == nil {
r.EncodeNil()
} else {
yy160 := *x.DeletionGracePeriodSeconds
yym161 := z.EncBinary()
_ = yym161
if false {
} else {
r.EncodeInt(int64(yy160))
}
}
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[12] {
if x.Labels == nil {
r.EncodeNil()
} else {
yym163 := z.EncBinary()
_ = yym163
if false {
} else {
z.F.EncMapStringStringV(x.Labels, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq121[12] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("labels"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Labels == nil {
r.EncodeNil()
} else {
yym164 := z.EncBinary()
_ = yym164
if false {
} else {
z.F.EncMapStringStringV(x.Labels, false, e)
}
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[13] {
if x.Annotations == nil {
r.EncodeNil()
} else {
yym166 := z.EncBinary()
_ = yym166
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq121[13] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("annotations"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Annotations == nil {
r.EncodeNil()
} else {
yym167 := z.EncBinary()
_ = yym167
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[14] {
if x.OwnerReferences == nil {
r.EncodeNil()
} else {
yym169 := z.EncBinary()
_ = yym169
if false {
} else {
h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq121[14] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("ownerReferences"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.OwnerReferences == nil {
r.EncodeNil()
} else {
yym170 := z.EncBinary()
_ = yym170
if false {
} else {
h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
}
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[15] {
if x.Finalizers == nil {
r.EncodeNil()
} else {
yym172 := z.EncBinary()
_ = yym172
if false {
} else {
z.F.EncSliceStringV(x.Finalizers, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq121[15] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Finalizers == nil {
r.EncodeNil()
} else {
yym173 := z.EncBinary()
_ = yym173
if false {
} else {
z.F.EncSliceStringV(x.Finalizers, false, e)
}
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq121[16] {
yym175 := z.EncBinary()
_ = yym175
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq121[16] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym176 := z.EncBinary()
_ = yym176
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy178 := &x.Spec
yy178.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy179 := &x.Spec
yy179.CodecEncodeSelf(e)
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy181 := &x.Status
yy181.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy182 := &x.Status
yy182.CodecEncodeSelf(e)
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym183 := z.DecBinary()
_ = yym183
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct184 := r.ContainerType()
if yyct184 == codecSelferValueTypeMap1234 {
yyl184 := r.ReadMapStart()
if yyl184 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl184, d)
}
} else if yyct184 == codecSelferValueTypeArray1234 {
yyl184 := r.ReadArrayStart()
if yyl184 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl184, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys185Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys185Slc
var yyhl185 bool = l >= 0
for yyj185 := 0; ; yyj185++ {
if yyhl185 {
if yyj185 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys185Slc = r.DecodeBytes(yys185Slc, true, true)
yys185 := string(yys185Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys185 {
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 "name":
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
case "generateName":
if r.TryDecodeAsNil() {
x.GenerateName = ""
} else {
x.GenerateName = string(r.DecodeString())
}
case "namespace":
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
case "selfLink":
if r.TryDecodeAsNil() {
x.SelfLink = ""
} else {
x.SelfLink = string(r.DecodeString())
}
case "uid":
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = pkg3_types.UID(r.DecodeString())
}
case "resourceVersion":
if r.TryDecodeAsNil() {
x.ResourceVersion = ""
} else {
x.ResourceVersion = string(r.DecodeString())
}
case "generation":
if r.TryDecodeAsNil() {
x.Generation = 0
} else {
x.Generation = int64(r.DecodeInt(64))
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
} else {
yyv195 := &x.CreationTimestamp
yym196 := z.DecBinary()
_ = yym196
if false {
} else if z.HasExtensions() && z.DecExt(yyv195) {
} else if yym196 {
z.DecBinaryUnmarshal(yyv195)
} else if !yym196 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv195)
} else {
z.DecFallback(yyv195, false)
}
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
x.DeletionTimestamp = nil
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yym198 := z.DecBinary()
_ = yym198
if false {
} else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
} else if yym198 {
z.DecBinaryUnmarshal(x.DeletionTimestamp)
} else if !yym198 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.DeletionTimestamp)
} else {
z.DecFallback(x.DeletionTimestamp, false)
}
}
case "deletionGracePeriodSeconds":
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
}
if r.TryDecodeAsNil() {
if x.DeletionGracePeriodSeconds != nil {
x.DeletionGracePeriodSeconds = nil
}
} else {
if x.DeletionGracePeriodSeconds == nil {
x.DeletionGracePeriodSeconds = new(int64)
}
yym200 := z.DecBinary()
_ = yym200
if false {
} else {
*((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
}
}
case "labels":
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
yyv201 := &x.Labels
yym202 := z.DecBinary()
_ = yym202
if false {
} else {
z.F.DecMapStringStringX(yyv201, false, d)
}
}
case "annotations":
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv203 := &x.Annotations
yym204 := z.DecBinary()
_ = yym204
if false {
} else {
z.F.DecMapStringStringX(yyv203, false, d)
}
}
case "ownerReferences":
if r.TryDecodeAsNil() {
x.OwnerReferences = nil
} else {
yyv205 := &x.OwnerReferences
yym206 := z.DecBinary()
_ = yym206
if false {
} else {
h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv205), d)
}
}
case "finalizers":
if r.TryDecodeAsNil() {
x.Finalizers = nil
} else {
yyv207 := &x.Finalizers
yym208 := z.DecBinary()
_ = yym208
if false {
} else {
z.F.DecSliceStringX(yyv207, false, d)
}
}
case "clusterName":
if r.TryDecodeAsNil() {
x.ClusterName = ""
} else {
x.ClusterName = string(r.DecodeString())
}
case "Spec":
if r.TryDecodeAsNil() {
x.Spec = SelfSubjectAccessReviewSpec{}
} else {
yyv210 := &x.Spec
yyv210.CodecDecodeSelf(d)
}
case "Status":
if r.TryDecodeAsNil() {
x.Status = SubjectAccessReviewStatus{}
} else {
yyv211 := &x.Status
yyv211.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys185)
} // end switch yys185
} // end for yyj185
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj212 int
var yyb212 bool
var yyhl212 bool = l >= 0
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.GenerateName = ""
} else {
x.GenerateName = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.SelfLink = ""
} else {
x.SelfLink = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = pkg3_types.UID(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ResourceVersion = ""
} else {
x.ResourceVersion = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Generation = 0
} else {
x.Generation = int64(r.DecodeInt(64))
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
} else {
yyv222 := &x.CreationTimestamp
yym223 := z.DecBinary()
_ = yym223
if false {
} else if z.HasExtensions() && z.DecExt(yyv222) {
} else if yym223 {
z.DecBinaryUnmarshal(yyv222)
} else if !yym223 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv222)
} else {
z.DecFallback(yyv222, false)
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
x.DeletionTimestamp = nil
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yym225 := z.DecBinary()
_ = yym225
if false {
} else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
} else if yym225 {
z.DecBinaryUnmarshal(x.DeletionTimestamp)
} else if !yym225 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.DeletionTimestamp)
} else {
z.DecFallback(x.DeletionTimestamp, false)
}
}
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeletionGracePeriodSeconds != nil {
x.DeletionGracePeriodSeconds = nil
}
} else {
if x.DeletionGracePeriodSeconds == nil {
x.DeletionGracePeriodSeconds = new(int64)
}
yym227 := z.DecBinary()
_ = yym227
if false {
} else {
*((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
}
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
yyv228 := &x.Labels
yym229 := z.DecBinary()
_ = yym229
if false {
} else {
z.F.DecMapStringStringX(yyv228, false, d)
}
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv230 := &x.Annotations
yym231 := z.DecBinary()
_ = yym231
if false {
} else {
z.F.DecMapStringStringX(yyv230, false, d)
}
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.OwnerReferences = nil
} else {
yyv232 := &x.OwnerReferences
yym233 := z.DecBinary()
_ = yym233
if false {
} else {
h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv232), d)
}
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Finalizers = nil
} else {
yyv234 := &x.Finalizers
yym235 := z.DecBinary()
_ = yym235
if false {
} else {
z.F.DecSliceStringX(yyv234, false, d)
}
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ClusterName = ""
} else {
x.ClusterName = string(r.DecodeString())
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = SelfSubjectAccessReviewSpec{}
} else {
yyv237 := &x.Spec
yyv237.CodecDecodeSelf(d)
}
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = SubjectAccessReviewStatus{}
} else {
yyv238 := &x.Status
yyv238.CodecDecodeSelf(d)
}
for {
yyj212++
if yyhl212 {
yyb212 = yyj212 > l
} else {
yyb212 = r.CheckBreak()
}
if yyb212 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj212-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym239 := z.EncBinary()
_ = yym239
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep240 := !z.EncBinary()
yy2arr240 := z.EncBasicHandle().StructToArray
var yyq240 [19]bool
_, _, _ = yysep240, yyq240, yy2arr240
const yyr240 bool = false
yyq240[0] = x.Kind != ""
yyq240[1] = x.APIVersion != ""
yyq240[2] = x.Name != ""
yyq240[3] = x.GenerateName != ""
yyq240[4] = x.Namespace != ""
yyq240[5] = x.SelfLink != ""
yyq240[6] = x.UID != ""
yyq240[7] = x.ResourceVersion != ""
yyq240[8] = x.Generation != 0
yyq240[9] = true
yyq240[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil
yyq240[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil
yyq240[12] = len(x.Labels) != 0
yyq240[13] = len(x.Annotations) != 0
yyq240[14] = len(x.OwnerReferences) != 0
yyq240[15] = len(x.Finalizers) != 0
yyq240[16] = x.ClusterName != ""
var yynn240 int
if yyr240 || yy2arr240 {
r.EncodeArrayStart(19)
} else {
yynn240 = 2
for _, b := range yyq240 {
if b {
yynn240++
}
}
r.EncodeMapStart(yynn240)
yynn240 = 0
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[0] {
yym242 := z.EncBinary()
_ = yym242
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym243 := z.EncBinary()
_ = yym243
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[1] {
yym245 := z.EncBinary()
_ = yym245
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym246 := z.EncBinary()
_ = yym246
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[2] {
yym248 := z.EncBinary()
_ = yym248
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("name"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym249 := z.EncBinary()
_ = yym249
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[3] {
yym251 := z.EncBinary()
_ = yym251
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("generateName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym252 := z.EncBinary()
_ = yym252
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[4] {
yym254 := z.EncBinary()
_ = yym254
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("namespace"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym255 := z.EncBinary()
_ = yym255
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[5] {
yym257 := z.EncBinary()
_ = yym257
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("selfLink"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym258 := z.EncBinary()
_ = yym258
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[6] {
yym260 := z.EncBinary()
_ = yym260
if false {
} else if z.HasExtensions() && z.EncExt(x.UID) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[6] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("uid"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym261 := z.EncBinary()
_ = yym261
if false {
} else if z.HasExtensions() && z.EncExt(x.UID) {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[7] {
yym263 := z.EncBinary()
_ = yym263
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[7] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym264 := z.EncBinary()
_ = yym264
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[8] {
yym266 := z.EncBinary()
_ = yym266
if false {
} else {
r.EncodeInt(int64(x.Generation))
}
} else {
r.EncodeInt(0)
}
} else {
if yyq240[8] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("generation"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym267 := z.EncBinary()
_ = yym267
if false {
} else {
r.EncodeInt(int64(x.Generation))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[9] {
yy269 := &x.CreationTimestamp
yym270 := z.EncBinary()
_ = yym270
if false {
} else if z.HasExtensions() && z.EncExt(yy269) {
} else if yym270 {
z.EncBinaryMarshal(yy269)
} else if !yym270 && z.IsJSONHandle() {
z.EncJSONMarshal(yy269)
} else {
z.EncFallback(yy269)
}
} else {
r.EncodeNil()
}
} else {
if yyq240[9] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy271 := &x.CreationTimestamp
yym272 := z.EncBinary()
_ = yym272
if false {
} else if z.HasExtensions() && z.EncExt(yy271) {
} else if yym272 {
z.EncBinaryMarshal(yy271)
} else if !yym272 && z.IsJSONHandle() {
z.EncJSONMarshal(yy271)
} else {
z.EncFallback(yy271)
}
}
}
var yyn273 bool
if x.ObjectMeta.DeletionTimestamp == nil {
yyn273 = true
goto LABEL273
}
LABEL273:
if yyr240 || yy2arr240 {
if yyn273 {
r.EncodeNil()
} else {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[10] {
if x.DeletionTimestamp == nil {
r.EncodeNil()
} else {
yym274 := z.EncBinary()
_ = yym274
if false {
} else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
} else if yym274 {
z.EncBinaryMarshal(x.DeletionTimestamp)
} else if !yym274 && z.IsJSONHandle() {
z.EncJSONMarshal(x.DeletionTimestamp)
} else {
z.EncFallback(x.DeletionTimestamp)
}
}
} else {
r.EncodeNil()
}
}
} else {
if yyq240[10] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyn273 {
r.EncodeNil()
} else {
if x.DeletionTimestamp == nil {
r.EncodeNil()
} else {
yym275 := z.EncBinary()
_ = yym275
if false {
} else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
} else if yym275 {
z.EncBinaryMarshal(x.DeletionTimestamp)
} else if !yym275 && z.IsJSONHandle() {
z.EncJSONMarshal(x.DeletionTimestamp)
} else {
z.EncFallback(x.DeletionTimestamp)
}
}
}
}
}
var yyn276 bool
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
yyn276 = true
goto LABEL276
}
LABEL276:
if yyr240 || yy2arr240 {
if yyn276 {
r.EncodeNil()
} else {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[11] {
if x.DeletionGracePeriodSeconds == nil {
r.EncodeNil()
} else {
yy277 := *x.DeletionGracePeriodSeconds
yym278 := z.EncBinary()
_ = yym278
if false {
} else {
r.EncodeInt(int64(yy277))
}
}
} else {
r.EncodeNil()
}
}
} else {
if yyq240[11] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyn276 {
r.EncodeNil()
} else {
if x.DeletionGracePeriodSeconds == nil {
r.EncodeNil()
} else {
yy279 := *x.DeletionGracePeriodSeconds
yym280 := z.EncBinary()
_ = yym280
if false {
} else {
r.EncodeInt(int64(yy279))
}
}
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[12] {
if x.Labels == nil {
r.EncodeNil()
} else {
yym282 := z.EncBinary()
_ = yym282
if false {
} else {
z.F.EncMapStringStringV(x.Labels, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq240[12] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("labels"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Labels == nil {
r.EncodeNil()
} else {
yym283 := z.EncBinary()
_ = yym283
if false {
} else {
z.F.EncMapStringStringV(x.Labels, false, e)
}
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[13] {
if x.Annotations == nil {
r.EncodeNil()
} else {
yym285 := z.EncBinary()
_ = yym285
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq240[13] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("annotations"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Annotations == nil {
r.EncodeNil()
} else {
yym286 := z.EncBinary()
_ = yym286
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[14] {
if x.OwnerReferences == nil {
r.EncodeNil()
} else {
yym288 := z.EncBinary()
_ = yym288
if false {
} else {
h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq240[14] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("ownerReferences"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.OwnerReferences == nil {
r.EncodeNil()
} else {
yym289 := z.EncBinary()
_ = yym289
if false {
} else {
h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
}
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[15] {
if x.Finalizers == nil {
r.EncodeNil()
} else {
yym291 := z.EncBinary()
_ = yym291
if false {
} else {
z.F.EncSliceStringV(x.Finalizers, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq240[15] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Finalizers == nil {
r.EncodeNil()
} else {
yym292 := z.EncBinary()
_ = yym292
if false {
} else {
z.F.EncSliceStringV(x.Finalizers, false, e)
}
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq240[16] {
yym294 := z.EncBinary()
_ = yym294
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq240[16] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym295 := z.EncBinary()
_ = yym295
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
}
}
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy297 := &x.Spec
yy297.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy298 := &x.Spec
yy298.CodecEncodeSelf(e)
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy300 := &x.Status
yy300.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy301 := &x.Status
yy301.CodecEncodeSelf(e)
}
if yyr240 || yy2arr240 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym302 := z.DecBinary()
_ = yym302
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct303 := r.ContainerType()
if yyct303 == codecSelferValueTypeMap1234 {
yyl303 := r.ReadMapStart()
if yyl303 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl303, d)
}
} else if yyct303 == codecSelferValueTypeArray1234 {
yyl303 := r.ReadArrayStart()
if yyl303 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl303, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys304Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys304Slc
var yyhl304 bool = l >= 0
for yyj304 := 0; ; yyj304++ {
if yyhl304 {
if yyj304 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys304Slc = r.DecodeBytes(yys304Slc, true, true)
yys304 := string(yys304Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys304 {
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 "name":
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
case "generateName":
if r.TryDecodeAsNil() {
x.GenerateName = ""
} else {
x.GenerateName = string(r.DecodeString())
}
case "namespace":
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
case "selfLink":
if r.TryDecodeAsNil() {
x.SelfLink = ""
} else {
x.SelfLink = string(r.DecodeString())
}
case "uid":
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = pkg3_types.UID(r.DecodeString())
}
case "resourceVersion":
if r.TryDecodeAsNil() {
x.ResourceVersion = ""
} else {
x.ResourceVersion = string(r.DecodeString())
}
case "generation":
if r.TryDecodeAsNil() {
x.Generation = 0
} else {
x.Generation = int64(r.DecodeInt(64))
}
case "creationTimestamp":
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
} else {
yyv314 := &x.CreationTimestamp
yym315 := z.DecBinary()
_ = yym315
if false {
} else if z.HasExtensions() && z.DecExt(yyv314) {
} else if yym315 {
z.DecBinaryUnmarshal(yyv314)
} else if !yym315 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv314)
} else {
z.DecFallback(yyv314, false)
}
}
case "deletionTimestamp":
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
}
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
x.DeletionTimestamp = nil
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yym317 := z.DecBinary()
_ = yym317
if false {
} else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
} else if yym317 {
z.DecBinaryUnmarshal(x.DeletionTimestamp)
} else if !yym317 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.DeletionTimestamp)
} else {
z.DecFallback(x.DeletionTimestamp, false)
}
}
case "deletionGracePeriodSeconds":
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
}
if r.TryDecodeAsNil() {
if x.DeletionGracePeriodSeconds != nil {
x.DeletionGracePeriodSeconds = nil
}
} else {
if x.DeletionGracePeriodSeconds == nil {
x.DeletionGracePeriodSeconds = new(int64)
}
yym319 := z.DecBinary()
_ = yym319
if false {
} else {
*((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
}
}
case "labels":
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
yyv320 := &x.Labels
yym321 := z.DecBinary()
_ = yym321
if false {
} else {
z.F.DecMapStringStringX(yyv320, false, d)
}
}
case "annotations":
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv322 := &x.Annotations
yym323 := z.DecBinary()
_ = yym323
if false {
} else {
z.F.DecMapStringStringX(yyv322, false, d)
}
}
case "ownerReferences":
if r.TryDecodeAsNil() {
x.OwnerReferences = nil
} else {
yyv324 := &x.OwnerReferences
yym325 := z.DecBinary()
_ = yym325
if false {
} else {
h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv324), d)
}
}
case "finalizers":
if r.TryDecodeAsNil() {
x.Finalizers = nil
} else {
yyv326 := &x.Finalizers
yym327 := z.DecBinary()
_ = yym327
if false {
} else {
z.F.DecSliceStringX(yyv326, false, d)
}
}
case "clusterName":
if r.TryDecodeAsNil() {
x.ClusterName = ""
} else {
x.ClusterName = string(r.DecodeString())
}
case "Spec":
if r.TryDecodeAsNil() {
x.Spec = SubjectAccessReviewSpec{}
} else {
yyv329 := &x.Spec
yyv329.CodecDecodeSelf(d)
}
case "Status":
if r.TryDecodeAsNil() {
x.Status = SubjectAccessReviewStatus{}
} else {
yyv330 := &x.Status
yyv330.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys304)
} // end switch yys304
} // end for yyj304
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj331 int
var yyb331 bool
var yyhl331 bool = l >= 0
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.GenerateName = ""
} else {
x.GenerateName = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.SelfLink = ""
} else {
x.SelfLink = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = pkg3_types.UID(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ResourceVersion = ""
} else {
x.ResourceVersion = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Generation = 0
} else {
x.Generation = int64(r.DecodeInt(64))
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CreationTimestamp = pkg1_unversioned.Time{}
} else {
yyv341 := &x.CreationTimestamp
yym342 := z.DecBinary()
_ = yym342
if false {
} else if z.HasExtensions() && z.DecExt(yyv341) {
} else if yym342 {
z.DecBinaryUnmarshal(yyv341)
} else if !yym342 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv341)
} else {
z.DecFallback(yyv341, false)
}
}
if x.ObjectMeta.DeletionTimestamp == nil {
x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeletionTimestamp != nil {
x.DeletionTimestamp = nil
}
} else {
if x.DeletionTimestamp == nil {
x.DeletionTimestamp = new(pkg1_unversioned.Time)
}
yym344 := z.DecBinary()
_ = yym344
if false {
} else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
} else if yym344 {
z.DecBinaryUnmarshal(x.DeletionTimestamp)
} else if !yym344 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.DeletionTimestamp)
} else {
z.DecFallback(x.DeletionTimestamp, false)
}
}
if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.DeletionGracePeriodSeconds != nil {
x.DeletionGracePeriodSeconds = nil
}
} else {
if x.DeletionGracePeriodSeconds == nil {
x.DeletionGracePeriodSeconds = new(int64)
}
yym346 := z.DecBinary()
_ = yym346
if false {
} else {
*((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
}
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Labels = nil
} else {
yyv347 := &x.Labels
yym348 := z.DecBinary()
_ = yym348
if false {
} else {
z.F.DecMapStringStringX(yyv347, false, d)
}
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv349 := &x.Annotations
yym350 := z.DecBinary()
_ = yym350
if false {
} else {
z.F.DecMapStringStringX(yyv349, false, d)
}
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.OwnerReferences = nil
} else {
yyv351 := &x.OwnerReferences
yym352 := z.DecBinary()
_ = yym352
if false {
} else {
h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv351), d)
}
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Finalizers = nil
} else {
yyv353 := &x.Finalizers
yym354 := z.DecBinary()
_ = yym354
if false {
} else {
z.F.DecSliceStringX(yyv353, false, d)
}
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ClusterName = ""
} else {
x.ClusterName = string(r.DecodeString())
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = SubjectAccessReviewSpec{}
} else {
yyv356 := &x.Spec
yyv356.CodecDecodeSelf(d)
}
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = SubjectAccessReviewStatus{}
} else {
yyv357 := &x.Status
yyv357.CodecDecodeSelf(d)
}
for {
yyj331++
if yyhl331 {
yyb331 = yyj331 > l
} else {
yyb331 = r.CheckBreak()
}
if yyb331 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj331-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym358 := z.EncBinary()
_ = yym358
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep359 := !z.EncBinary()
yy2arr359 := z.EncBasicHandle().StructToArray
var yyq359 [7]bool
_, _, _ = yysep359, yyq359, yy2arr359
const yyr359 bool = false
var yynn359 int
if yyr359 || yy2arr359 {
r.EncodeArrayStart(7)
} else {
yynn359 = 7
for _, b := range yyq359 {
if b {
yynn359++
}
}
r.EncodeMapStart(yynn359)
yynn359 = 0
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym361 := z.EncBinary()
_ = yym361
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Namespace"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym362 := z.EncBinary()
_ = yym362
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym364 := z.EncBinary()
_ = yym364
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Verb"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym365 := z.EncBinary()
_ = yym365
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym367 := z.EncBinary()
_ = yym367
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Group))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Group"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym368 := z.EncBinary()
_ = yym368
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Group))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym370 := z.EncBinary()
_ = yym370
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Version"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym371 := z.EncBinary()
_ = yym371
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym373 := z.EncBinary()
_ = yym373
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Resource"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym374 := z.EncBinary()
_ = yym374
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym376 := z.EncBinary()
_ = yym376
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Subresource"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym377 := z.EncBinary()
_ = yym377
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym379 := z.EncBinary()
_ = yym379
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Name"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym380 := z.EncBinary()
_ = yym380
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
}
if yyr359 || yy2arr359 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym381 := z.DecBinary()
_ = yym381
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct382 := r.ContainerType()
if yyct382 == codecSelferValueTypeMap1234 {
yyl382 := r.ReadMapStart()
if yyl382 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl382, d)
}
} else if yyct382 == codecSelferValueTypeArray1234 {
yyl382 := r.ReadArrayStart()
if yyl382 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl382, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys383Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys383Slc
var yyhl383 bool = l >= 0
for yyj383 := 0; ; yyj383++ {
if yyhl383 {
if yyj383 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys383Slc = r.DecodeBytes(yys383Slc, true, true)
yys383 := string(yys383Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys383 {
case "Namespace":
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
case "Verb":
if r.TryDecodeAsNil() {
x.Verb = ""
} else {
x.Verb = string(r.DecodeString())
}
case "Group":
if r.TryDecodeAsNil() {
x.Group = ""
} else {
x.Group = string(r.DecodeString())
}
case "Version":
if r.TryDecodeAsNil() {
x.Version = ""
} else {
x.Version = string(r.DecodeString())
}
case "Resource":
if r.TryDecodeAsNil() {
x.Resource = ""
} else {
x.Resource = string(r.DecodeString())
}
case "Subresource":
if r.TryDecodeAsNil() {
x.Subresource = ""
} else {
x.Subresource = string(r.DecodeString())
}
case "Name":
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys383)
} // end switch yys383
} // end for yyj383
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj391 int
var yyb391 bool
var yyhl391 bool = l >= 0
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Verb = ""
} else {
x.Verb = string(r.DecodeString())
}
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Group = ""
} else {
x.Group = string(r.DecodeString())
}
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Version = ""
} else {
x.Version = string(r.DecodeString())
}
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Resource = ""
} else {
x.Resource = string(r.DecodeString())
}
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Subresource = ""
} else {
x.Subresource = string(r.DecodeString())
}
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
for {
yyj391++
if yyhl391 {
yyb391 = yyj391 > l
} else {
yyb391 = r.CheckBreak()
}
if yyb391 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj391-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym399 := z.EncBinary()
_ = yym399
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep400 := !z.EncBinary()
yy2arr400 := z.EncBasicHandle().StructToArray
var yyq400 [2]bool
_, _, _ = yysep400, yyq400, yy2arr400
const yyr400 bool = false
var yynn400 int
if yyr400 || yy2arr400 {
r.EncodeArrayStart(2)
} else {
yynn400 = 2
for _, b := range yyq400 {
if b {
yynn400++
}
}
r.EncodeMapStart(yynn400)
yynn400 = 0
}
if yyr400 || yy2arr400 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym402 := z.EncBinary()
_ = yym402
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Path))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Path"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym403 := z.EncBinary()
_ = yym403
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Path))
}
}
if yyr400 || yy2arr400 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym405 := z.EncBinary()
_ = yym405
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Verb"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym406 := z.EncBinary()
_ = yym406
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
}
}
if yyr400 || yy2arr400 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym407 := z.DecBinary()
_ = yym407
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct408 := r.ContainerType()
if yyct408 == codecSelferValueTypeMap1234 {
yyl408 := r.ReadMapStart()
if yyl408 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl408, d)
}
} else if yyct408 == codecSelferValueTypeArray1234 {
yyl408 := r.ReadArrayStart()
if yyl408 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl408, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys409Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys409Slc
var yyhl409 bool = l >= 0
for yyj409 := 0; ; yyj409++ {
if yyhl409 {
if yyj409 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys409Slc = r.DecodeBytes(yys409Slc, true, true)
yys409 := string(yys409Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys409 {
case "Path":
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = string(r.DecodeString())
}
case "Verb":
if r.TryDecodeAsNil() {
x.Verb = ""
} else {
x.Verb = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys409)
} // end switch yys409
} // end for yyj409
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj412 int
var yyb412 bool
var yyhl412 bool = l >= 0
yyj412++
if yyhl412 {
yyb412 = yyj412 > l
} else {
yyb412 = r.CheckBreak()
}
if yyb412 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = string(r.DecodeString())
}
yyj412++
if yyhl412 {
yyb412 = yyj412 > l
} else {
yyb412 = r.CheckBreak()
}
if yyb412 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Verb = ""
} else {
x.Verb = string(r.DecodeString())
}
for {
yyj412++
if yyhl412 {
yyb412 = yyj412 > l
} else {
yyb412 = r.CheckBreak()
}
if yyb412 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj412-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym415 := z.EncBinary()
_ = yym415
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep416 := !z.EncBinary()
yy2arr416 := z.EncBasicHandle().StructToArray
var yyq416 [5]bool
_, _, _ = yysep416, yyq416, yy2arr416
const yyr416 bool = false
var yynn416 int
if yyr416 || yy2arr416 {
r.EncodeArrayStart(5)
} else {
yynn416 = 5
for _, b := range yyq416 {
if b {
yynn416++
}
}
r.EncodeMapStart(yynn416)
yynn416 = 0
}
if yyr416 || yy2arr416 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.ResourceAttributes == nil {
r.EncodeNil()
} else {
x.ResourceAttributes.CodecEncodeSelf(e)
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("ResourceAttributes"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ResourceAttributes == nil {
r.EncodeNil()
} else {
x.ResourceAttributes.CodecEncodeSelf(e)
}
}
if yyr416 || yy2arr416 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.NonResourceAttributes == nil {
r.EncodeNil()
} else {
x.NonResourceAttributes.CodecEncodeSelf(e)
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("NonResourceAttributes"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.NonResourceAttributes == nil {
r.EncodeNil()
} else {
x.NonResourceAttributes.CodecEncodeSelf(e)
}
}
if yyr416 || yy2arr416 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym420 := z.EncBinary()
_ = yym420
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.User))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("User"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym421 := z.EncBinary()
_ = yym421
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.User))
}
}
if yyr416 || yy2arr416 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Groups == nil {
r.EncodeNil()
} else {
yym423 := z.EncBinary()
_ = yym423
if false {
} else {
z.F.EncSliceStringV(x.Groups, false, e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Groups"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Groups == nil {
r.EncodeNil()
} else {
yym424 := z.EncBinary()
_ = yym424
if false {
} else {
z.F.EncSliceStringV(x.Groups, false, e)
}
}
}
if yyr416 || yy2arr416 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Extra == nil {
r.EncodeNil()
} else {
yym426 := z.EncBinary()
_ = yym426
if false {
} else {
h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Extra"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Extra == nil {
r.EncodeNil()
} else {
yym427 := z.EncBinary()
_ = yym427
if false {
} else {
h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
}
}
}
if yyr416 || yy2arr416 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym428 := z.DecBinary()
_ = yym428
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct429 := r.ContainerType()
if yyct429 == codecSelferValueTypeMap1234 {
yyl429 := r.ReadMapStart()
if yyl429 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl429, d)
}
} else if yyct429 == codecSelferValueTypeArray1234 {
yyl429 := r.ReadArrayStart()
if yyl429 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl429, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys430Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys430Slc
var yyhl430 bool = l >= 0
for yyj430 := 0; ; yyj430++ {
if yyhl430 {
if yyj430 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys430Slc = r.DecodeBytes(yys430Slc, true, true)
yys430 := string(yys430Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys430 {
case "ResourceAttributes":
if r.TryDecodeAsNil() {
if x.ResourceAttributes != nil {
x.ResourceAttributes = nil
}
} else {
if x.ResourceAttributes == nil {
x.ResourceAttributes = new(ResourceAttributes)
}
x.ResourceAttributes.CodecDecodeSelf(d)
}
case "NonResourceAttributes":
if r.TryDecodeAsNil() {
if x.NonResourceAttributes != nil {
x.NonResourceAttributes = nil
}
} else {
if x.NonResourceAttributes == nil {
x.NonResourceAttributes = new(NonResourceAttributes)
}
x.NonResourceAttributes.CodecDecodeSelf(d)
}
case "User":
if r.TryDecodeAsNil() {
x.User = ""
} else {
x.User = string(r.DecodeString())
}
case "Groups":
if r.TryDecodeAsNil() {
x.Groups = nil
} else {
yyv434 := &x.Groups
yym435 := z.DecBinary()
_ = yym435
if false {
} else {
z.F.DecSliceStringX(yyv434, false, d)
}
}
case "Extra":
if r.TryDecodeAsNil() {
x.Extra = nil
} else {
yyv436 := &x.Extra
yym437 := z.DecBinary()
_ = yym437
if false {
} else {
h.decMapstringExtraValue((*map[string]ExtraValue)(yyv436), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys430)
} // end switch yys430
} // end for yyj430
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj438 int
var yyb438 bool
var yyhl438 bool = l >= 0
yyj438++
if yyhl438 {
yyb438 = yyj438 > l
} else {
yyb438 = r.CheckBreak()
}
if yyb438 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.ResourceAttributes != nil {
x.ResourceAttributes = nil
}
} else {
if x.ResourceAttributes == nil {
x.ResourceAttributes = new(ResourceAttributes)
}
x.ResourceAttributes.CodecDecodeSelf(d)
}
yyj438++
if yyhl438 {
yyb438 = yyj438 > l
} else {
yyb438 = r.CheckBreak()
}
if yyb438 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.NonResourceAttributes != nil {
x.NonResourceAttributes = nil
}
} else {
if x.NonResourceAttributes == nil {
x.NonResourceAttributes = new(NonResourceAttributes)
}
x.NonResourceAttributes.CodecDecodeSelf(d)
}
yyj438++
if yyhl438 {
yyb438 = yyj438 > l
} else {
yyb438 = r.CheckBreak()
}
if yyb438 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.User = ""
} else {
x.User = string(r.DecodeString())
}
yyj438++
if yyhl438 {
yyb438 = yyj438 > l
} else {
yyb438 = r.CheckBreak()
}
if yyb438 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Groups = nil
} else {
yyv442 := &x.Groups
yym443 := z.DecBinary()
_ = yym443
if false {
} else {
z.F.DecSliceStringX(yyv442, false, d)
}
}
yyj438++
if yyhl438 {
yyb438 = yyj438 > l
} else {
yyb438 = r.CheckBreak()
}
if yyb438 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Extra = nil
} else {
yyv444 := &x.Extra
yym445 := z.DecBinary()
_ = yym445
if false {
} else {
h.decMapstringExtraValue((*map[string]ExtraValue)(yyv444), d)
}
}
for {
yyj438++
if yyhl438 {
yyb438 = yyj438 > l
} else {
yyb438 = r.CheckBreak()
}
if yyb438 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj438-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym446 := z.EncBinary()
_ = yym446
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
h.encExtraValue((ExtraValue)(x), e)
}
}
}
func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym447 := z.DecBinary()
_ = yym447
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
h.decExtraValue((*ExtraValue)(x), d)
}
}
func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym448 := z.EncBinary()
_ = yym448
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep449 := !z.EncBinary()
yy2arr449 := z.EncBasicHandle().StructToArray
var yyq449 [2]bool
_, _, _ = yysep449, yyq449, yy2arr449
const yyr449 bool = false
var yynn449 int
if yyr449 || yy2arr449 {
r.EncodeArrayStart(2)
} else {
yynn449 = 2
for _, b := range yyq449 {
if b {
yynn449++
}
}
r.EncodeMapStart(yynn449)
yynn449 = 0
}
if yyr449 || yy2arr449 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.ResourceAttributes == nil {
r.EncodeNil()
} else {
x.ResourceAttributes.CodecEncodeSelf(e)
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("ResourceAttributes"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.ResourceAttributes == nil {
r.EncodeNil()
} else {
x.ResourceAttributes.CodecEncodeSelf(e)
}
}
if yyr449 || yy2arr449 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.NonResourceAttributes == nil {
r.EncodeNil()
} else {
x.NonResourceAttributes.CodecEncodeSelf(e)
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("NonResourceAttributes"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.NonResourceAttributes == nil {
r.EncodeNil()
} else {
x.NonResourceAttributes.CodecEncodeSelf(e)
}
}
if yyr449 || yy2arr449 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym452 := z.DecBinary()
_ = yym452
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct453 := r.ContainerType()
if yyct453 == codecSelferValueTypeMap1234 {
yyl453 := r.ReadMapStart()
if yyl453 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl453, d)
}
} else if yyct453 == codecSelferValueTypeArray1234 {
yyl453 := r.ReadArrayStart()
if yyl453 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl453, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys454Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys454Slc
var yyhl454 bool = l >= 0
for yyj454 := 0; ; yyj454++ {
if yyhl454 {
if yyj454 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys454Slc = r.DecodeBytes(yys454Slc, true, true)
yys454 := string(yys454Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys454 {
case "ResourceAttributes":
if r.TryDecodeAsNil() {
if x.ResourceAttributes != nil {
x.ResourceAttributes = nil
}
} else {
if x.ResourceAttributes == nil {
x.ResourceAttributes = new(ResourceAttributes)
}
x.ResourceAttributes.CodecDecodeSelf(d)
}
case "NonResourceAttributes":
if r.TryDecodeAsNil() {
if x.NonResourceAttributes != nil {
x.NonResourceAttributes = nil
}
} else {
if x.NonResourceAttributes == nil {
x.NonResourceAttributes = new(NonResourceAttributes)
}
x.NonResourceAttributes.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys454)
} // end switch yys454
} // end for yyj454
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj457 int
var yyb457 bool
var yyhl457 bool = l >= 0
yyj457++
if yyhl457 {
yyb457 = yyj457 > l
} else {
yyb457 = r.CheckBreak()
}
if yyb457 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.ResourceAttributes != nil {
x.ResourceAttributes = nil
}
} else {
if x.ResourceAttributes == nil {
x.ResourceAttributes = new(ResourceAttributes)
}
x.ResourceAttributes.CodecDecodeSelf(d)
}
yyj457++
if yyhl457 {
yyb457 = yyj457 > l
} else {
yyb457 = r.CheckBreak()
}
if yyb457 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.NonResourceAttributes != nil {
x.NonResourceAttributes = nil
}
} else {
if x.NonResourceAttributes == nil {
x.NonResourceAttributes = new(NonResourceAttributes)
}
x.NonResourceAttributes.CodecDecodeSelf(d)
}
for {
yyj457++
if yyhl457 {
yyb457 = yyj457 > l
} else {
yyb457 = r.CheckBreak()
}
if yyb457 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj457-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym460 := z.EncBinary()
_ = yym460
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep461 := !z.EncBinary()
yy2arr461 := z.EncBasicHandle().StructToArray
var yyq461 [3]bool
_, _, _ = yysep461, yyq461, yy2arr461
const yyr461 bool = false
var yynn461 int
if yyr461 || yy2arr461 {
r.EncodeArrayStart(3)
} else {
yynn461 = 3
for _, b := range yyq461 {
if b {
yynn461++
}
}
r.EncodeMapStart(yynn461)
yynn461 = 0
}
if yyr461 || yy2arr461 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym463 := z.EncBinary()
_ = yym463
if false {
} else {
r.EncodeBool(bool(x.Allowed))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Allowed"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym464 := z.EncBinary()
_ = yym464
if false {
} else {
r.EncodeBool(bool(x.Allowed))
}
}
if yyr461 || yy2arr461 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym466 := z.EncBinary()
_ = yym466
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Reason"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym467 := z.EncBinary()
_ = yym467
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
}
}
if yyr461 || yy2arr461 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym469 := z.EncBinary()
_ = yym469
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("EvaluationError"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym470 := z.EncBinary()
_ = yym470
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
}
}
if yyr461 || yy2arr461 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym471 := z.DecBinary()
_ = yym471
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct472 := r.ContainerType()
if yyct472 == codecSelferValueTypeMap1234 {
yyl472 := r.ReadMapStart()
if yyl472 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl472, d)
}
} else if yyct472 == codecSelferValueTypeArray1234 {
yyl472 := r.ReadArrayStart()
if yyl472 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl472, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys473Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys473Slc
var yyhl473 bool = l >= 0
for yyj473 := 0; ; yyj473++ {
if yyhl473 {
if yyj473 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys473Slc = r.DecodeBytes(yys473Slc, true, true)
yys473 := string(yys473Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys473 {
case "Allowed":
if r.TryDecodeAsNil() {
x.Allowed = false
} else {
x.Allowed = bool(r.DecodeBool())
}
case "Reason":
if r.TryDecodeAsNil() {
x.Reason = ""
} else {
x.Reason = string(r.DecodeString())
}
case "EvaluationError":
if r.TryDecodeAsNil() {
x.EvaluationError = ""
} else {
x.EvaluationError = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys473)
} // end switch yys473
} // end for yyj473
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj477 int
var yyb477 bool
var yyhl477 bool = l >= 0
yyj477++
if yyhl477 {
yyb477 = yyj477 > l
} else {
yyb477 = r.CheckBreak()
}
if yyb477 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Allowed = false
} else {
x.Allowed = bool(r.DecodeBool())
}
yyj477++
if yyhl477 {
yyb477 = yyj477 > l
} else {
yyb477 = r.CheckBreak()
}
if yyb477 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Reason = ""
} else {
x.Reason = string(r.DecodeString())
}
yyj477++
if yyhl477 {
yyb477 = yyj477 > l
} else {
yyb477 = r.CheckBreak()
}
if yyb477 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.EvaluationError = ""
} else {
x.EvaluationError = string(r.DecodeString())
}
for {
yyj477++
if yyhl477 {
yyb477 = yyj477 > l
} else {
yyb477 = r.CheckBreak()
}
if yyb477 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj477-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) encSliceapi_OwnerReference(v []pkg2_api.OwnerReference, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv481 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy482 := &yyv481
yy482.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceapi_OwnerReference(v *[]pkg2_api.OwnerReference, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv483 := *v
yyh483, yyl483 := z.DecSliceHelperStart()
var yyc483 bool
if yyl483 == 0 {
if yyv483 == nil {
yyv483 = []pkg2_api.OwnerReference{}
yyc483 = true
} else if len(yyv483) != 0 {
yyv483 = yyv483[:0]
yyc483 = true
}
} else if yyl483 > 0 {
var yyrr483, yyrl483 int
var yyrt483 bool
if yyl483 > cap(yyv483) {
yyrg483 := len(yyv483) > 0
yyv2483 := yyv483
yyrl483, yyrt483 = z.DecInferLen(yyl483, z.DecBasicHandle().MaxInitLen, 72)
if yyrt483 {
if yyrl483 <= cap(yyv483) {
yyv483 = yyv483[:yyrl483]
} else {
yyv483 = make([]pkg2_api.OwnerReference, yyrl483)
}
} else {
yyv483 = make([]pkg2_api.OwnerReference, yyrl483)
}
yyc483 = true
yyrr483 = len(yyv483)
if yyrg483 {
copy(yyv483, yyv2483)
}
} else if yyl483 != len(yyv483) {
yyv483 = yyv483[:yyl483]
yyc483 = true
}
yyj483 := 0
for ; yyj483 < yyrr483; yyj483++ {
yyh483.ElemContainerState(yyj483)
if r.TryDecodeAsNil() {
yyv483[yyj483] = pkg2_api.OwnerReference{}
} else {
yyv484 := &yyv483[yyj483]
yyv484.CodecDecodeSelf(d)
}
}
if yyrt483 {
for ; yyj483 < yyl483; yyj483++ {
yyv483 = append(yyv483, pkg2_api.OwnerReference{})
yyh483.ElemContainerState(yyj483)
if r.TryDecodeAsNil() {
yyv483[yyj483] = pkg2_api.OwnerReference{}
} else {
yyv485 := &yyv483[yyj483]
yyv485.CodecDecodeSelf(d)
}
}
}
} else {
yyj483 := 0
for ; !r.CheckBreak(); yyj483++ {
if yyj483 >= len(yyv483) {
yyv483 = append(yyv483, pkg2_api.OwnerReference{}) // var yyz483 pkg2_api.OwnerReference
yyc483 = true
}
yyh483.ElemContainerState(yyj483)
if yyj483 < len(yyv483) {
if r.TryDecodeAsNil() {
yyv483[yyj483] = pkg2_api.OwnerReference{}
} else {
yyv486 := &yyv483[yyj483]
yyv486.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj483 < len(yyv483) {
yyv483 = yyv483[:yyj483]
yyc483 = true
} else if yyj483 == 0 && yyv483 == nil {
yyv483 = []pkg2_api.OwnerReference{}
yyc483 = true
}
}
yyh483.End()
if yyc483 {
*v = yyv483
}
}
func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeMapStart(len(v))
for yyk487, yyv487 := range v {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
yym488 := z.EncBinary()
_ = yym488
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yyk487))
}
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyv487 == nil {
r.EncodeNil()
} else {
yyv487.CodecEncodeSelf(e)
}
}
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv489 := *v
yyl489 := r.ReadMapStart()
yybh489 := z.DecBasicHandle()
if yyv489 == nil {
yyrl489, _ := z.DecInferLen(yyl489, yybh489.MaxInitLen, 40)
yyv489 = make(map[string]ExtraValue, yyrl489)
*v = yyv489
}
var yymk489 string
var yymv489 ExtraValue
var yymg489 bool
if yybh489.MapValueReset {
yymg489 = true
}
if yyl489 > 0 {
for yyj489 := 0; yyj489 < yyl489; yyj489++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk489 = ""
} else {
yymk489 = string(r.DecodeString())
}
if yymg489 {
yymv489 = yyv489[yymk489]
} else {
yymv489 = nil
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv489 = nil
} else {
yyv491 := &yymv489
yyv491.CodecDecodeSelf(d)
}
if yyv489 != nil {
yyv489[yymk489] = yymv489
}
}
} else if yyl489 < 0 {
for yyj489 := 0; !r.CheckBreak(); yyj489++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk489 = ""
} else {
yymk489 = string(r.DecodeString())
}
if yymg489 {
yymv489 = yyv489[yymk489]
} else {
yymv489 = nil
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv489 = nil
} else {
yyv493 := &yymv489
yyv493.CodecDecodeSelf(d)
}
if yyv489 != nil {
yyv489[yymk489] = yymv489
}
}
} // else len==0: TODO: Should we clear map entries?
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv494 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym495 := z.EncBinary()
_ = yym495
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yyv494))
}
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv496 := *v
yyh496, yyl496 := z.DecSliceHelperStart()
var yyc496 bool
if yyl496 == 0 {
if yyv496 == nil {
yyv496 = []string{}
yyc496 = true
} else if len(yyv496) != 0 {
yyv496 = yyv496[:0]
yyc496 = true
}
} else if yyl496 > 0 {
var yyrr496, yyrl496 int
var yyrt496 bool
if yyl496 > cap(yyv496) {
yyrl496, yyrt496 = z.DecInferLen(yyl496, z.DecBasicHandle().MaxInitLen, 16)
if yyrt496 {
if yyrl496 <= cap(yyv496) {
yyv496 = yyv496[:yyrl496]
} else {
yyv496 = make([]string, yyrl496)
}
} else {
yyv496 = make([]string, yyrl496)
}
yyc496 = true
yyrr496 = len(yyv496)
} else if yyl496 != len(yyv496) {
yyv496 = yyv496[:yyl496]
yyc496 = true
}
yyj496 := 0
for ; yyj496 < yyrr496; yyj496++ {
yyh496.ElemContainerState(yyj496)
if r.TryDecodeAsNil() {
yyv496[yyj496] = ""
} else {
yyv496[yyj496] = string(r.DecodeString())
}
}
if yyrt496 {
for ; yyj496 < yyl496; yyj496++ {
yyv496 = append(yyv496, "")
yyh496.ElemContainerState(yyj496)
if r.TryDecodeAsNil() {
yyv496[yyj496] = ""
} else {
yyv496[yyj496] = string(r.DecodeString())
}
}
}
} else {
yyj496 := 0
for ; !r.CheckBreak(); yyj496++ {
if yyj496 >= len(yyv496) {
yyv496 = append(yyv496, "") // var yyz496 string
yyc496 = true
}
yyh496.ElemContainerState(yyj496)
if yyj496 < len(yyv496) {
if r.TryDecodeAsNil() {
yyv496[yyj496] = ""
} else {
yyv496[yyj496] = string(r.DecodeString())
}
} else {
z.DecSwallow()
}
}
if yyj496 < len(yyv496) {
yyv496 = yyv496[:yyj496]
yyc496 = true
} else if yyj496 == 0 && yyv496 == nil {
yyv496 = []string{}
yyc496 = true
}
}
yyh496.End()
if yyc496 {
*v = yyv496
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.4.2

搜索帮助

344bd9b3 5694891 D2dac590 5694891