1 Star 0 Fork 0

zhuchance / kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.generated.go 52.45 KB
一键复制 编辑 原始数据 按行查看 历史
jianhuiz 提交于 2016-08-22 23:00 . add generated files
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194
/*
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 imagepolicy
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 *ImageReview) 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 *ImageReview) 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 *ImageReview) 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 = ImageReviewSpec{}
} else {
yyv91 := &x.Spec
yyv91.CodecDecodeSelf(d)
}
case "Status":
if r.TryDecodeAsNil() {
x.Status = ImageReviewStatus{}
} else {
yyv92 := &x.Status
yyv92.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys66)
} // end switch yys66
} // end for yyj66
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ImageReview) 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 = ImageReviewSpec{}
} 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 = ImageReviewStatus{}
} 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 *ImageReviewSpec) 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 [3]bool
_, _, _ = yysep121, yyq121, yy2arr121
const yyr121 bool = false
var yynn121 int
if yyr121 || yy2arr121 {
r.EncodeArrayStart(3)
} else {
yynn121 = 3
for _, b := range yyq121 {
if b {
yynn121++
}
}
r.EncodeMapStart(yynn121)
yynn121 = 0
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Containers == nil {
r.EncodeNil()
} else {
yym123 := z.EncBinary()
_ = yym123
if false {
} else {
h.encSliceImageReviewContainerSpec(([]ImageReviewContainerSpec)(x.Containers), e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Containers"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Containers == nil {
r.EncodeNil()
} else {
yym124 := z.EncBinary()
_ = yym124
if false {
} else {
h.encSliceImageReviewContainerSpec(([]ImageReviewContainerSpec)(x.Containers), e)
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Annotations == nil {
r.EncodeNil()
} else {
yym126 := z.EncBinary()
_ = yym126
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Annotations"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Annotations == nil {
r.EncodeNil()
} else {
yym127 := z.EncBinary()
_ = yym127
if false {
} else {
z.F.EncMapStringStringV(x.Annotations, false, e)
}
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym129 := z.EncBinary()
_ = yym129
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)
yym130 := z.EncBinary()
_ = yym130
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
}
if yyr121 || yy2arr121 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ImageReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym131 := z.DecBinary()
_ = yym131
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct132 := r.ContainerType()
if yyct132 == codecSelferValueTypeMap1234 {
yyl132 := r.ReadMapStart()
if yyl132 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl132, d)
}
} else if yyct132 == codecSelferValueTypeArray1234 {
yyl132 := r.ReadArrayStart()
if yyl132 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl132, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ImageReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys133Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys133Slc
var yyhl133 bool = l >= 0
for yyj133 := 0; ; yyj133++ {
if yyhl133 {
if yyj133 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys133Slc = r.DecodeBytes(yys133Slc, true, true)
yys133 := string(yys133Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys133 {
case "Containers":
if r.TryDecodeAsNil() {
x.Containers = nil
} else {
yyv134 := &x.Containers
yym135 := z.DecBinary()
_ = yym135
if false {
} else {
h.decSliceImageReviewContainerSpec((*[]ImageReviewContainerSpec)(yyv134), d)
}
}
case "Annotations":
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv136 := &x.Annotations
yym137 := z.DecBinary()
_ = yym137
if false {
} else {
z.F.DecMapStringStringX(yyv136, false, d)
}
}
case "Namespace":
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys133)
} // end switch yys133
} // end for yyj133
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ImageReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj139 int
var yyb139 bool
var yyhl139 bool = l >= 0
yyj139++
if yyhl139 {
yyb139 = yyj139 > l
} else {
yyb139 = r.CheckBreak()
}
if yyb139 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Containers = nil
} else {
yyv140 := &x.Containers
yym141 := z.DecBinary()
_ = yym141
if false {
} else {
h.decSliceImageReviewContainerSpec((*[]ImageReviewContainerSpec)(yyv140), d)
}
}
yyj139++
if yyhl139 {
yyb139 = yyj139 > l
} else {
yyb139 = r.CheckBreak()
}
if yyb139 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Annotations = nil
} else {
yyv142 := &x.Annotations
yym143 := z.DecBinary()
_ = yym143
if false {
} else {
z.F.DecMapStringStringX(yyv142, false, d)
}
}
yyj139++
if yyhl139 {
yyb139 = yyj139 > l
} else {
yyb139 = r.CheckBreak()
}
if yyb139 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
for {
yyj139++
if yyhl139 {
yyb139 = yyj139 > l
} else {
yyb139 = r.CheckBreak()
}
if yyb139 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj139-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ImageReviewContainerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym145 := z.EncBinary()
_ = yym145
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep146 := !z.EncBinary()
yy2arr146 := z.EncBasicHandle().StructToArray
var yyq146 [1]bool
_, _, _ = yysep146, yyq146, yy2arr146
const yyr146 bool = false
var yynn146 int
if yyr146 || yy2arr146 {
r.EncodeArrayStart(1)
} else {
yynn146 = 1
for _, b := range yyq146 {
if b {
yynn146++
}
}
r.EncodeMapStart(yynn146)
yynn146 = 0
}
if yyr146 || yy2arr146 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym148 := z.EncBinary()
_ = yym148
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Image))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Image"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym149 := z.EncBinary()
_ = yym149
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Image))
}
}
if yyr146 || yy2arr146 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ImageReviewContainerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym150 := z.DecBinary()
_ = yym150
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct151 := r.ContainerType()
if yyct151 == codecSelferValueTypeMap1234 {
yyl151 := r.ReadMapStart()
if yyl151 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl151, d)
}
} else if yyct151 == codecSelferValueTypeArray1234 {
yyl151 := r.ReadArrayStart()
if yyl151 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl151, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ImageReviewContainerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys152Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys152Slc
var yyhl152 bool = l >= 0
for yyj152 := 0; ; yyj152++ {
if yyhl152 {
if yyj152 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys152Slc = r.DecodeBytes(yys152Slc, true, true)
yys152 := string(yys152Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys152 {
case "Image":
if r.TryDecodeAsNil() {
x.Image = ""
} else {
x.Image = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys152)
} // end switch yys152
} // end for yyj152
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ImageReviewContainerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj154 int
var yyb154 bool
var yyhl154 bool = l >= 0
yyj154++
if yyhl154 {
yyb154 = yyj154 > l
} else {
yyb154 = r.CheckBreak()
}
if yyb154 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Image = ""
} else {
x.Image = string(r.DecodeString())
}
for {
yyj154++
if yyhl154 {
yyb154 = yyj154 > l
} else {
yyb154 = r.CheckBreak()
}
if yyb154 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj154-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ImageReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym156 := z.EncBinary()
_ = yym156
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep157 := !z.EncBinary()
yy2arr157 := z.EncBasicHandle().StructToArray
var yyq157 [2]bool
_, _, _ = yysep157, yyq157, yy2arr157
const yyr157 bool = false
var yynn157 int
if yyr157 || yy2arr157 {
r.EncodeArrayStart(2)
} else {
yynn157 = 2
for _, b := range yyq157 {
if b {
yynn157++
}
}
r.EncodeMapStart(yynn157)
yynn157 = 0
}
if yyr157 || yy2arr157 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym159 := z.EncBinary()
_ = yym159
if false {
} else {
r.EncodeBool(bool(x.Allowed))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("Allowed"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym160 := z.EncBinary()
_ = yym160
if false {
} else {
r.EncodeBool(bool(x.Allowed))
}
}
if yyr157 || yy2arr157 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym162 := z.EncBinary()
_ = yym162
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)
yym163 := z.EncBinary()
_ = yym163
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
}
}
if yyr157 || yy2arr157 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ImageReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym164 := z.DecBinary()
_ = yym164
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct165 := r.ContainerType()
if yyct165 == codecSelferValueTypeMap1234 {
yyl165 := r.ReadMapStart()
if yyl165 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl165, d)
}
} else if yyct165 == codecSelferValueTypeArray1234 {
yyl165 := r.ReadArrayStart()
if yyl165 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl165, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ImageReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys166Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys166Slc
var yyhl166 bool = l >= 0
for yyj166 := 0; ; yyj166++ {
if yyhl166 {
if yyj166 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys166Slc = r.DecodeBytes(yys166Slc, true, true)
yys166 := string(yys166Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys166 {
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())
}
default:
z.DecStructFieldNotFound(-1, yys166)
} // end switch yys166
} // end for yyj166
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ImageReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj169 int
var yyb169 bool
var yyhl169 bool = l >= 0
yyj169++
if yyhl169 {
yyb169 = yyj169 > l
} else {
yyb169 = r.CheckBreak()
}
if yyb169 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Allowed = false
} else {
x.Allowed = bool(r.DecodeBool())
}
yyj169++
if yyhl169 {
yyb169 = yyj169 > l
} else {
yyb169 = r.CheckBreak()
}
if yyb169 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Reason = ""
} else {
x.Reason = string(r.DecodeString())
}
for {
yyj169++
if yyhl169 {
yyb169 = yyj169 > l
} else {
yyb169 = r.CheckBreak()
}
if yyb169 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj169-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 _, yyv172 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy173 := &yyv172
yy173.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
yyv174 := *v
yyh174, yyl174 := z.DecSliceHelperStart()
var yyc174 bool
if yyl174 == 0 {
if yyv174 == nil {
yyv174 = []pkg2_api.OwnerReference{}
yyc174 = true
} else if len(yyv174) != 0 {
yyv174 = yyv174[:0]
yyc174 = true
}
} else if yyl174 > 0 {
var yyrr174, yyrl174 int
var yyrt174 bool
if yyl174 > cap(yyv174) {
yyrg174 := len(yyv174) > 0
yyv2174 := yyv174
yyrl174, yyrt174 = z.DecInferLen(yyl174, z.DecBasicHandle().MaxInitLen, 72)
if yyrt174 {
if yyrl174 <= cap(yyv174) {
yyv174 = yyv174[:yyrl174]
} else {
yyv174 = make([]pkg2_api.OwnerReference, yyrl174)
}
} else {
yyv174 = make([]pkg2_api.OwnerReference, yyrl174)
}
yyc174 = true
yyrr174 = len(yyv174)
if yyrg174 {
copy(yyv174, yyv2174)
}
} else if yyl174 != len(yyv174) {
yyv174 = yyv174[:yyl174]
yyc174 = true
}
yyj174 := 0
for ; yyj174 < yyrr174; yyj174++ {
yyh174.ElemContainerState(yyj174)
if r.TryDecodeAsNil() {
yyv174[yyj174] = pkg2_api.OwnerReference{}
} else {
yyv175 := &yyv174[yyj174]
yyv175.CodecDecodeSelf(d)
}
}
if yyrt174 {
for ; yyj174 < yyl174; yyj174++ {
yyv174 = append(yyv174, pkg2_api.OwnerReference{})
yyh174.ElemContainerState(yyj174)
if r.TryDecodeAsNil() {
yyv174[yyj174] = pkg2_api.OwnerReference{}
} else {
yyv176 := &yyv174[yyj174]
yyv176.CodecDecodeSelf(d)
}
}
}
} else {
yyj174 := 0
for ; !r.CheckBreak(); yyj174++ {
if yyj174 >= len(yyv174) {
yyv174 = append(yyv174, pkg2_api.OwnerReference{}) // var yyz174 pkg2_api.OwnerReference
yyc174 = true
}
yyh174.ElemContainerState(yyj174)
if yyj174 < len(yyv174) {
if r.TryDecodeAsNil() {
yyv174[yyj174] = pkg2_api.OwnerReference{}
} else {
yyv177 := &yyv174[yyj174]
yyv177.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj174 < len(yyv174) {
yyv174 = yyv174[:yyj174]
yyc174 = true
} else if yyj174 == 0 && yyv174 == nil {
yyv174 = []pkg2_api.OwnerReference{}
yyc174 = true
}
}
yyh174.End()
if yyc174 {
*v = yyv174
}
}
func (x codecSelfer1234) encSliceImageReviewContainerSpec(v []ImageReviewContainerSpec, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv178 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy179 := &yyv178
yy179.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceImageReviewContainerSpec(v *[]ImageReviewContainerSpec, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv180 := *v
yyh180, yyl180 := z.DecSliceHelperStart()
var yyc180 bool
if yyl180 == 0 {
if yyv180 == nil {
yyv180 = []ImageReviewContainerSpec{}
yyc180 = true
} else if len(yyv180) != 0 {
yyv180 = yyv180[:0]
yyc180 = true
}
} else if yyl180 > 0 {
var yyrr180, yyrl180 int
var yyrt180 bool
if yyl180 > cap(yyv180) {
yyrg180 := len(yyv180) > 0
yyv2180 := yyv180
yyrl180, yyrt180 = z.DecInferLen(yyl180, z.DecBasicHandle().MaxInitLen, 16)
if yyrt180 {
if yyrl180 <= cap(yyv180) {
yyv180 = yyv180[:yyrl180]
} else {
yyv180 = make([]ImageReviewContainerSpec, yyrl180)
}
} else {
yyv180 = make([]ImageReviewContainerSpec, yyrl180)
}
yyc180 = true
yyrr180 = len(yyv180)
if yyrg180 {
copy(yyv180, yyv2180)
}
} else if yyl180 != len(yyv180) {
yyv180 = yyv180[:yyl180]
yyc180 = true
}
yyj180 := 0
for ; yyj180 < yyrr180; yyj180++ {
yyh180.ElemContainerState(yyj180)
if r.TryDecodeAsNil() {
yyv180[yyj180] = ImageReviewContainerSpec{}
} else {
yyv181 := &yyv180[yyj180]
yyv181.CodecDecodeSelf(d)
}
}
if yyrt180 {
for ; yyj180 < yyl180; yyj180++ {
yyv180 = append(yyv180, ImageReviewContainerSpec{})
yyh180.ElemContainerState(yyj180)
if r.TryDecodeAsNil() {
yyv180[yyj180] = ImageReviewContainerSpec{}
} else {
yyv182 := &yyv180[yyj180]
yyv182.CodecDecodeSelf(d)
}
}
}
} else {
yyj180 := 0
for ; !r.CheckBreak(); yyj180++ {
if yyj180 >= len(yyv180) {
yyv180 = append(yyv180, ImageReviewContainerSpec{}) // var yyz180 ImageReviewContainerSpec
yyc180 = true
}
yyh180.ElemContainerState(yyj180)
if yyj180 < len(yyv180) {
if r.TryDecodeAsNil() {
yyv180[yyj180] = ImageReviewContainerSpec{}
} else {
yyv183 := &yyv180[yyj180]
yyv183.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj180 < len(yyv180) {
yyv180 = yyv180[:yyj180]
yyc180 = true
} else if yyj180 == 0 && yyv180 == nil {
yyv180 = []ImageReviewContainerSpec{}
yyc180 = true
}
}
yyh180.End()
if yyc180 {
*v = yyv180
}
}
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.4.0-alpha.3

搜索帮助