1 Star 0 Fork 0

zhuchance / kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.generated.go 56.64 KB
一键复制 编辑 原始数据 按行查看 历史
Chao Xu 提交于 2016-10-17 15:06 . run copy.sh, remove 1.5 folder
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394
/*
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 authentication
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_api "k8s.io/client-go/pkg/api"
pkg1_unversioned "k8s.io/client-go/pkg/api/unversioned"
pkg3_types "k8s.io/client-go/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 *TokenReview) 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 *TokenReview) 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 *TokenReview) 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 = TokenReviewSpec{}
} else {
yyv91 := &x.Spec
yyv91.CodecDecodeSelf(d)
}
case "Status":
if r.TryDecodeAsNil() {
x.Status = TokenReviewStatus{}
} else {
yyv92 := &x.Status
yyv92.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys66)
} // end switch yys66
} // end for yyj66
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *TokenReview) 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 = TokenReviewSpec{}
} 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 = TokenReviewStatus{}
} 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 *TokenReviewSpec) 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 [1]bool
_, _, _ = yysep121, yyq121, yy2arr121
const yyr121 bool = false
var yynn121 int
if yyr121 || yy2arr121 {
r.EncodeArrayStart(1)
} else {
yynn121 = 1
for _, b := range yyq121 {
if b {
yynn121++
}
}
r.EncodeMapStart(yynn121)
yynn121 = 0
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym123 := z.EncBinary()
_ = yym123
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Token))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Token"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym124 := z.EncBinary()
_ = yym124
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Token))
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *TokenReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym125 := z.DecBinary()
_ = yym125
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct126 := r.ContainerType()
if yyct126 == codecSelferValueTypeMap1234 {
yyl126 := r.ReadMapStart()
if yyl126 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl126, d)
}
} else if yyct126 == codecSelferValueTypeArray1234 {
yyl126 := r.ReadArrayStart()
if yyl126 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl126, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys127Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys127Slc
var yyhl127 bool = l >= 0
for yyj127 := 0; ; yyj127++ {
if yyhl127 {
if yyj127 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys127Slc = r.DecodeBytes(yys127Slc, true, true)
yys127 := string(yys127Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys127 {
case "Token":
if r.TryDecodeAsNil() {
x.Token = ""
} else {
x.Token = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys127)
} // end switch yys127
} // end for yyj127
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *TokenReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj129 int
var yyb129 bool
var yyhl129 bool = l >= 0
yyj129++
if yyhl129 {
yyb129 = yyj129 > l
} else {
yyb129 = r.CheckBreak()
}
if yyb129 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Token = ""
} else {
x.Token = string(r.DecodeString())
}
for {
yyj129++
if yyhl129 {
yyb129 = yyj129 > l
} else {
yyb129 = r.CheckBreak()
}
if yyb129 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj129-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym131 := z.EncBinary()
_ = yym131
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep132 := !z.EncBinary()
yy2arr132 := z.EncBasicHandle().StructToArray
var yyq132 [3]bool
_, _, _ = yysep132, yyq132, yy2arr132
const yyr132 bool = false
var yynn132 int
if yyr132 || yy2arr132 {
r.EncodeArrayStart(3)
} else {
yynn132 = 3
for _, b := range yyq132 {
if b {
yynn132++
}
}
r.EncodeMapStart(yynn132)
yynn132 = 0
}
if yyr132 || yy2arr132 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym134 := z.EncBinary()
_ = yym134
if false {
} else {
r.EncodeBool(bool(x.Authenticated))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Authenticated"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym135 := z.EncBinary()
_ = yym135
if false {
} else {
r.EncodeBool(bool(x.Authenticated))
}
}
if yyr132 || yy2arr132 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy137 := &x.User
yy137.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("User"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy138 := &x.User
yy138.CodecEncodeSelf(e)
}
if yyr132 || yy2arr132 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym140 := z.EncBinary()
_ = yym140
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Error))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Error"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym141 := z.EncBinary()
_ = yym141
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Error))
}
}
if yyr132 || yy2arr132 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *TokenReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym142 := z.DecBinary()
_ = yym142
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct143 := r.ContainerType()
if yyct143 == codecSelferValueTypeMap1234 {
yyl143 := r.ReadMapStart()
if yyl143 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl143, d)
}
} else if yyct143 == codecSelferValueTypeArray1234 {
yyl143 := r.ReadArrayStart()
if yyl143 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl143, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys144Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys144Slc
var yyhl144 bool = l >= 0
for yyj144 := 0; ; yyj144++ {
if yyhl144 {
if yyj144 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys144Slc = r.DecodeBytes(yys144Slc, true, true)
yys144 := string(yys144Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys144 {
case "Authenticated":
if r.TryDecodeAsNil() {
x.Authenticated = false
} else {
x.Authenticated = bool(r.DecodeBool())
}
case "User":
if r.TryDecodeAsNil() {
x.User = UserInfo{}
} else {
yyv146 := &x.User
yyv146.CodecDecodeSelf(d)
}
case "Error":
if r.TryDecodeAsNil() {
x.Error = ""
} else {
x.Error = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys144)
} // end switch yys144
} // end for yyj144
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj148 int
var yyb148 bool
var yyhl148 bool = l >= 0
yyj148++
if yyhl148 {
yyb148 = yyj148 > l
} else {
yyb148 = r.CheckBreak()
}
if yyb148 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Authenticated = false
} else {
x.Authenticated = bool(r.DecodeBool())
}
yyj148++
if yyhl148 {
yyb148 = yyj148 > l
} else {
yyb148 = r.CheckBreak()
}
if yyb148 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.User = UserInfo{}
} else {
yyv150 := &x.User
yyv150.CodecDecodeSelf(d)
}
yyj148++
if yyhl148 {
yyb148 = yyj148 > l
} else {
yyb148 = r.CheckBreak()
}
if yyb148 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Error = ""
} else {
x.Error = string(r.DecodeString())
}
for {
yyj148++
if yyhl148 {
yyb148 = yyj148 > l
} else {
yyb148 = r.CheckBreak()
}
if yyb148 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj148-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym152 := z.EncBinary()
_ = yym152
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep153 := !z.EncBinary()
yy2arr153 := z.EncBasicHandle().StructToArray
var yyq153 [4]bool
_, _, _ = yysep153, yyq153, yy2arr153
const yyr153 bool = false
var yynn153 int
if yyr153 || yy2arr153 {
r.EncodeArrayStart(4)
} else {
yynn153 = 4
for _, b := range yyq153 {
if b {
yynn153++
}
}
r.EncodeMapStart(yynn153)
yynn153 = 0
}
if yyr153 || yy2arr153 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym155 := z.EncBinary()
_ = yym155
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Username))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Username"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym156 := z.EncBinary()
_ = yym156
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Username))
}
}
if yyr153 || yy2arr153 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym158 := z.EncBinary()
_ = yym158
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("UID"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym159 := z.EncBinary()
_ = yym159
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.UID))
}
}
if yyr153 || yy2arr153 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Groups == nil {
r.EncodeNil()
} else {
yym161 := z.EncBinary()
_ = yym161
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 {
yym162 := z.EncBinary()
_ = yym162
if false {
} else {
z.F.EncSliceStringV(x.Groups, false, e)
}
}
}
if yyr153 || yy2arr153 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Extra == nil {
r.EncodeNil()
} else {
yym164 := z.EncBinary()
_ = yym164
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 {
yym165 := z.EncBinary()
_ = yym165
if false {
} else {
h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
}
}
}
if yyr153 || yy2arr153 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *UserInfo) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym166 := z.DecBinary()
_ = yym166
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct167 := r.ContainerType()
if yyct167 == codecSelferValueTypeMap1234 {
yyl167 := r.ReadMapStart()
if yyl167 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl167, d)
}
} else if yyct167 == codecSelferValueTypeArray1234 {
yyl167 := r.ReadArrayStart()
if yyl167 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl167, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *UserInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys168Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys168Slc
var yyhl168 bool = l >= 0
for yyj168 := 0; ; yyj168++ {
if yyhl168 {
if yyj168 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys168Slc = r.DecodeBytes(yys168Slc, true, true)
yys168 := string(yys168Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys168 {
case "Username":
if r.TryDecodeAsNil() {
x.Username = ""
} else {
x.Username = string(r.DecodeString())
}
case "UID":
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = string(r.DecodeString())
}
case "Groups":
if r.TryDecodeAsNil() {
x.Groups = nil
} else {
yyv171 := &x.Groups
yym172 := z.DecBinary()
_ = yym172
if false {
} else {
z.F.DecSliceStringX(yyv171, false, d)
}
}
case "Extra":
if r.TryDecodeAsNil() {
x.Extra = nil
} else {
yyv173 := &x.Extra
yym174 := z.DecBinary()
_ = yym174
if false {
} else {
h.decMapstringExtraValue((*map[string]ExtraValue)(yyv173), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys168)
} // end switch yys168
} // end for yyj168
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj175 int
var yyb175 bool
var yyhl175 bool = l >= 0
yyj175++
if yyhl175 {
yyb175 = yyj175 > l
} else {
yyb175 = r.CheckBreak()
}
if yyb175 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Username = ""
} else {
x.Username = string(r.DecodeString())
}
yyj175++
if yyhl175 {
yyb175 = yyj175 > l
} else {
yyb175 = r.CheckBreak()
}
if yyb175 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.UID = ""
} else {
x.UID = string(r.DecodeString())
}
yyj175++
if yyhl175 {
yyb175 = yyj175 > l
} else {
yyb175 = r.CheckBreak()
}
if yyb175 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Groups = nil
} else {
yyv178 := &x.Groups
yym179 := z.DecBinary()
_ = yym179
if false {
} else {
z.F.DecSliceStringX(yyv178, false, d)
}
}
yyj175++
if yyhl175 {
yyb175 = yyj175 > l
} else {
yyb175 = r.CheckBreak()
}
if yyb175 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Extra = nil
} else {
yyv180 := &x.Extra
yym181 := z.DecBinary()
_ = yym181
if false {
} else {
h.decMapstringExtraValue((*map[string]ExtraValue)(yyv180), d)
}
}
for {
yyj175++
if yyhl175 {
yyb175 = yyj175 > l
} else {
yyb175 = r.CheckBreak()
}
if yyb175 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj175-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 {
yym182 := z.EncBinary()
_ = yym182
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
yym183 := z.DecBinary()
_ = yym183
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
h.decExtraValue((*ExtraValue)(x), d)
}
}
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 _, yyv184 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy185 := &yyv184
yy185.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
yyv186 := *v
yyh186, yyl186 := z.DecSliceHelperStart()
var yyc186 bool
if yyl186 == 0 {
if yyv186 == nil {
yyv186 = []pkg2_api.OwnerReference{}
yyc186 = true
} else if len(yyv186) != 0 {
yyv186 = yyv186[:0]
yyc186 = true
}
} else if yyl186 > 0 {
var yyrr186, yyrl186 int
var yyrt186 bool
if yyl186 > cap(yyv186) {
yyrg186 := len(yyv186) > 0
yyv2186 := yyv186
yyrl186, yyrt186 = z.DecInferLen(yyl186, z.DecBasicHandle().MaxInitLen, 72)
if yyrt186 {
if yyrl186 <= cap(yyv186) {
yyv186 = yyv186[:yyrl186]
} else {
yyv186 = make([]pkg2_api.OwnerReference, yyrl186)
}
} else {
yyv186 = make([]pkg2_api.OwnerReference, yyrl186)
}
yyc186 = true
yyrr186 = len(yyv186)
if yyrg186 {
copy(yyv186, yyv2186)
}
} else if yyl186 != len(yyv186) {
yyv186 = yyv186[:yyl186]
yyc186 = true
}
yyj186 := 0
for ; yyj186 < yyrr186; yyj186++ {
yyh186.ElemContainerState(yyj186)
if r.TryDecodeAsNil() {
yyv186[yyj186] = pkg2_api.OwnerReference{}
} else {
yyv187 := &yyv186[yyj186]
yyv187.CodecDecodeSelf(d)
}
}
if yyrt186 {
for ; yyj186 < yyl186; yyj186++ {
yyv186 = append(yyv186, pkg2_api.OwnerReference{})
yyh186.ElemContainerState(yyj186)
if r.TryDecodeAsNil() {
yyv186[yyj186] = pkg2_api.OwnerReference{}
} else {
yyv188 := &yyv186[yyj186]
yyv188.CodecDecodeSelf(d)
}
}
}
} else {
yyj186 := 0
for ; !r.CheckBreak(); yyj186++ {
if yyj186 >= len(yyv186) {
yyv186 = append(yyv186, pkg2_api.OwnerReference{}) // var yyz186 pkg2_api.OwnerReference
yyc186 = true
}
yyh186.ElemContainerState(yyj186)
if yyj186 < len(yyv186) {
if r.TryDecodeAsNil() {
yyv186[yyj186] = pkg2_api.OwnerReference{}
} else {
yyv189 := &yyv186[yyj186]
yyv189.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj186 < len(yyv186) {
yyv186 = yyv186[:yyj186]
yyc186 = true
} else if yyj186 == 0 && yyv186 == nil {
yyv186 = []pkg2_api.OwnerReference{}
yyc186 = true
}
}
yyh186.End()
if yyc186 {
*v = yyv186
}
}
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 yyk190, yyv190 := range v {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
yym191 := z.EncBinary()
_ = yym191
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yyk190))
}
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if yyv190 == nil {
r.EncodeNil()
} else {
yyv190.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
yyv192 := *v
yyl192 := r.ReadMapStart()
yybh192 := z.DecBasicHandle()
if yyv192 == nil {
yyrl192, _ := z.DecInferLen(yyl192, yybh192.MaxInitLen, 40)
yyv192 = make(map[string]ExtraValue, yyrl192)
*v = yyv192
}
var yymk192 string
var yymv192 ExtraValue
var yymg192 bool
if yybh192.MapValueReset {
yymg192 = true
}
if yyl192 > 0 {
for yyj192 := 0; yyj192 < yyl192; yyj192++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk192 = ""
} else {
yymk192 = string(r.DecodeString())
}
if yymg192 {
yymv192 = yyv192[yymk192]
} else {
yymv192 = nil
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv192 = nil
} else {
yyv194 := &yymv192
yyv194.CodecDecodeSelf(d)
}
if yyv192 != nil {
yyv192[yymk192] = yymv192
}
}
} else if yyl192 < 0 {
for yyj192 := 0; !r.CheckBreak(); yyj192++ {
z.DecSendContainerState(codecSelfer_containerMapKey1234)
if r.TryDecodeAsNil() {
yymk192 = ""
} else {
yymk192 = string(r.DecodeString())
}
if yymg192 {
yymv192 = yyv192[yymk192]
} else {
yymv192 = nil
}
z.DecSendContainerState(codecSelfer_containerMapValue1234)
if r.TryDecodeAsNil() {
yymv192 = nil
} else {
yyv196 := &yymv192
yyv196.CodecDecodeSelf(d)
}
if yyv192 != nil {
yyv192[yymk192] = yymv192
}
}
} // 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 _, yyv197 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym198 := z.EncBinary()
_ = yym198
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(yyv197))
}
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv199 := *v
yyh199, yyl199 := z.DecSliceHelperStart()
var yyc199 bool
if yyl199 == 0 {
if yyv199 == nil {
yyv199 = []string{}
yyc199 = true
} else if len(yyv199) != 0 {
yyv199 = yyv199[:0]
yyc199 = true
}
} else if yyl199 > 0 {
var yyrr199, yyrl199 int
var yyrt199 bool
if yyl199 > cap(yyv199) {
yyrl199, yyrt199 = z.DecInferLen(yyl199, z.DecBasicHandle().MaxInitLen, 16)
if yyrt199 {
if yyrl199 <= cap(yyv199) {
yyv199 = yyv199[:yyrl199]
} else {
yyv199 = make([]string, yyrl199)
}
} else {
yyv199 = make([]string, yyrl199)
}
yyc199 = true
yyrr199 = len(yyv199)
} else if yyl199 != len(yyv199) {
yyv199 = yyv199[:yyl199]
yyc199 = true
}
yyj199 := 0
for ; yyj199 < yyrr199; yyj199++ {
yyh199.ElemContainerState(yyj199)
if r.TryDecodeAsNil() {
yyv199[yyj199] = ""
} else {
yyv199[yyj199] = string(r.DecodeString())
}
}
if yyrt199 {
for ; yyj199 < yyl199; yyj199++ {
yyv199 = append(yyv199, "")
yyh199.ElemContainerState(yyj199)
if r.TryDecodeAsNil() {
yyv199[yyj199] = ""
} else {
yyv199[yyj199] = string(r.DecodeString())
}
}
}
} else {
yyj199 := 0
for ; !r.CheckBreak(); yyj199++ {
if yyj199 >= len(yyv199) {
yyv199 = append(yyv199, "") // var yyz199 string
yyc199 = true
}
yyh199.ElemContainerState(yyj199)
if yyj199 < len(yyv199) {
if r.TryDecodeAsNil() {
yyv199[yyj199] = ""
} else {
yyv199[yyj199] = string(r.DecodeString())
}
} else {
z.DecSwallow()
}
}
if yyj199 < len(yyv199) {
yyv199 = yyv199[:yyj199]
yyc199 = true
} else if yyj199 == 0 && yyv199 == nil {
yyv199 = []string{}
yyc199 = true
}
}
yyh199.End()
if yyc199 {
*v = yyv199
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.6.0-alpha.0

搜索帮助

344bd9b3 5694891 D2dac590 5694891