generated.pb.go 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  14. // source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
  15. package v2beta1
  16. import (
  17. fmt "fmt"
  18. io "io"
  19. proto "github.com/gogo/protobuf/proto"
  20. k8s_io_api_core_v1 "k8s.io/api/core/v1"
  21. resource "k8s.io/apimachinery/pkg/api/resource"
  22. v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  23. math "math"
  24. math_bits "math/bits"
  25. reflect "reflect"
  26. strings "strings"
  27. )
  28. // Reference imports to suppress errors if they are not otherwise used.
  29. var _ = proto.Marshal
  30. var _ = fmt.Errorf
  31. var _ = math.Inf
  32. // This is a compile-time assertion to ensure that this generated file
  33. // is compatible with the proto package it is being compiled against.
  34. // A compilation error at this line likely means your copy of the
  35. // proto package needs to be updated.
  36. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  37. func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} }
  38. func (*ContainerResourceMetricSource) ProtoMessage() {}
  39. func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) {
  40. return fileDescriptor_26c1bfc7a52d0478, []int{0}
  41. }
  42. func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error {
  43. return m.Unmarshal(b)
  44. }
  45. func (m *ContainerResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  46. b = b[:cap(b)]
  47. n, err := m.MarshalToSizedBuffer(b)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return b[:n], nil
  52. }
  53. func (m *ContainerResourceMetricSource) XXX_Merge(src proto.Message) {
  54. xxx_messageInfo_ContainerResourceMetricSource.Merge(m, src)
  55. }
  56. func (m *ContainerResourceMetricSource) XXX_Size() int {
  57. return m.Size()
  58. }
  59. func (m *ContainerResourceMetricSource) XXX_DiscardUnknown() {
  60. xxx_messageInfo_ContainerResourceMetricSource.DiscardUnknown(m)
  61. }
  62. var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo
  63. func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} }
  64. func (*ContainerResourceMetricStatus) ProtoMessage() {}
  65. func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) {
  66. return fileDescriptor_26c1bfc7a52d0478, []int{1}
  67. }
  68. func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error {
  69. return m.Unmarshal(b)
  70. }
  71. func (m *ContainerResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  72. b = b[:cap(b)]
  73. n, err := m.MarshalToSizedBuffer(b)
  74. if err != nil {
  75. return nil, err
  76. }
  77. return b[:n], nil
  78. }
  79. func (m *ContainerResourceMetricStatus) XXX_Merge(src proto.Message) {
  80. xxx_messageInfo_ContainerResourceMetricStatus.Merge(m, src)
  81. }
  82. func (m *ContainerResourceMetricStatus) XXX_Size() int {
  83. return m.Size()
  84. }
  85. func (m *ContainerResourceMetricStatus) XXX_DiscardUnknown() {
  86. xxx_messageInfo_ContainerResourceMetricStatus.DiscardUnknown(m)
  87. }
  88. var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo
  89. func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
  90. func (*CrossVersionObjectReference) ProtoMessage() {}
  91. func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
  92. return fileDescriptor_26c1bfc7a52d0478, []int{2}
  93. }
  94. func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error {
  95. return m.Unmarshal(b)
  96. }
  97. func (m *CrossVersionObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  98. b = b[:cap(b)]
  99. n, err := m.MarshalToSizedBuffer(b)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return b[:n], nil
  104. }
  105. func (m *CrossVersionObjectReference) XXX_Merge(src proto.Message) {
  106. xxx_messageInfo_CrossVersionObjectReference.Merge(m, src)
  107. }
  108. func (m *CrossVersionObjectReference) XXX_Size() int {
  109. return m.Size()
  110. }
  111. func (m *CrossVersionObjectReference) XXX_DiscardUnknown() {
  112. xxx_messageInfo_CrossVersionObjectReference.DiscardUnknown(m)
  113. }
  114. var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo
  115. func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} }
  116. func (*ExternalMetricSource) ProtoMessage() {}
  117. func (*ExternalMetricSource) Descriptor() ([]byte, []int) {
  118. return fileDescriptor_26c1bfc7a52d0478, []int{3}
  119. }
  120. func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error {
  121. return m.Unmarshal(b)
  122. }
  123. func (m *ExternalMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  124. b = b[:cap(b)]
  125. n, err := m.MarshalToSizedBuffer(b)
  126. if err != nil {
  127. return nil, err
  128. }
  129. return b[:n], nil
  130. }
  131. func (m *ExternalMetricSource) XXX_Merge(src proto.Message) {
  132. xxx_messageInfo_ExternalMetricSource.Merge(m, src)
  133. }
  134. func (m *ExternalMetricSource) XXX_Size() int {
  135. return m.Size()
  136. }
  137. func (m *ExternalMetricSource) XXX_DiscardUnknown() {
  138. xxx_messageInfo_ExternalMetricSource.DiscardUnknown(m)
  139. }
  140. var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo
  141. func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} }
  142. func (*ExternalMetricStatus) ProtoMessage() {}
  143. func (*ExternalMetricStatus) Descriptor() ([]byte, []int) {
  144. return fileDescriptor_26c1bfc7a52d0478, []int{4}
  145. }
  146. func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error {
  147. return m.Unmarshal(b)
  148. }
  149. func (m *ExternalMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  150. b = b[:cap(b)]
  151. n, err := m.MarshalToSizedBuffer(b)
  152. if err != nil {
  153. return nil, err
  154. }
  155. return b[:n], nil
  156. }
  157. func (m *ExternalMetricStatus) XXX_Merge(src proto.Message) {
  158. xxx_messageInfo_ExternalMetricStatus.Merge(m, src)
  159. }
  160. func (m *ExternalMetricStatus) XXX_Size() int {
  161. return m.Size()
  162. }
  163. func (m *ExternalMetricStatus) XXX_DiscardUnknown() {
  164. xxx_messageInfo_ExternalMetricStatus.DiscardUnknown(m)
  165. }
  166. var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo
  167. func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
  168. func (*HorizontalPodAutoscaler) ProtoMessage() {}
  169. func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) {
  170. return fileDescriptor_26c1bfc7a52d0478, []int{5}
  171. }
  172. func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error {
  173. return m.Unmarshal(b)
  174. }
  175. func (m *HorizontalPodAutoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  176. b = b[:cap(b)]
  177. n, err := m.MarshalToSizedBuffer(b)
  178. if err != nil {
  179. return nil, err
  180. }
  181. return b[:n], nil
  182. }
  183. func (m *HorizontalPodAutoscaler) XXX_Merge(src proto.Message) {
  184. xxx_messageInfo_HorizontalPodAutoscaler.Merge(m, src)
  185. }
  186. func (m *HorizontalPodAutoscaler) XXX_Size() int {
  187. return m.Size()
  188. }
  189. func (m *HorizontalPodAutoscaler) XXX_DiscardUnknown() {
  190. xxx_messageInfo_HorizontalPodAutoscaler.DiscardUnknown(m)
  191. }
  192. var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo
  193. func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
  194. func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
  195. func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
  196. return fileDescriptor_26c1bfc7a52d0478, []int{6}
  197. }
  198. func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error {
  199. return m.Unmarshal(b)
  200. }
  201. func (m *HorizontalPodAutoscalerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  202. b = b[:cap(b)]
  203. n, err := m.MarshalToSizedBuffer(b)
  204. if err != nil {
  205. return nil, err
  206. }
  207. return b[:n], nil
  208. }
  209. func (m *HorizontalPodAutoscalerCondition) XXX_Merge(src proto.Message) {
  210. xxx_messageInfo_HorizontalPodAutoscalerCondition.Merge(m, src)
  211. }
  212. func (m *HorizontalPodAutoscalerCondition) XXX_Size() int {
  213. return m.Size()
  214. }
  215. func (m *HorizontalPodAutoscalerCondition) XXX_DiscardUnknown() {
  216. xxx_messageInfo_HorizontalPodAutoscalerCondition.DiscardUnknown(m)
  217. }
  218. var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo
  219. func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
  220. func (*HorizontalPodAutoscalerList) ProtoMessage() {}
  221. func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
  222. return fileDescriptor_26c1bfc7a52d0478, []int{7}
  223. }
  224. func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error {
  225. return m.Unmarshal(b)
  226. }
  227. func (m *HorizontalPodAutoscalerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  228. b = b[:cap(b)]
  229. n, err := m.MarshalToSizedBuffer(b)
  230. if err != nil {
  231. return nil, err
  232. }
  233. return b[:n], nil
  234. }
  235. func (m *HorizontalPodAutoscalerList) XXX_Merge(src proto.Message) {
  236. xxx_messageInfo_HorizontalPodAutoscalerList.Merge(m, src)
  237. }
  238. func (m *HorizontalPodAutoscalerList) XXX_Size() int {
  239. return m.Size()
  240. }
  241. func (m *HorizontalPodAutoscalerList) XXX_DiscardUnknown() {
  242. xxx_messageInfo_HorizontalPodAutoscalerList.DiscardUnknown(m)
  243. }
  244. var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo
  245. func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
  246. func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
  247. func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
  248. return fileDescriptor_26c1bfc7a52d0478, []int{8}
  249. }
  250. func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error {
  251. return m.Unmarshal(b)
  252. }
  253. func (m *HorizontalPodAutoscalerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  254. b = b[:cap(b)]
  255. n, err := m.MarshalToSizedBuffer(b)
  256. if err != nil {
  257. return nil, err
  258. }
  259. return b[:n], nil
  260. }
  261. func (m *HorizontalPodAutoscalerSpec) XXX_Merge(src proto.Message) {
  262. xxx_messageInfo_HorizontalPodAutoscalerSpec.Merge(m, src)
  263. }
  264. func (m *HorizontalPodAutoscalerSpec) XXX_Size() int {
  265. return m.Size()
  266. }
  267. func (m *HorizontalPodAutoscalerSpec) XXX_DiscardUnknown() {
  268. xxx_messageInfo_HorizontalPodAutoscalerSpec.DiscardUnknown(m)
  269. }
  270. var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo
  271. func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
  272. func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
  273. func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
  274. return fileDescriptor_26c1bfc7a52d0478, []int{9}
  275. }
  276. func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error {
  277. return m.Unmarshal(b)
  278. }
  279. func (m *HorizontalPodAutoscalerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  280. b = b[:cap(b)]
  281. n, err := m.MarshalToSizedBuffer(b)
  282. if err != nil {
  283. return nil, err
  284. }
  285. return b[:n], nil
  286. }
  287. func (m *HorizontalPodAutoscalerStatus) XXX_Merge(src proto.Message) {
  288. xxx_messageInfo_HorizontalPodAutoscalerStatus.Merge(m, src)
  289. }
  290. func (m *HorizontalPodAutoscalerStatus) XXX_Size() int {
  291. return m.Size()
  292. }
  293. func (m *HorizontalPodAutoscalerStatus) XXX_DiscardUnknown() {
  294. xxx_messageInfo_HorizontalPodAutoscalerStatus.DiscardUnknown(m)
  295. }
  296. var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo
  297. func (m *MetricSpec) Reset() { *m = MetricSpec{} }
  298. func (*MetricSpec) ProtoMessage() {}
  299. func (*MetricSpec) Descriptor() ([]byte, []int) {
  300. return fileDescriptor_26c1bfc7a52d0478, []int{10}
  301. }
  302. func (m *MetricSpec) XXX_Unmarshal(b []byte) error {
  303. return m.Unmarshal(b)
  304. }
  305. func (m *MetricSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  306. b = b[:cap(b)]
  307. n, err := m.MarshalToSizedBuffer(b)
  308. if err != nil {
  309. return nil, err
  310. }
  311. return b[:n], nil
  312. }
  313. func (m *MetricSpec) XXX_Merge(src proto.Message) {
  314. xxx_messageInfo_MetricSpec.Merge(m, src)
  315. }
  316. func (m *MetricSpec) XXX_Size() int {
  317. return m.Size()
  318. }
  319. func (m *MetricSpec) XXX_DiscardUnknown() {
  320. xxx_messageInfo_MetricSpec.DiscardUnknown(m)
  321. }
  322. var xxx_messageInfo_MetricSpec proto.InternalMessageInfo
  323. func (m *MetricStatus) Reset() { *m = MetricStatus{} }
  324. func (*MetricStatus) ProtoMessage() {}
  325. func (*MetricStatus) Descriptor() ([]byte, []int) {
  326. return fileDescriptor_26c1bfc7a52d0478, []int{11}
  327. }
  328. func (m *MetricStatus) XXX_Unmarshal(b []byte) error {
  329. return m.Unmarshal(b)
  330. }
  331. func (m *MetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  332. b = b[:cap(b)]
  333. n, err := m.MarshalToSizedBuffer(b)
  334. if err != nil {
  335. return nil, err
  336. }
  337. return b[:n], nil
  338. }
  339. func (m *MetricStatus) XXX_Merge(src proto.Message) {
  340. xxx_messageInfo_MetricStatus.Merge(m, src)
  341. }
  342. func (m *MetricStatus) XXX_Size() int {
  343. return m.Size()
  344. }
  345. func (m *MetricStatus) XXX_DiscardUnknown() {
  346. xxx_messageInfo_MetricStatus.DiscardUnknown(m)
  347. }
  348. var xxx_messageInfo_MetricStatus proto.InternalMessageInfo
  349. func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
  350. func (*ObjectMetricSource) ProtoMessage() {}
  351. func (*ObjectMetricSource) Descriptor() ([]byte, []int) {
  352. return fileDescriptor_26c1bfc7a52d0478, []int{12}
  353. }
  354. func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error {
  355. return m.Unmarshal(b)
  356. }
  357. func (m *ObjectMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  358. b = b[:cap(b)]
  359. n, err := m.MarshalToSizedBuffer(b)
  360. if err != nil {
  361. return nil, err
  362. }
  363. return b[:n], nil
  364. }
  365. func (m *ObjectMetricSource) XXX_Merge(src proto.Message) {
  366. xxx_messageInfo_ObjectMetricSource.Merge(m, src)
  367. }
  368. func (m *ObjectMetricSource) XXX_Size() int {
  369. return m.Size()
  370. }
  371. func (m *ObjectMetricSource) XXX_DiscardUnknown() {
  372. xxx_messageInfo_ObjectMetricSource.DiscardUnknown(m)
  373. }
  374. var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo
  375. func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
  376. func (*ObjectMetricStatus) ProtoMessage() {}
  377. func (*ObjectMetricStatus) Descriptor() ([]byte, []int) {
  378. return fileDescriptor_26c1bfc7a52d0478, []int{13}
  379. }
  380. func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error {
  381. return m.Unmarshal(b)
  382. }
  383. func (m *ObjectMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  384. b = b[:cap(b)]
  385. n, err := m.MarshalToSizedBuffer(b)
  386. if err != nil {
  387. return nil, err
  388. }
  389. return b[:n], nil
  390. }
  391. func (m *ObjectMetricStatus) XXX_Merge(src proto.Message) {
  392. xxx_messageInfo_ObjectMetricStatus.Merge(m, src)
  393. }
  394. func (m *ObjectMetricStatus) XXX_Size() int {
  395. return m.Size()
  396. }
  397. func (m *ObjectMetricStatus) XXX_DiscardUnknown() {
  398. xxx_messageInfo_ObjectMetricStatus.DiscardUnknown(m)
  399. }
  400. var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo
  401. func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
  402. func (*PodsMetricSource) ProtoMessage() {}
  403. func (*PodsMetricSource) Descriptor() ([]byte, []int) {
  404. return fileDescriptor_26c1bfc7a52d0478, []int{14}
  405. }
  406. func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error {
  407. return m.Unmarshal(b)
  408. }
  409. func (m *PodsMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  410. b = b[:cap(b)]
  411. n, err := m.MarshalToSizedBuffer(b)
  412. if err != nil {
  413. return nil, err
  414. }
  415. return b[:n], nil
  416. }
  417. func (m *PodsMetricSource) XXX_Merge(src proto.Message) {
  418. xxx_messageInfo_PodsMetricSource.Merge(m, src)
  419. }
  420. func (m *PodsMetricSource) XXX_Size() int {
  421. return m.Size()
  422. }
  423. func (m *PodsMetricSource) XXX_DiscardUnknown() {
  424. xxx_messageInfo_PodsMetricSource.DiscardUnknown(m)
  425. }
  426. var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo
  427. func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
  428. func (*PodsMetricStatus) ProtoMessage() {}
  429. func (*PodsMetricStatus) Descriptor() ([]byte, []int) {
  430. return fileDescriptor_26c1bfc7a52d0478, []int{15}
  431. }
  432. func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error {
  433. return m.Unmarshal(b)
  434. }
  435. func (m *PodsMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  436. b = b[:cap(b)]
  437. n, err := m.MarshalToSizedBuffer(b)
  438. if err != nil {
  439. return nil, err
  440. }
  441. return b[:n], nil
  442. }
  443. func (m *PodsMetricStatus) XXX_Merge(src proto.Message) {
  444. xxx_messageInfo_PodsMetricStatus.Merge(m, src)
  445. }
  446. func (m *PodsMetricStatus) XXX_Size() int {
  447. return m.Size()
  448. }
  449. func (m *PodsMetricStatus) XXX_DiscardUnknown() {
  450. xxx_messageInfo_PodsMetricStatus.DiscardUnknown(m)
  451. }
  452. var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo
  453. func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
  454. func (*ResourceMetricSource) ProtoMessage() {}
  455. func (*ResourceMetricSource) Descriptor() ([]byte, []int) {
  456. return fileDescriptor_26c1bfc7a52d0478, []int{16}
  457. }
  458. func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error {
  459. return m.Unmarshal(b)
  460. }
  461. func (m *ResourceMetricSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  462. b = b[:cap(b)]
  463. n, err := m.MarshalToSizedBuffer(b)
  464. if err != nil {
  465. return nil, err
  466. }
  467. return b[:n], nil
  468. }
  469. func (m *ResourceMetricSource) XXX_Merge(src proto.Message) {
  470. xxx_messageInfo_ResourceMetricSource.Merge(m, src)
  471. }
  472. func (m *ResourceMetricSource) XXX_Size() int {
  473. return m.Size()
  474. }
  475. func (m *ResourceMetricSource) XXX_DiscardUnknown() {
  476. xxx_messageInfo_ResourceMetricSource.DiscardUnknown(m)
  477. }
  478. var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo
  479. func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
  480. func (*ResourceMetricStatus) ProtoMessage() {}
  481. func (*ResourceMetricStatus) Descriptor() ([]byte, []int) {
  482. return fileDescriptor_26c1bfc7a52d0478, []int{17}
  483. }
  484. func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error {
  485. return m.Unmarshal(b)
  486. }
  487. func (m *ResourceMetricStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  488. b = b[:cap(b)]
  489. n, err := m.MarshalToSizedBuffer(b)
  490. if err != nil {
  491. return nil, err
  492. }
  493. return b[:n], nil
  494. }
  495. func (m *ResourceMetricStatus) XXX_Merge(src proto.Message) {
  496. xxx_messageInfo_ResourceMetricStatus.Merge(m, src)
  497. }
  498. func (m *ResourceMetricStatus) XXX_Size() int {
  499. return m.Size()
  500. }
  501. func (m *ResourceMetricStatus) XXX_DiscardUnknown() {
  502. xxx_messageInfo_ResourceMetricStatus.DiscardUnknown(m)
  503. }
  504. var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo
  505. func init() {
  506. proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ContainerResourceMetricSource")
  507. proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ContainerResourceMetricStatus")
  508. proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference")
  509. proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricSource")
  510. proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricStatus")
  511. proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscaler")
  512. proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition")
  513. proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerList")
  514. proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec")
  515. proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus")
  516. proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta1.MetricSpec")
  517. proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.MetricStatus")
  518. proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricSource")
  519. proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricStatus")
  520. proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricSource")
  521. proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricStatus")
  522. proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricSource")
  523. proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricStatus")
  524. }
  525. func init() {
  526. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptor_26c1bfc7a52d0478)
  527. }
  528. var fileDescriptor_26c1bfc7a52d0478 = []byte{
  529. // 1565 bytes of a gzipped FileDescriptorProto
  530. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0x45,
  531. 0x1b, 0x8e, 0xed, 0x4d, 0x9a, 0xbc, 0x4e, 0xf3, 0x33, 0xed, 0xd7, 0xba, 0xe9, 0x57, 0x3b, 0x5a,
  532. 0x7d, 0xfa, 0x94, 0xaf, 0xfa, 0xd8, 0x6d, 0x4d, 0xf8, 0x91, 0x10, 0x12, 0xb1, 0x0b, 0x6d, 0x45,
  533. 0xd2, 0x96, 0x49, 0x5a, 0x21, 0x68, 0x11, 0x93, 0xf5, 0xd4, 0x59, 0x62, 0xef, 0x5a, 0x3b, 0x63,
  534. 0xab, 0x29, 0x42, 0x42, 0x48, 0xdc, 0xb9, 0xc0, 0x19, 0x24, 0xae, 0x08, 0x71, 0x81, 0x33, 0xb7,
  535. 0x1e, 0x7b, 0x6c, 0x05, 0xb2, 0xa8, 0x39, 0x70, 0xe6, 0xda, 0x13, 0x9a, 0xd9, 0xd9, 0xf5, 0xae,
  536. 0xff, 0xe3, 0xa6, 0xe1, 0x47, 0xbd, 0x79, 0x77, 0xde, 0xf7, 0x79, 0x67, 0x9e, 0xf7, 0x6f, 0xde,
  537. 0x35, 0x5c, 0xdc, 0x7d, 0x99, 0x19, 0xb6, 0x6b, 0xee, 0xd6, 0xb7, 0xa9, 0xe7, 0x50, 0x4e, 0x99,
  538. 0xd9, 0xa0, 0x4e, 0xc9, 0xf5, 0x4c, 0xb5, 0x40, 0x6a, 0xb6, 0x49, 0xea, 0xdc, 0x65, 0x16, 0xa9,
  539. 0xd8, 0x4e, 0xd9, 0x6c, 0xe4, 0xb7, 0x29, 0x27, 0xe7, 0xcd, 0x32, 0x75, 0xa8, 0x47, 0x38, 0x2d,
  540. 0x19, 0x35, 0xcf, 0xe5, 0x2e, 0xca, 0xfa, 0xf2, 0x06, 0xa9, 0xd9, 0x46, 0x44, 0xde, 0x50, 0xf2,
  541. 0x4b, 0xcf, 0x95, 0x6d, 0xbe, 0x53, 0xdf, 0x36, 0x2c, 0xb7, 0x6a, 0x96, 0xdd, 0xb2, 0x6b, 0x4a,
  542. 0xb5, 0xed, 0xfa, 0x6d, 0xf9, 0x24, 0x1f, 0xe4, 0x2f, 0x1f, 0x6e, 0x49, 0x8f, 0x98, 0xb7, 0x5c,
  543. 0x8f, 0x9a, 0x8d, 0x2e, 0x93, 0x4b, 0xab, 0x6d, 0x99, 0x2a, 0xb1, 0x76, 0x6c, 0x87, 0x7a, 0x7b,
  544. 0x66, 0x6d, 0xb7, 0x2c, 0x95, 0x3c, 0xca, 0xdc, 0xba, 0x67, 0xd1, 0x7d, 0x69, 0x31, 0xb3, 0x4a,
  545. 0x39, 0xe9, 0x65, 0xcb, 0xec, 0xa7, 0xe5, 0xd5, 0x1d, 0x6e, 0x57, 0xbb, 0xcd, 0xbc, 0x38, 0x4c,
  546. 0x81, 0x59, 0x3b, 0xb4, 0x4a, 0x3a, 0xf5, 0xf4, 0xdf, 0x92, 0x70, 0xa6, 0xe8, 0x3a, 0x9c, 0x08,
  547. 0x0d, 0xac, 0x0e, 0xb1, 0x41, 0xb9, 0x67, 0x5b, 0x9b, 0xf2, 0x37, 0x2a, 0x82, 0xe6, 0x90, 0x2a,
  548. 0xcd, 0x24, 0x96, 0x13, 0x2b, 0x33, 0x05, 0xf3, 0x5e, 0x33, 0x37, 0xd1, 0x6a, 0xe6, 0xb4, 0x2b,
  549. 0xa4, 0x4a, 0x1f, 0x37, 0x73, 0xb9, 0x6e, 0xe2, 0x8c, 0x00, 0x46, 0x88, 0x60, 0xa9, 0x8c, 0xde,
  550. 0x86, 0x0c, 0x27, 0x5e, 0x99, 0xf2, 0xb5, 0x06, 0xf5, 0x48, 0x99, 0x5e, 0xe7, 0x76, 0xc5, 0xbe,
  551. 0x4b, 0xb8, 0xed, 0x3a, 0x99, 0xe4, 0x72, 0x62, 0x65, 0xb2, 0xf0, 0xef, 0x56, 0x33, 0x97, 0xd9,
  552. 0xea, 0x23, 0x83, 0xfb, 0x6a, 0xa3, 0x06, 0xa0, 0xd8, 0xda, 0x0d, 0x52, 0xa9, 0xd3, 0x4c, 0x6a,
  553. 0x39, 0xb1, 0x92, 0xce, 0x1b, 0x46, 0x3b, 0x4a, 0x42, 0x56, 0x8c, 0xda, 0x6e, 0x59, 0x86, 0x4d,
  554. 0xe0, 0x32, 0xe3, 0xad, 0x3a, 0x71, 0xb8, 0xcd, 0xf7, 0x0a, 0x27, 0x5a, 0xcd, 0x1c, 0xda, 0xea,
  555. 0x42, 0xc3, 0x3d, 0x2c, 0x20, 0x13, 0x66, 0xac, 0x80, 0xb7, 0x8c, 0x26, 0xb9, 0x59, 0x54, 0xdc,
  556. 0xcc, 0xb4, 0x09, 0x6d, 0xcb, 0xe8, 0xbf, 0x0f, 0x60, 0x9a, 0x13, 0x5e, 0x67, 0x07, 0xc3, 0xf4,
  557. 0xbb, 0x70, 0xca, 0xaa, 0x7b, 0x1e, 0x75, 0xfa, 0x53, 0x7d, 0xa6, 0xd5, 0xcc, 0x9d, 0x2a, 0xf6,
  558. 0x13, 0xc2, 0xfd, 0xf5, 0xd1, 0x47, 0x70, 0x2c, 0xbe, 0xf8, 0x24, 0x6c, 0x9f, 0x56, 0x07, 0x3c,
  559. 0x56, 0xec, 0x86, 0xc4, 0xbd, 0xec, 0xec, 0x9f, 0xf3, 0xcf, 0x13, 0x70, 0xba, 0xe8, 0xb9, 0x8c,
  560. 0xdd, 0xa0, 0x1e, 0xb3, 0x5d, 0xe7, 0xea, 0xf6, 0x07, 0xd4, 0xe2, 0x98, 0xde, 0xa6, 0x1e, 0x75,
  561. 0x2c, 0x8a, 0x96, 0x41, 0xdb, 0xb5, 0x9d, 0x92, 0x62, 0x7c, 0x36, 0x60, 0xfc, 0x4d, 0xdb, 0x29,
  562. 0x61, 0xb9, 0x22, 0x24, 0xa4, 0x4f, 0x92, 0x71, 0x89, 0x08, 0xe1, 0x79, 0x00, 0x52, 0xb3, 0x95,
  563. 0x01, 0x49, 0xc5, 0x4c, 0x01, 0x29, 0x39, 0x58, 0xbb, 0x76, 0x59, 0xad, 0xe0, 0x88, 0x94, 0xfe,
  564. 0x45, 0x0a, 0x8e, 0xbf, 0x7e, 0x87, 0x53, 0xcf, 0x21, 0x95, 0x58, 0xb2, 0xe5, 0x01, 0xaa, 0xf2,
  565. 0xf9, 0x4a, 0x3b, 0x10, 0x42, 0xb0, 0x8d, 0x70, 0x05, 0x47, 0xa4, 0x90, 0x0b, 0x73, 0xfe, 0xd3,
  566. 0x26, 0xad, 0x50, 0x8b, 0xbb, 0x9e, 0xdc, 0x6c, 0x3a, 0xff, 0xfc, 0x20, 0x7f, 0x30, 0x43, 0x94,
  567. 0x1e, 0xa3, 0x71, 0xde, 0x58, 0x27, 0xdb, 0xb4, 0x12, 0xa8, 0x16, 0x50, 0xab, 0x99, 0x9b, 0xdb,
  568. 0x88, 0xc1, 0xe1, 0x0e, 0x78, 0x44, 0x20, 0xed, 0x27, 0xc4, 0x93, 0x78, 0x7f, 0xbe, 0xd5, 0xcc,
  569. 0xa5, 0xb7, 0xda, 0x30, 0x38, 0x8a, 0xd9, 0x27, 0xab, 0xb5, 0xa7, 0x9d, 0xd5, 0xfa, 0x97, 0xdd,
  570. 0x8e, 0xf1, 0x73, 0xf3, 0x6f, 0xe1, 0x98, 0x1d, 0x98, 0x55, 0x69, 0xf3, 0x24, 0x9e, 0x39, 0xae,
  571. 0x8e, 0x35, 0x5b, 0x8c, 0x60, 0xe1, 0x18, 0x32, 0xda, 0xeb, 0x5d, 0x08, 0xc6, 0x73, 0xd0, 0xc9,
  572. 0xfd, 0x14, 0x01, 0xfd, 0xc7, 0x24, 0x9c, 0xbc, 0xe4, 0x7a, 0xf6, 0x5d, 0x91, 0xe5, 0x95, 0x6b,
  573. 0x6e, 0x69, 0x4d, 0xb5, 0x7f, 0xea, 0xa1, 0xf7, 0x61, 0x5a, 0xb0, 0x57, 0x22, 0x9c, 0x48, 0x1f,
  574. 0xa5, 0xf3, 0xe7, 0x46, 0xe3, 0xda, 0x2f, 0x0c, 0x1b, 0x94, 0x93, 0xb6, 0x57, 0xdb, 0xef, 0x70,
  575. 0x88, 0x8a, 0x6e, 0x81, 0xc6, 0x6a, 0xd4, 0x52, 0x9e, 0x7c, 0xc5, 0x18, 0x7c, 0x0d, 0x31, 0xfa,
  576. 0x6c, 0x74, 0xb3, 0x46, 0xad, 0x76, 0x31, 0x11, 0x4f, 0x58, 0xc2, 0x22, 0x0a, 0x53, 0x4c, 0x06,
  577. 0x9c, 0xf2, 0xdd, 0xab, 0xe3, 0x1a, 0x90, 0x20, 0x85, 0x39, 0x65, 0x62, 0xca, 0x7f, 0xc6, 0x0a,
  578. 0x5c, 0xff, 0x34, 0x05, 0xcb, 0x7d, 0x34, 0x8b, 0xae, 0x53, 0xb2, 0x65, 0xb1, 0xbf, 0x04, 0x1a,
  579. 0xdf, 0xab, 0x05, 0xc1, 0xbe, 0x1a, 0xec, 0x76, 0x6b, 0xaf, 0x26, 0xda, 0xd1, 0x7f, 0x86, 0xe9,
  580. 0x0b, 0x39, 0x2c, 0x11, 0xd0, 0x7a, 0x78, 0xaa, 0x64, 0x0c, 0x4b, 0x6d, 0xeb, 0x71, 0x33, 0xd7,
  581. 0xe3, 0xfe, 0x65, 0x84, 0x48, 0xf1, 0xcd, 0x8b, 0xda, 0x50, 0x21, 0x8c, 0x6f, 0x79, 0xc4, 0x61,
  582. 0xbe, 0x25, 0xbb, 0x1a, 0xc4, 0xfa, 0xd9, 0xd1, 0xdc, 0x2d, 0x34, 0x0a, 0x4b, 0x6a, 0x17, 0x68,
  583. 0xbd, 0x0b, 0x0d, 0xf7, 0xb0, 0x80, 0xfe, 0x0b, 0x53, 0x1e, 0x25, 0xcc, 0x75, 0x54, 0xeb, 0x09,
  584. 0xc9, 0xc5, 0xf2, 0x2d, 0x56, 0xab, 0xe8, 0x7f, 0x70, 0xa4, 0x4a, 0x19, 0x23, 0x65, 0x9a, 0x99,
  585. 0x94, 0x82, 0xf3, 0x4a, 0xf0, 0xc8, 0x86, 0xff, 0x1a, 0x07, 0xeb, 0xfa, 0xc3, 0x04, 0x9c, 0xee,
  586. 0xc3, 0xe3, 0xba, 0xcd, 0x38, 0xba, 0xd9, 0x15, 0xcf, 0xc6, 0x88, 0xb5, 0xc3, 0x66, 0x7e, 0x34,
  587. 0x2f, 0x28, 0xdb, 0xd3, 0xc1, 0x9b, 0x48, 0x2c, 0xdf, 0x84, 0x49, 0x9b, 0xd3, 0xaa, 0xf0, 0x4a,
  588. 0x6a, 0x25, 0x9d, 0x7f, 0x69, 0xcc, 0x58, 0x2b, 0x1c, 0x55, 0x36, 0x26, 0x2f, 0x0b, 0x34, 0xec,
  589. 0x83, 0xea, 0x3f, 0x25, 0xfb, 0x9e, 0x4d, 0x04, 0x3c, 0xfa, 0x10, 0xe6, 0xe4, 0x93, 0x5f, 0x99,
  590. 0x31, 0xbd, 0xad, 0x4e, 0x38, 0x34, 0xa7, 0x06, 0x34, 0xf4, 0xc2, 0x09, 0xb5, 0x95, 0xb9, 0xcd,
  591. 0x18, 0x34, 0xee, 0x30, 0x85, 0xce, 0x43, 0xba, 0x6a, 0x3b, 0x98, 0xd6, 0x2a, 0xb6, 0x45, 0x98,
  592. 0xba, 0x17, 0xc9, 0x96, 0xb4, 0xd1, 0x7e, 0x8d, 0xa3, 0x32, 0xe8, 0x05, 0x48, 0x57, 0xc9, 0x9d,
  593. 0x50, 0x25, 0x25, 0x55, 0x8e, 0x29, 0x7b, 0xe9, 0x8d, 0xf6, 0x12, 0x8e, 0xca, 0xa1, 0xeb, 0x22,
  594. 0x1a, 0x44, 0x95, 0x66, 0x19, 0x4d, 0xd2, 0x7c, 0x76, 0xd8, 0xf9, 0x54, 0x91, 0x17, 0x25, 0x22,
  595. 0x12, 0x39, 0x12, 0x02, 0x07, 0x58, 0xfa, 0xf7, 0x1a, 0x9c, 0x19, 0x98, 0xfb, 0xe8, 0x0d, 0x40,
  596. 0xee, 0x36, 0xa3, 0x5e, 0x83, 0x96, 0x2e, 0xfa, 0x97, 0x7e, 0x71, 0x3f, 0x11, 0x1c, 0xa7, 0xfc,
  597. 0x96, 0x78, 0xb5, 0x6b, 0x15, 0xf7, 0xd0, 0x40, 0x16, 0x1c, 0x15, 0xc9, 0xe0, 0x13, 0x6a, 0xab,
  598. 0xab, 0xd0, 0xfe, 0x32, 0x6d, 0xb1, 0xd5, 0xcc, 0x1d, 0x5d, 0x8f, 0x82, 0xe0, 0x38, 0x26, 0x5a,
  599. 0x83, 0x79, 0x55, 0xeb, 0x3b, 0x08, 0x3e, 0xa9, 0x18, 0x98, 0x2f, 0xc6, 0x97, 0x71, 0xa7, 0xbc,
  600. 0x80, 0x28, 0x51, 0x66, 0x7b, 0xb4, 0x14, 0x42, 0x68, 0x71, 0x88, 0x0b, 0xf1, 0x65, 0xdc, 0x29,
  601. 0x8f, 0x2a, 0x30, 0xa7, 0x50, 0x15, 0xdf, 0x99, 0x49, 0xe9, 0xb2, 0xff, 0x8f, 0xe8, 0x32, 0xbf,
  602. 0xe8, 0x86, 0x31, 0x58, 0x8c, 0x61, 0xe1, 0x0e, 0x6c, 0xc4, 0x01, 0xac, 0xa0, 0xc4, 0xb1, 0xcc,
  603. 0x94, 0xb4, 0xf4, 0xda, 0x98, 0x39, 0x18, 0xd6, 0xca, 0x76, 0xfb, 0x0a, 0x5f, 0x31, 0x1c, 0xb1,
  604. 0xa3, 0x7f, 0xab, 0x01, 0xb4, 0x23, 0x0c, 0xad, 0xc6, 0x8a, 0xfc, 0x72, 0x47, 0x91, 0x5f, 0x88,
  605. 0x5e, 0x4e, 0x23, 0x05, 0xfd, 0x06, 0x4c, 0xb9, 0x32, 0xf3, 0x54, 0x30, 0xe4, 0x87, 0x6d, 0x3b,
  606. 0xec, 0xa5, 0x21, 0x5a, 0x01, 0x44, 0xe9, 0x54, 0xf9, 0xab, 0xd0, 0xd0, 0x15, 0xd0, 0x6a, 0x6e,
  607. 0x29, 0x68, 0x7e, 0xe7, 0x86, 0xa1, 0x5e, 0x73, 0x4b, 0x2c, 0x86, 0x39, 0x2d, 0xf6, 0x2e, 0xde,
  608. 0x62, 0x89, 0x83, 0xde, 0x83, 0xe9, 0xe0, 0xba, 0xa1, 0xee, 0x26, 0xab, 0xc3, 0x30, 0x7b, 0xcd,
  609. 0xc0, 0x85, 0x59, 0x51, 0x41, 0x83, 0x15, 0x1c, 0x62, 0xa2, 0x4f, 0x12, 0xb0, 0x68, 0x75, 0xce,
  610. 0x74, 0x99, 0x23, 0xa3, 0xb5, 0xee, 0x81, 0x63, 0x77, 0xe1, 0x5f, 0xad, 0x66, 0x6e, 0xb1, 0x4b,
  611. 0x04, 0x77, 0x9b, 0x13, 0x87, 0xa4, 0xea, 0xca, 0x2a, 0x1b, 0xce, 0x08, 0x87, 0xec, 0x35, 0x7b,
  612. 0xf8, 0x87, 0x0c, 0x56, 0x70, 0x88, 0xa9, 0x7f, 0xa7, 0xc1, 0x6c, 0xec, 0x2e, 0xfc, 0x67, 0xc4,
  613. 0x8c, 0x9f, 0x5a, 0x07, 0x1b, 0x33, 0x3e, 0xe6, 0xc1, 0xc7, 0x8c, 0x8f, 0x7b, 0xa8, 0x31, 0xe3,
  614. 0x9b, 0x3c, 0xcc, 0x98, 0x89, 0x1c, 0xb2, 0x47, 0xcc, 0x3c, 0x4c, 0x01, 0xea, 0xce, 0x79, 0x64,
  615. 0xc1, 0x94, 0x3f, 0x74, 0x1d, 0x44, 0xaf, 0x0f, 0xef, 0x5f, 0xaa, 0xad, 0x2b, 0xe8, 0x8e, 0x51,
  616. 0x2d, 0x39, 0xd2, 0xa8, 0x46, 0x0f, 0x62, 0xa4, 0x0d, 0x2f, 0x03, 0x7d, 0xc7, 0xda, 0x5b, 0x30,
  617. 0xcd, 0x82, 0x59, 0x50, 0x1b, 0x7f, 0x16, 0x94, 0xac, 0x87, 0x53, 0x60, 0x08, 0x89, 0x4a, 0x30,
  618. 0x4b, 0xa2, 0xe3, 0xd8, 0xe4, 0x58, 0xc7, 0x58, 0x10, 0xb3, 0x5f, 0x6c, 0x0e, 0x8b, 0xa1, 0xea,
  619. 0x3f, 0x77, 0xfa, 0xd6, 0xaf, 0x0a, 0x7f, 0x59, 0xdf, 0x1e, 0xde, 0x54, 0xfc, 0x8f, 0x70, 0xef,
  620. 0x57, 0x49, 0x58, 0xe8, 0x6c, 0xac, 0x63, 0x7d, 0xfe, 0xb8, 0xdb, 0xf3, 0x1b, 0x4e, 0x72, 0xac,
  621. 0x4d, 0x87, 0xb3, 0xda, 0x88, 0x5f, 0x67, 0xa3, 0x9e, 0x48, 0x1d, 0xb8, 0x27, 0xf4, 0xaf, 0xe3,
  622. 0x1c, 0x8d, 0xff, 0x89, 0xa8, 0xcf, 0x07, 0xd5, 0xe4, 0x21, 0x7d, 0x50, 0x7d, 0xca, 0x34, 0x7d,
  623. 0x93, 0x84, 0xe3, 0xcf, 0xfe, 0x53, 0x18, 0xfd, 0xeb, 0xe3, 0x0f, 0xdd, 0x7c, 0x3d, 0xfb, 0x67,
  624. 0x60, 0x94, 0x40, 0x2e, 0x5c, 0xb8, 0xf7, 0x28, 0x3b, 0x71, 0xff, 0x51, 0x76, 0xe2, 0xc1, 0xa3,
  625. 0xec, 0xc4, 0xc7, 0xad, 0x6c, 0xe2, 0x5e, 0x2b, 0x9b, 0xb8, 0xdf, 0xca, 0x26, 0x1e, 0xb4, 0xb2,
  626. 0x89, 0x5f, 0x5a, 0xd9, 0xc4, 0x67, 0xbf, 0x66, 0x27, 0xde, 0xc9, 0x0e, 0xfe, 0x93, 0xf1, 0x8f,
  627. 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x76, 0xa2, 0x69, 0x9e, 0x1c, 0x00, 0x00,
  628. }
  629. func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) {
  630. size := m.Size()
  631. dAtA = make([]byte, size)
  632. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  633. if err != nil {
  634. return nil, err
  635. }
  636. return dAtA[:n], nil
  637. }
  638. func (m *ContainerResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
  639. size := m.Size()
  640. return m.MarshalToSizedBuffer(dAtA[:size])
  641. }
  642. func (m *ContainerResourceMetricSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  643. i := len(dAtA)
  644. _ = i
  645. var l int
  646. _ = l
  647. i -= len(m.Container)
  648. copy(dAtA[i:], m.Container)
  649. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
  650. i--
  651. dAtA[i] = 0x22
  652. if m.TargetAverageValue != nil {
  653. {
  654. size, err := m.TargetAverageValue.MarshalToSizedBuffer(dAtA[:i])
  655. if err != nil {
  656. return 0, err
  657. }
  658. i -= size
  659. i = encodeVarintGenerated(dAtA, i, uint64(size))
  660. }
  661. i--
  662. dAtA[i] = 0x1a
  663. }
  664. if m.TargetAverageUtilization != nil {
  665. i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
  666. i--
  667. dAtA[i] = 0x10
  668. }
  669. i -= len(m.Name)
  670. copy(dAtA[i:], m.Name)
  671. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  672. i--
  673. dAtA[i] = 0xa
  674. return len(dAtA) - i, nil
  675. }
  676. func (m *ContainerResourceMetricStatus) Marshal() (dAtA []byte, err error) {
  677. size := m.Size()
  678. dAtA = make([]byte, size)
  679. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  680. if err != nil {
  681. return nil, err
  682. }
  683. return dAtA[:n], nil
  684. }
  685. func (m *ContainerResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  686. size := m.Size()
  687. return m.MarshalToSizedBuffer(dAtA[:size])
  688. }
  689. func (m *ContainerResourceMetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  690. i := len(dAtA)
  691. _ = i
  692. var l int
  693. _ = l
  694. i -= len(m.Container)
  695. copy(dAtA[i:], m.Container)
  696. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
  697. i--
  698. dAtA[i] = 0x22
  699. {
  700. size, err := m.CurrentAverageValue.MarshalToSizedBuffer(dAtA[:i])
  701. if err != nil {
  702. return 0, err
  703. }
  704. i -= size
  705. i = encodeVarintGenerated(dAtA, i, uint64(size))
  706. }
  707. i--
  708. dAtA[i] = 0x1a
  709. if m.CurrentAverageUtilization != nil {
  710. i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
  711. i--
  712. dAtA[i] = 0x10
  713. }
  714. i -= len(m.Name)
  715. copy(dAtA[i:], m.Name)
  716. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  717. i--
  718. dAtA[i] = 0xa
  719. return len(dAtA) - i, nil
  720. }
  721. func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
  722. size := m.Size()
  723. dAtA = make([]byte, size)
  724. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  725. if err != nil {
  726. return nil, err
  727. }
  728. return dAtA[:n], nil
  729. }
  730. func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
  731. size := m.Size()
  732. return m.MarshalToSizedBuffer(dAtA[:size])
  733. }
  734. func (m *CrossVersionObjectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  735. i := len(dAtA)
  736. _ = i
  737. var l int
  738. _ = l
  739. i -= len(m.APIVersion)
  740. copy(dAtA[i:], m.APIVersion)
  741. i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
  742. i--
  743. dAtA[i] = 0x1a
  744. i -= len(m.Name)
  745. copy(dAtA[i:], m.Name)
  746. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  747. i--
  748. dAtA[i] = 0x12
  749. i -= len(m.Kind)
  750. copy(dAtA[i:], m.Kind)
  751. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
  752. i--
  753. dAtA[i] = 0xa
  754. return len(dAtA) - i, nil
  755. }
  756. func (m *ExternalMetricSource) Marshal() (dAtA []byte, err error) {
  757. size := m.Size()
  758. dAtA = make([]byte, size)
  759. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  760. if err != nil {
  761. return nil, err
  762. }
  763. return dAtA[:n], nil
  764. }
  765. func (m *ExternalMetricSource) MarshalTo(dAtA []byte) (int, error) {
  766. size := m.Size()
  767. return m.MarshalToSizedBuffer(dAtA[:size])
  768. }
  769. func (m *ExternalMetricSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  770. i := len(dAtA)
  771. _ = i
  772. var l int
  773. _ = l
  774. if m.TargetAverageValue != nil {
  775. {
  776. size, err := m.TargetAverageValue.MarshalToSizedBuffer(dAtA[:i])
  777. if err != nil {
  778. return 0, err
  779. }
  780. i -= size
  781. i = encodeVarintGenerated(dAtA, i, uint64(size))
  782. }
  783. i--
  784. dAtA[i] = 0x22
  785. }
  786. if m.TargetValue != nil {
  787. {
  788. size, err := m.TargetValue.MarshalToSizedBuffer(dAtA[:i])
  789. if err != nil {
  790. return 0, err
  791. }
  792. i -= size
  793. i = encodeVarintGenerated(dAtA, i, uint64(size))
  794. }
  795. i--
  796. dAtA[i] = 0x1a
  797. }
  798. if m.MetricSelector != nil {
  799. {
  800. size, err := m.MetricSelector.MarshalToSizedBuffer(dAtA[:i])
  801. if err != nil {
  802. return 0, err
  803. }
  804. i -= size
  805. i = encodeVarintGenerated(dAtA, i, uint64(size))
  806. }
  807. i--
  808. dAtA[i] = 0x12
  809. }
  810. i -= len(m.MetricName)
  811. copy(dAtA[i:], m.MetricName)
  812. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  813. i--
  814. dAtA[i] = 0xa
  815. return len(dAtA) - i, nil
  816. }
  817. func (m *ExternalMetricStatus) Marshal() (dAtA []byte, err error) {
  818. size := m.Size()
  819. dAtA = make([]byte, size)
  820. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  821. if err != nil {
  822. return nil, err
  823. }
  824. return dAtA[:n], nil
  825. }
  826. func (m *ExternalMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  827. size := m.Size()
  828. return m.MarshalToSizedBuffer(dAtA[:size])
  829. }
  830. func (m *ExternalMetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  831. i := len(dAtA)
  832. _ = i
  833. var l int
  834. _ = l
  835. if m.CurrentAverageValue != nil {
  836. {
  837. size, err := m.CurrentAverageValue.MarshalToSizedBuffer(dAtA[:i])
  838. if err != nil {
  839. return 0, err
  840. }
  841. i -= size
  842. i = encodeVarintGenerated(dAtA, i, uint64(size))
  843. }
  844. i--
  845. dAtA[i] = 0x22
  846. }
  847. {
  848. size, err := m.CurrentValue.MarshalToSizedBuffer(dAtA[:i])
  849. if err != nil {
  850. return 0, err
  851. }
  852. i -= size
  853. i = encodeVarintGenerated(dAtA, i, uint64(size))
  854. }
  855. i--
  856. dAtA[i] = 0x1a
  857. if m.MetricSelector != nil {
  858. {
  859. size, err := m.MetricSelector.MarshalToSizedBuffer(dAtA[:i])
  860. if err != nil {
  861. return 0, err
  862. }
  863. i -= size
  864. i = encodeVarintGenerated(dAtA, i, uint64(size))
  865. }
  866. i--
  867. dAtA[i] = 0x12
  868. }
  869. i -= len(m.MetricName)
  870. copy(dAtA[i:], m.MetricName)
  871. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  872. i--
  873. dAtA[i] = 0xa
  874. return len(dAtA) - i, nil
  875. }
  876. func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
  877. size := m.Size()
  878. dAtA = make([]byte, size)
  879. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  880. if err != nil {
  881. return nil, err
  882. }
  883. return dAtA[:n], nil
  884. }
  885. func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
  886. size := m.Size()
  887. return m.MarshalToSizedBuffer(dAtA[:size])
  888. }
  889. func (m *HorizontalPodAutoscaler) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  890. i := len(dAtA)
  891. _ = i
  892. var l int
  893. _ = l
  894. {
  895. size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
  896. if err != nil {
  897. return 0, err
  898. }
  899. i -= size
  900. i = encodeVarintGenerated(dAtA, i, uint64(size))
  901. }
  902. i--
  903. dAtA[i] = 0x1a
  904. {
  905. size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
  906. if err != nil {
  907. return 0, err
  908. }
  909. i -= size
  910. i = encodeVarintGenerated(dAtA, i, uint64(size))
  911. }
  912. i--
  913. dAtA[i] = 0x12
  914. {
  915. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  916. if err != nil {
  917. return 0, err
  918. }
  919. i -= size
  920. i = encodeVarintGenerated(dAtA, i, uint64(size))
  921. }
  922. i--
  923. dAtA[i] = 0xa
  924. return len(dAtA) - i, nil
  925. }
  926. func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
  927. size := m.Size()
  928. dAtA = make([]byte, size)
  929. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  930. if err != nil {
  931. return nil, err
  932. }
  933. return dAtA[:n], nil
  934. }
  935. func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
  936. size := m.Size()
  937. return m.MarshalToSizedBuffer(dAtA[:size])
  938. }
  939. func (m *HorizontalPodAutoscalerCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  940. i := len(dAtA)
  941. _ = i
  942. var l int
  943. _ = l
  944. i -= len(m.Message)
  945. copy(dAtA[i:], m.Message)
  946. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
  947. i--
  948. dAtA[i] = 0x2a
  949. i -= len(m.Reason)
  950. copy(dAtA[i:], m.Reason)
  951. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
  952. i--
  953. dAtA[i] = 0x22
  954. {
  955. size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i])
  956. if err != nil {
  957. return 0, err
  958. }
  959. i -= size
  960. i = encodeVarintGenerated(dAtA, i, uint64(size))
  961. }
  962. i--
  963. dAtA[i] = 0x1a
  964. i -= len(m.Status)
  965. copy(dAtA[i:], m.Status)
  966. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
  967. i--
  968. dAtA[i] = 0x12
  969. i -= len(m.Type)
  970. copy(dAtA[i:], m.Type)
  971. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
  972. i--
  973. dAtA[i] = 0xa
  974. return len(dAtA) - i, nil
  975. }
  976. func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
  977. size := m.Size()
  978. dAtA = make([]byte, size)
  979. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  980. if err != nil {
  981. return nil, err
  982. }
  983. return dAtA[:n], nil
  984. }
  985. func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
  986. size := m.Size()
  987. return m.MarshalToSizedBuffer(dAtA[:size])
  988. }
  989. func (m *HorizontalPodAutoscalerList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  990. i := len(dAtA)
  991. _ = i
  992. var l int
  993. _ = l
  994. if len(m.Items) > 0 {
  995. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  996. {
  997. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  998. if err != nil {
  999. return 0, err
  1000. }
  1001. i -= size
  1002. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1003. }
  1004. i--
  1005. dAtA[i] = 0x12
  1006. }
  1007. }
  1008. {
  1009. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  1010. if err != nil {
  1011. return 0, err
  1012. }
  1013. i -= size
  1014. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1015. }
  1016. i--
  1017. dAtA[i] = 0xa
  1018. return len(dAtA) - i, nil
  1019. }
  1020. func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
  1021. size := m.Size()
  1022. dAtA = make([]byte, size)
  1023. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1024. if err != nil {
  1025. return nil, err
  1026. }
  1027. return dAtA[:n], nil
  1028. }
  1029. func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
  1030. size := m.Size()
  1031. return m.MarshalToSizedBuffer(dAtA[:size])
  1032. }
  1033. func (m *HorizontalPodAutoscalerSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1034. i := len(dAtA)
  1035. _ = i
  1036. var l int
  1037. _ = l
  1038. if len(m.Metrics) > 0 {
  1039. for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- {
  1040. {
  1041. size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1042. if err != nil {
  1043. return 0, err
  1044. }
  1045. i -= size
  1046. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1047. }
  1048. i--
  1049. dAtA[i] = 0x22
  1050. }
  1051. }
  1052. i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
  1053. i--
  1054. dAtA[i] = 0x18
  1055. if m.MinReplicas != nil {
  1056. i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
  1057. i--
  1058. dAtA[i] = 0x10
  1059. }
  1060. {
  1061. size, err := m.ScaleTargetRef.MarshalToSizedBuffer(dAtA[:i])
  1062. if err != nil {
  1063. return 0, err
  1064. }
  1065. i -= size
  1066. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1067. }
  1068. i--
  1069. dAtA[i] = 0xa
  1070. return len(dAtA) - i, nil
  1071. }
  1072. func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
  1073. size := m.Size()
  1074. dAtA = make([]byte, size)
  1075. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1076. if err != nil {
  1077. return nil, err
  1078. }
  1079. return dAtA[:n], nil
  1080. }
  1081. func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
  1082. size := m.Size()
  1083. return m.MarshalToSizedBuffer(dAtA[:size])
  1084. }
  1085. func (m *HorizontalPodAutoscalerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1086. i := len(dAtA)
  1087. _ = i
  1088. var l int
  1089. _ = l
  1090. if len(m.Conditions) > 0 {
  1091. for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
  1092. {
  1093. size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1094. if err != nil {
  1095. return 0, err
  1096. }
  1097. i -= size
  1098. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1099. }
  1100. i--
  1101. dAtA[i] = 0x32
  1102. }
  1103. }
  1104. if len(m.CurrentMetrics) > 0 {
  1105. for iNdEx := len(m.CurrentMetrics) - 1; iNdEx >= 0; iNdEx-- {
  1106. {
  1107. size, err := m.CurrentMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1108. if err != nil {
  1109. return 0, err
  1110. }
  1111. i -= size
  1112. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1113. }
  1114. i--
  1115. dAtA[i] = 0x2a
  1116. }
  1117. }
  1118. i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
  1119. i--
  1120. dAtA[i] = 0x20
  1121. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
  1122. i--
  1123. dAtA[i] = 0x18
  1124. if m.LastScaleTime != nil {
  1125. {
  1126. size, err := m.LastScaleTime.MarshalToSizedBuffer(dAtA[:i])
  1127. if err != nil {
  1128. return 0, err
  1129. }
  1130. i -= size
  1131. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1132. }
  1133. i--
  1134. dAtA[i] = 0x12
  1135. }
  1136. if m.ObservedGeneration != nil {
  1137. i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
  1138. i--
  1139. dAtA[i] = 0x8
  1140. }
  1141. return len(dAtA) - i, nil
  1142. }
  1143. func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
  1144. size := m.Size()
  1145. dAtA = make([]byte, size)
  1146. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1147. if err != nil {
  1148. return nil, err
  1149. }
  1150. return dAtA[:n], nil
  1151. }
  1152. func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
  1153. size := m.Size()
  1154. return m.MarshalToSizedBuffer(dAtA[:size])
  1155. }
  1156. func (m *MetricSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1157. i := len(dAtA)
  1158. _ = i
  1159. var l int
  1160. _ = l
  1161. if m.ContainerResource != nil {
  1162. {
  1163. size, err := m.ContainerResource.MarshalToSizedBuffer(dAtA[:i])
  1164. if err != nil {
  1165. return 0, err
  1166. }
  1167. i -= size
  1168. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1169. }
  1170. i--
  1171. dAtA[i] = 0x3a
  1172. }
  1173. if m.External != nil {
  1174. {
  1175. size, err := m.External.MarshalToSizedBuffer(dAtA[:i])
  1176. if err != nil {
  1177. return 0, err
  1178. }
  1179. i -= size
  1180. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1181. }
  1182. i--
  1183. dAtA[i] = 0x2a
  1184. }
  1185. if m.Resource != nil {
  1186. {
  1187. size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
  1188. if err != nil {
  1189. return 0, err
  1190. }
  1191. i -= size
  1192. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1193. }
  1194. i--
  1195. dAtA[i] = 0x22
  1196. }
  1197. if m.Pods != nil {
  1198. {
  1199. size, err := m.Pods.MarshalToSizedBuffer(dAtA[:i])
  1200. if err != nil {
  1201. return 0, err
  1202. }
  1203. i -= size
  1204. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1205. }
  1206. i--
  1207. dAtA[i] = 0x1a
  1208. }
  1209. if m.Object != nil {
  1210. {
  1211. size, err := m.Object.MarshalToSizedBuffer(dAtA[:i])
  1212. if err != nil {
  1213. return 0, err
  1214. }
  1215. i -= size
  1216. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1217. }
  1218. i--
  1219. dAtA[i] = 0x12
  1220. }
  1221. i -= len(m.Type)
  1222. copy(dAtA[i:], m.Type)
  1223. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
  1224. i--
  1225. dAtA[i] = 0xa
  1226. return len(dAtA) - i, nil
  1227. }
  1228. func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
  1229. size := m.Size()
  1230. dAtA = make([]byte, size)
  1231. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1232. if err != nil {
  1233. return nil, err
  1234. }
  1235. return dAtA[:n], nil
  1236. }
  1237. func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
  1238. size := m.Size()
  1239. return m.MarshalToSizedBuffer(dAtA[:size])
  1240. }
  1241. func (m *MetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1242. i := len(dAtA)
  1243. _ = i
  1244. var l int
  1245. _ = l
  1246. if m.ContainerResource != nil {
  1247. {
  1248. size, err := m.ContainerResource.MarshalToSizedBuffer(dAtA[:i])
  1249. if err != nil {
  1250. return 0, err
  1251. }
  1252. i -= size
  1253. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1254. }
  1255. i--
  1256. dAtA[i] = 0x3a
  1257. }
  1258. if m.External != nil {
  1259. {
  1260. size, err := m.External.MarshalToSizedBuffer(dAtA[:i])
  1261. if err != nil {
  1262. return 0, err
  1263. }
  1264. i -= size
  1265. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1266. }
  1267. i--
  1268. dAtA[i] = 0x2a
  1269. }
  1270. if m.Resource != nil {
  1271. {
  1272. size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
  1273. if err != nil {
  1274. return 0, err
  1275. }
  1276. i -= size
  1277. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1278. }
  1279. i--
  1280. dAtA[i] = 0x22
  1281. }
  1282. if m.Pods != nil {
  1283. {
  1284. size, err := m.Pods.MarshalToSizedBuffer(dAtA[:i])
  1285. if err != nil {
  1286. return 0, err
  1287. }
  1288. i -= size
  1289. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1290. }
  1291. i--
  1292. dAtA[i] = 0x1a
  1293. }
  1294. if m.Object != nil {
  1295. {
  1296. size, err := m.Object.MarshalToSizedBuffer(dAtA[:i])
  1297. if err != nil {
  1298. return 0, err
  1299. }
  1300. i -= size
  1301. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1302. }
  1303. i--
  1304. dAtA[i] = 0x12
  1305. }
  1306. i -= len(m.Type)
  1307. copy(dAtA[i:], m.Type)
  1308. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
  1309. i--
  1310. dAtA[i] = 0xa
  1311. return len(dAtA) - i, nil
  1312. }
  1313. func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
  1314. size := m.Size()
  1315. dAtA = make([]byte, size)
  1316. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1317. if err != nil {
  1318. return nil, err
  1319. }
  1320. return dAtA[:n], nil
  1321. }
  1322. func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
  1323. size := m.Size()
  1324. return m.MarshalToSizedBuffer(dAtA[:size])
  1325. }
  1326. func (m *ObjectMetricSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1327. i := len(dAtA)
  1328. _ = i
  1329. var l int
  1330. _ = l
  1331. if m.AverageValue != nil {
  1332. {
  1333. size, err := m.AverageValue.MarshalToSizedBuffer(dAtA[:i])
  1334. if err != nil {
  1335. return 0, err
  1336. }
  1337. i -= size
  1338. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1339. }
  1340. i--
  1341. dAtA[i] = 0x2a
  1342. }
  1343. if m.Selector != nil {
  1344. {
  1345. size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
  1346. if err != nil {
  1347. return 0, err
  1348. }
  1349. i -= size
  1350. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1351. }
  1352. i--
  1353. dAtA[i] = 0x22
  1354. }
  1355. {
  1356. size, err := m.TargetValue.MarshalToSizedBuffer(dAtA[:i])
  1357. if err != nil {
  1358. return 0, err
  1359. }
  1360. i -= size
  1361. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1362. }
  1363. i--
  1364. dAtA[i] = 0x1a
  1365. i -= len(m.MetricName)
  1366. copy(dAtA[i:], m.MetricName)
  1367. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  1368. i--
  1369. dAtA[i] = 0x12
  1370. {
  1371. size, err := m.Target.MarshalToSizedBuffer(dAtA[:i])
  1372. if err != nil {
  1373. return 0, err
  1374. }
  1375. i -= size
  1376. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1377. }
  1378. i--
  1379. dAtA[i] = 0xa
  1380. return len(dAtA) - i, nil
  1381. }
  1382. func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
  1383. size := m.Size()
  1384. dAtA = make([]byte, size)
  1385. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1386. if err != nil {
  1387. return nil, err
  1388. }
  1389. return dAtA[:n], nil
  1390. }
  1391. func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  1392. size := m.Size()
  1393. return m.MarshalToSizedBuffer(dAtA[:size])
  1394. }
  1395. func (m *ObjectMetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1396. i := len(dAtA)
  1397. _ = i
  1398. var l int
  1399. _ = l
  1400. if m.AverageValue != nil {
  1401. {
  1402. size, err := m.AverageValue.MarshalToSizedBuffer(dAtA[:i])
  1403. if err != nil {
  1404. return 0, err
  1405. }
  1406. i -= size
  1407. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1408. }
  1409. i--
  1410. dAtA[i] = 0x2a
  1411. }
  1412. if m.Selector != nil {
  1413. {
  1414. size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
  1415. if err != nil {
  1416. return 0, err
  1417. }
  1418. i -= size
  1419. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1420. }
  1421. i--
  1422. dAtA[i] = 0x22
  1423. }
  1424. {
  1425. size, err := m.CurrentValue.MarshalToSizedBuffer(dAtA[:i])
  1426. if err != nil {
  1427. return 0, err
  1428. }
  1429. i -= size
  1430. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1431. }
  1432. i--
  1433. dAtA[i] = 0x1a
  1434. i -= len(m.MetricName)
  1435. copy(dAtA[i:], m.MetricName)
  1436. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  1437. i--
  1438. dAtA[i] = 0x12
  1439. {
  1440. size, err := m.Target.MarshalToSizedBuffer(dAtA[:i])
  1441. if err != nil {
  1442. return 0, err
  1443. }
  1444. i -= size
  1445. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1446. }
  1447. i--
  1448. dAtA[i] = 0xa
  1449. return len(dAtA) - i, nil
  1450. }
  1451. func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
  1452. size := m.Size()
  1453. dAtA = make([]byte, size)
  1454. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1455. if err != nil {
  1456. return nil, err
  1457. }
  1458. return dAtA[:n], nil
  1459. }
  1460. func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
  1461. size := m.Size()
  1462. return m.MarshalToSizedBuffer(dAtA[:size])
  1463. }
  1464. func (m *PodsMetricSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1465. i := len(dAtA)
  1466. _ = i
  1467. var l int
  1468. _ = l
  1469. if m.Selector != nil {
  1470. {
  1471. size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
  1472. if err != nil {
  1473. return 0, err
  1474. }
  1475. i -= size
  1476. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1477. }
  1478. i--
  1479. dAtA[i] = 0x1a
  1480. }
  1481. {
  1482. size, err := m.TargetAverageValue.MarshalToSizedBuffer(dAtA[:i])
  1483. if err != nil {
  1484. return 0, err
  1485. }
  1486. i -= size
  1487. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1488. }
  1489. i--
  1490. dAtA[i] = 0x12
  1491. i -= len(m.MetricName)
  1492. copy(dAtA[i:], m.MetricName)
  1493. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  1494. i--
  1495. dAtA[i] = 0xa
  1496. return len(dAtA) - i, nil
  1497. }
  1498. func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
  1499. size := m.Size()
  1500. dAtA = make([]byte, size)
  1501. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1502. if err != nil {
  1503. return nil, err
  1504. }
  1505. return dAtA[:n], nil
  1506. }
  1507. func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  1508. size := m.Size()
  1509. return m.MarshalToSizedBuffer(dAtA[:size])
  1510. }
  1511. func (m *PodsMetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1512. i := len(dAtA)
  1513. _ = i
  1514. var l int
  1515. _ = l
  1516. if m.Selector != nil {
  1517. {
  1518. size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
  1519. if err != nil {
  1520. return 0, err
  1521. }
  1522. i -= size
  1523. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1524. }
  1525. i--
  1526. dAtA[i] = 0x1a
  1527. }
  1528. {
  1529. size, err := m.CurrentAverageValue.MarshalToSizedBuffer(dAtA[:i])
  1530. if err != nil {
  1531. return 0, err
  1532. }
  1533. i -= size
  1534. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1535. }
  1536. i--
  1537. dAtA[i] = 0x12
  1538. i -= len(m.MetricName)
  1539. copy(dAtA[i:], m.MetricName)
  1540. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  1541. i--
  1542. dAtA[i] = 0xa
  1543. return len(dAtA) - i, nil
  1544. }
  1545. func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
  1546. size := m.Size()
  1547. dAtA = make([]byte, size)
  1548. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1549. if err != nil {
  1550. return nil, err
  1551. }
  1552. return dAtA[:n], nil
  1553. }
  1554. func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
  1555. size := m.Size()
  1556. return m.MarshalToSizedBuffer(dAtA[:size])
  1557. }
  1558. func (m *ResourceMetricSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1559. i := len(dAtA)
  1560. _ = i
  1561. var l int
  1562. _ = l
  1563. if m.TargetAverageValue != nil {
  1564. {
  1565. size, err := m.TargetAverageValue.MarshalToSizedBuffer(dAtA[:i])
  1566. if err != nil {
  1567. return 0, err
  1568. }
  1569. i -= size
  1570. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1571. }
  1572. i--
  1573. dAtA[i] = 0x1a
  1574. }
  1575. if m.TargetAverageUtilization != nil {
  1576. i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
  1577. i--
  1578. dAtA[i] = 0x10
  1579. }
  1580. i -= len(m.Name)
  1581. copy(dAtA[i:], m.Name)
  1582. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  1583. i--
  1584. dAtA[i] = 0xa
  1585. return len(dAtA) - i, nil
  1586. }
  1587. func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
  1588. size := m.Size()
  1589. dAtA = make([]byte, size)
  1590. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1591. if err != nil {
  1592. return nil, err
  1593. }
  1594. return dAtA[:n], nil
  1595. }
  1596. func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  1597. size := m.Size()
  1598. return m.MarshalToSizedBuffer(dAtA[:size])
  1599. }
  1600. func (m *ResourceMetricStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1601. i := len(dAtA)
  1602. _ = i
  1603. var l int
  1604. _ = l
  1605. {
  1606. size, err := m.CurrentAverageValue.MarshalToSizedBuffer(dAtA[:i])
  1607. if err != nil {
  1608. return 0, err
  1609. }
  1610. i -= size
  1611. i = encodeVarintGenerated(dAtA, i, uint64(size))
  1612. }
  1613. i--
  1614. dAtA[i] = 0x1a
  1615. if m.CurrentAverageUtilization != nil {
  1616. i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
  1617. i--
  1618. dAtA[i] = 0x10
  1619. }
  1620. i -= len(m.Name)
  1621. copy(dAtA[i:], m.Name)
  1622. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  1623. i--
  1624. dAtA[i] = 0xa
  1625. return len(dAtA) - i, nil
  1626. }
  1627. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  1628. offset -= sovGenerated(v)
  1629. base := offset
  1630. for v >= 1<<7 {
  1631. dAtA[offset] = uint8(v&0x7f | 0x80)
  1632. v >>= 7
  1633. offset++
  1634. }
  1635. dAtA[offset] = uint8(v)
  1636. return base
  1637. }
  1638. func (m *ContainerResourceMetricSource) Size() (n int) {
  1639. if m == nil {
  1640. return 0
  1641. }
  1642. var l int
  1643. _ = l
  1644. l = len(m.Name)
  1645. n += 1 + l + sovGenerated(uint64(l))
  1646. if m.TargetAverageUtilization != nil {
  1647. n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
  1648. }
  1649. if m.TargetAverageValue != nil {
  1650. l = m.TargetAverageValue.Size()
  1651. n += 1 + l + sovGenerated(uint64(l))
  1652. }
  1653. l = len(m.Container)
  1654. n += 1 + l + sovGenerated(uint64(l))
  1655. return n
  1656. }
  1657. func (m *ContainerResourceMetricStatus) Size() (n int) {
  1658. if m == nil {
  1659. return 0
  1660. }
  1661. var l int
  1662. _ = l
  1663. l = len(m.Name)
  1664. n += 1 + l + sovGenerated(uint64(l))
  1665. if m.CurrentAverageUtilization != nil {
  1666. n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
  1667. }
  1668. l = m.CurrentAverageValue.Size()
  1669. n += 1 + l + sovGenerated(uint64(l))
  1670. l = len(m.Container)
  1671. n += 1 + l + sovGenerated(uint64(l))
  1672. return n
  1673. }
  1674. func (m *CrossVersionObjectReference) Size() (n int) {
  1675. if m == nil {
  1676. return 0
  1677. }
  1678. var l int
  1679. _ = l
  1680. l = len(m.Kind)
  1681. n += 1 + l + sovGenerated(uint64(l))
  1682. l = len(m.Name)
  1683. n += 1 + l + sovGenerated(uint64(l))
  1684. l = len(m.APIVersion)
  1685. n += 1 + l + sovGenerated(uint64(l))
  1686. return n
  1687. }
  1688. func (m *ExternalMetricSource) Size() (n int) {
  1689. if m == nil {
  1690. return 0
  1691. }
  1692. var l int
  1693. _ = l
  1694. l = len(m.MetricName)
  1695. n += 1 + l + sovGenerated(uint64(l))
  1696. if m.MetricSelector != nil {
  1697. l = m.MetricSelector.Size()
  1698. n += 1 + l + sovGenerated(uint64(l))
  1699. }
  1700. if m.TargetValue != nil {
  1701. l = m.TargetValue.Size()
  1702. n += 1 + l + sovGenerated(uint64(l))
  1703. }
  1704. if m.TargetAverageValue != nil {
  1705. l = m.TargetAverageValue.Size()
  1706. n += 1 + l + sovGenerated(uint64(l))
  1707. }
  1708. return n
  1709. }
  1710. func (m *ExternalMetricStatus) Size() (n int) {
  1711. if m == nil {
  1712. return 0
  1713. }
  1714. var l int
  1715. _ = l
  1716. l = len(m.MetricName)
  1717. n += 1 + l + sovGenerated(uint64(l))
  1718. if m.MetricSelector != nil {
  1719. l = m.MetricSelector.Size()
  1720. n += 1 + l + sovGenerated(uint64(l))
  1721. }
  1722. l = m.CurrentValue.Size()
  1723. n += 1 + l + sovGenerated(uint64(l))
  1724. if m.CurrentAverageValue != nil {
  1725. l = m.CurrentAverageValue.Size()
  1726. n += 1 + l + sovGenerated(uint64(l))
  1727. }
  1728. return n
  1729. }
  1730. func (m *HorizontalPodAutoscaler) Size() (n int) {
  1731. if m == nil {
  1732. return 0
  1733. }
  1734. var l int
  1735. _ = l
  1736. l = m.ObjectMeta.Size()
  1737. n += 1 + l + sovGenerated(uint64(l))
  1738. l = m.Spec.Size()
  1739. n += 1 + l + sovGenerated(uint64(l))
  1740. l = m.Status.Size()
  1741. n += 1 + l + sovGenerated(uint64(l))
  1742. return n
  1743. }
  1744. func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
  1745. if m == nil {
  1746. return 0
  1747. }
  1748. var l int
  1749. _ = l
  1750. l = len(m.Type)
  1751. n += 1 + l + sovGenerated(uint64(l))
  1752. l = len(m.Status)
  1753. n += 1 + l + sovGenerated(uint64(l))
  1754. l = m.LastTransitionTime.Size()
  1755. n += 1 + l + sovGenerated(uint64(l))
  1756. l = len(m.Reason)
  1757. n += 1 + l + sovGenerated(uint64(l))
  1758. l = len(m.Message)
  1759. n += 1 + l + sovGenerated(uint64(l))
  1760. return n
  1761. }
  1762. func (m *HorizontalPodAutoscalerList) Size() (n int) {
  1763. if m == nil {
  1764. return 0
  1765. }
  1766. var l int
  1767. _ = l
  1768. l = m.ListMeta.Size()
  1769. n += 1 + l + sovGenerated(uint64(l))
  1770. if len(m.Items) > 0 {
  1771. for _, e := range m.Items {
  1772. l = e.Size()
  1773. n += 1 + l + sovGenerated(uint64(l))
  1774. }
  1775. }
  1776. return n
  1777. }
  1778. func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
  1779. if m == nil {
  1780. return 0
  1781. }
  1782. var l int
  1783. _ = l
  1784. l = m.ScaleTargetRef.Size()
  1785. n += 1 + l + sovGenerated(uint64(l))
  1786. if m.MinReplicas != nil {
  1787. n += 1 + sovGenerated(uint64(*m.MinReplicas))
  1788. }
  1789. n += 1 + sovGenerated(uint64(m.MaxReplicas))
  1790. if len(m.Metrics) > 0 {
  1791. for _, e := range m.Metrics {
  1792. l = e.Size()
  1793. n += 1 + l + sovGenerated(uint64(l))
  1794. }
  1795. }
  1796. return n
  1797. }
  1798. func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
  1799. if m == nil {
  1800. return 0
  1801. }
  1802. var l int
  1803. _ = l
  1804. if m.ObservedGeneration != nil {
  1805. n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
  1806. }
  1807. if m.LastScaleTime != nil {
  1808. l = m.LastScaleTime.Size()
  1809. n += 1 + l + sovGenerated(uint64(l))
  1810. }
  1811. n += 1 + sovGenerated(uint64(m.CurrentReplicas))
  1812. n += 1 + sovGenerated(uint64(m.DesiredReplicas))
  1813. if len(m.CurrentMetrics) > 0 {
  1814. for _, e := range m.CurrentMetrics {
  1815. l = e.Size()
  1816. n += 1 + l + sovGenerated(uint64(l))
  1817. }
  1818. }
  1819. if len(m.Conditions) > 0 {
  1820. for _, e := range m.Conditions {
  1821. l = e.Size()
  1822. n += 1 + l + sovGenerated(uint64(l))
  1823. }
  1824. }
  1825. return n
  1826. }
  1827. func (m *MetricSpec) Size() (n int) {
  1828. if m == nil {
  1829. return 0
  1830. }
  1831. var l int
  1832. _ = l
  1833. l = len(m.Type)
  1834. n += 1 + l + sovGenerated(uint64(l))
  1835. if m.Object != nil {
  1836. l = m.Object.Size()
  1837. n += 1 + l + sovGenerated(uint64(l))
  1838. }
  1839. if m.Pods != nil {
  1840. l = m.Pods.Size()
  1841. n += 1 + l + sovGenerated(uint64(l))
  1842. }
  1843. if m.Resource != nil {
  1844. l = m.Resource.Size()
  1845. n += 1 + l + sovGenerated(uint64(l))
  1846. }
  1847. if m.External != nil {
  1848. l = m.External.Size()
  1849. n += 1 + l + sovGenerated(uint64(l))
  1850. }
  1851. if m.ContainerResource != nil {
  1852. l = m.ContainerResource.Size()
  1853. n += 1 + l + sovGenerated(uint64(l))
  1854. }
  1855. return n
  1856. }
  1857. func (m *MetricStatus) Size() (n int) {
  1858. if m == nil {
  1859. return 0
  1860. }
  1861. var l int
  1862. _ = l
  1863. l = len(m.Type)
  1864. n += 1 + l + sovGenerated(uint64(l))
  1865. if m.Object != nil {
  1866. l = m.Object.Size()
  1867. n += 1 + l + sovGenerated(uint64(l))
  1868. }
  1869. if m.Pods != nil {
  1870. l = m.Pods.Size()
  1871. n += 1 + l + sovGenerated(uint64(l))
  1872. }
  1873. if m.Resource != nil {
  1874. l = m.Resource.Size()
  1875. n += 1 + l + sovGenerated(uint64(l))
  1876. }
  1877. if m.External != nil {
  1878. l = m.External.Size()
  1879. n += 1 + l + sovGenerated(uint64(l))
  1880. }
  1881. if m.ContainerResource != nil {
  1882. l = m.ContainerResource.Size()
  1883. n += 1 + l + sovGenerated(uint64(l))
  1884. }
  1885. return n
  1886. }
  1887. func (m *ObjectMetricSource) Size() (n int) {
  1888. if m == nil {
  1889. return 0
  1890. }
  1891. var l int
  1892. _ = l
  1893. l = m.Target.Size()
  1894. n += 1 + l + sovGenerated(uint64(l))
  1895. l = len(m.MetricName)
  1896. n += 1 + l + sovGenerated(uint64(l))
  1897. l = m.TargetValue.Size()
  1898. n += 1 + l + sovGenerated(uint64(l))
  1899. if m.Selector != nil {
  1900. l = m.Selector.Size()
  1901. n += 1 + l + sovGenerated(uint64(l))
  1902. }
  1903. if m.AverageValue != nil {
  1904. l = m.AverageValue.Size()
  1905. n += 1 + l + sovGenerated(uint64(l))
  1906. }
  1907. return n
  1908. }
  1909. func (m *ObjectMetricStatus) Size() (n int) {
  1910. if m == nil {
  1911. return 0
  1912. }
  1913. var l int
  1914. _ = l
  1915. l = m.Target.Size()
  1916. n += 1 + l + sovGenerated(uint64(l))
  1917. l = len(m.MetricName)
  1918. n += 1 + l + sovGenerated(uint64(l))
  1919. l = m.CurrentValue.Size()
  1920. n += 1 + l + sovGenerated(uint64(l))
  1921. if m.Selector != nil {
  1922. l = m.Selector.Size()
  1923. n += 1 + l + sovGenerated(uint64(l))
  1924. }
  1925. if m.AverageValue != nil {
  1926. l = m.AverageValue.Size()
  1927. n += 1 + l + sovGenerated(uint64(l))
  1928. }
  1929. return n
  1930. }
  1931. func (m *PodsMetricSource) Size() (n int) {
  1932. if m == nil {
  1933. return 0
  1934. }
  1935. var l int
  1936. _ = l
  1937. l = len(m.MetricName)
  1938. n += 1 + l + sovGenerated(uint64(l))
  1939. l = m.TargetAverageValue.Size()
  1940. n += 1 + l + sovGenerated(uint64(l))
  1941. if m.Selector != nil {
  1942. l = m.Selector.Size()
  1943. n += 1 + l + sovGenerated(uint64(l))
  1944. }
  1945. return n
  1946. }
  1947. func (m *PodsMetricStatus) Size() (n int) {
  1948. if m == nil {
  1949. return 0
  1950. }
  1951. var l int
  1952. _ = l
  1953. l = len(m.MetricName)
  1954. n += 1 + l + sovGenerated(uint64(l))
  1955. l = m.CurrentAverageValue.Size()
  1956. n += 1 + l + sovGenerated(uint64(l))
  1957. if m.Selector != nil {
  1958. l = m.Selector.Size()
  1959. n += 1 + l + sovGenerated(uint64(l))
  1960. }
  1961. return n
  1962. }
  1963. func (m *ResourceMetricSource) Size() (n int) {
  1964. if m == nil {
  1965. return 0
  1966. }
  1967. var l int
  1968. _ = l
  1969. l = len(m.Name)
  1970. n += 1 + l + sovGenerated(uint64(l))
  1971. if m.TargetAverageUtilization != nil {
  1972. n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
  1973. }
  1974. if m.TargetAverageValue != nil {
  1975. l = m.TargetAverageValue.Size()
  1976. n += 1 + l + sovGenerated(uint64(l))
  1977. }
  1978. return n
  1979. }
  1980. func (m *ResourceMetricStatus) Size() (n int) {
  1981. if m == nil {
  1982. return 0
  1983. }
  1984. var l int
  1985. _ = l
  1986. l = len(m.Name)
  1987. n += 1 + l + sovGenerated(uint64(l))
  1988. if m.CurrentAverageUtilization != nil {
  1989. n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
  1990. }
  1991. l = m.CurrentAverageValue.Size()
  1992. n += 1 + l + sovGenerated(uint64(l))
  1993. return n
  1994. }
  1995. func sovGenerated(x uint64) (n int) {
  1996. return (math_bits.Len64(x|1) + 6) / 7
  1997. }
  1998. func sozGenerated(x uint64) (n int) {
  1999. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2000. }
  2001. func (this *ContainerResourceMetricSource) String() string {
  2002. if this == nil {
  2003. return "nil"
  2004. }
  2005. s := strings.Join([]string{`&ContainerResourceMetricSource{`,
  2006. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  2007. `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
  2008. `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "resource.Quantity", 1) + `,`,
  2009. `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
  2010. `}`,
  2011. }, "")
  2012. return s
  2013. }
  2014. func (this *ContainerResourceMetricStatus) String() string {
  2015. if this == nil {
  2016. return "nil"
  2017. }
  2018. s := strings.Join([]string{`&ContainerResourceMetricStatus{`,
  2019. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  2020. `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
  2021. `CurrentAverageValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2022. `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
  2023. `}`,
  2024. }, "")
  2025. return s
  2026. }
  2027. func (this *CrossVersionObjectReference) String() string {
  2028. if this == nil {
  2029. return "nil"
  2030. }
  2031. s := strings.Join([]string{`&CrossVersionObjectReference{`,
  2032. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  2033. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  2034. `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
  2035. `}`,
  2036. }, "")
  2037. return s
  2038. }
  2039. func (this *ExternalMetricSource) String() string {
  2040. if this == nil {
  2041. return "nil"
  2042. }
  2043. s := strings.Join([]string{`&ExternalMetricSource{`,
  2044. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  2045. `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
  2046. `TargetValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "resource.Quantity", 1) + `,`,
  2047. `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "resource.Quantity", 1) + `,`,
  2048. `}`,
  2049. }, "")
  2050. return s
  2051. }
  2052. func (this *ExternalMetricStatus) String() string {
  2053. if this == nil {
  2054. return "nil"
  2055. }
  2056. s := strings.Join([]string{`&ExternalMetricStatus{`,
  2057. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  2058. `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
  2059. `CurrentValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2060. `CurrentAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "resource.Quantity", 1) + `,`,
  2061. `}`,
  2062. }, "")
  2063. return s
  2064. }
  2065. func (this *HorizontalPodAutoscaler) String() string {
  2066. if this == nil {
  2067. return "nil"
  2068. }
  2069. s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
  2070. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  2071. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
  2072. `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
  2073. `}`,
  2074. }, "")
  2075. return s
  2076. }
  2077. func (this *HorizontalPodAutoscalerCondition) String() string {
  2078. if this == nil {
  2079. return "nil"
  2080. }
  2081. s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
  2082. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  2083. `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
  2084. `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`,
  2085. `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
  2086. `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
  2087. `}`,
  2088. }, "")
  2089. return s
  2090. }
  2091. func (this *HorizontalPodAutoscalerList) String() string {
  2092. if this == nil {
  2093. return "nil"
  2094. }
  2095. repeatedStringForItems := "[]HorizontalPodAutoscaler{"
  2096. for _, f := range this.Items {
  2097. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + ","
  2098. }
  2099. repeatedStringForItems += "}"
  2100. s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
  2101. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  2102. `Items:` + repeatedStringForItems + `,`,
  2103. `}`,
  2104. }, "")
  2105. return s
  2106. }
  2107. func (this *HorizontalPodAutoscalerSpec) String() string {
  2108. if this == nil {
  2109. return "nil"
  2110. }
  2111. repeatedStringForMetrics := "[]MetricSpec{"
  2112. for _, f := range this.Metrics {
  2113. repeatedStringForMetrics += strings.Replace(strings.Replace(f.String(), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + ","
  2114. }
  2115. repeatedStringForMetrics += "}"
  2116. s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
  2117. `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
  2118. `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
  2119. `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
  2120. `Metrics:` + repeatedStringForMetrics + `,`,
  2121. `}`,
  2122. }, "")
  2123. return s
  2124. }
  2125. func (this *HorizontalPodAutoscalerStatus) String() string {
  2126. if this == nil {
  2127. return "nil"
  2128. }
  2129. repeatedStringForCurrentMetrics := "[]MetricStatus{"
  2130. for _, f := range this.CurrentMetrics {
  2131. repeatedStringForCurrentMetrics += strings.Replace(strings.Replace(f.String(), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + ","
  2132. }
  2133. repeatedStringForCurrentMetrics += "}"
  2134. repeatedStringForConditions := "[]HorizontalPodAutoscalerCondition{"
  2135. for _, f := range this.Conditions {
  2136. repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "HorizontalPodAutoscalerCondition", "HorizontalPodAutoscalerCondition", 1), `&`, ``, 1) + ","
  2137. }
  2138. repeatedStringForConditions += "}"
  2139. s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
  2140. `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
  2141. `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "v1.Time", 1) + `,`,
  2142. `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
  2143. `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
  2144. `CurrentMetrics:` + repeatedStringForCurrentMetrics + `,`,
  2145. `Conditions:` + repeatedStringForConditions + `,`,
  2146. `}`,
  2147. }, "")
  2148. return s
  2149. }
  2150. func (this *MetricSpec) String() string {
  2151. if this == nil {
  2152. return "nil"
  2153. }
  2154. s := strings.Join([]string{`&MetricSpec{`,
  2155. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  2156. `Object:` + strings.Replace(this.Object.String(), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
  2157. `Pods:` + strings.Replace(this.Pods.String(), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
  2158. `Resource:` + strings.Replace(this.Resource.String(), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
  2159. `External:` + strings.Replace(this.External.String(), "ExternalMetricSource", "ExternalMetricSource", 1) + `,`,
  2160. `ContainerResource:` + strings.Replace(this.ContainerResource.String(), "ContainerResourceMetricSource", "ContainerResourceMetricSource", 1) + `,`,
  2161. `}`,
  2162. }, "")
  2163. return s
  2164. }
  2165. func (this *MetricStatus) String() string {
  2166. if this == nil {
  2167. return "nil"
  2168. }
  2169. s := strings.Join([]string{`&MetricStatus{`,
  2170. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  2171. `Object:` + strings.Replace(this.Object.String(), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
  2172. `Pods:` + strings.Replace(this.Pods.String(), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
  2173. `Resource:` + strings.Replace(this.Resource.String(), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
  2174. `External:` + strings.Replace(this.External.String(), "ExternalMetricStatus", "ExternalMetricStatus", 1) + `,`,
  2175. `ContainerResource:` + strings.Replace(this.ContainerResource.String(), "ContainerResourceMetricStatus", "ContainerResourceMetricStatus", 1) + `,`,
  2176. `}`,
  2177. }, "")
  2178. return s
  2179. }
  2180. func (this *ObjectMetricSource) String() string {
  2181. if this == nil {
  2182. return "nil"
  2183. }
  2184. s := strings.Join([]string{`&ObjectMetricSource{`,
  2185. `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
  2186. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  2187. `TargetValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2188. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
  2189. `AverageValue:` + strings.Replace(fmt.Sprintf("%v", this.AverageValue), "Quantity", "resource.Quantity", 1) + `,`,
  2190. `}`,
  2191. }, "")
  2192. return s
  2193. }
  2194. func (this *ObjectMetricStatus) String() string {
  2195. if this == nil {
  2196. return "nil"
  2197. }
  2198. s := strings.Join([]string{`&ObjectMetricStatus{`,
  2199. `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
  2200. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  2201. `CurrentValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2202. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
  2203. `AverageValue:` + strings.Replace(fmt.Sprintf("%v", this.AverageValue), "Quantity", "resource.Quantity", 1) + `,`,
  2204. `}`,
  2205. }, "")
  2206. return s
  2207. }
  2208. func (this *PodsMetricSource) String() string {
  2209. if this == nil {
  2210. return "nil"
  2211. }
  2212. s := strings.Join([]string{`&PodsMetricSource{`,
  2213. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  2214. `TargetAverageValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2215. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
  2216. `}`,
  2217. }, "")
  2218. return s
  2219. }
  2220. func (this *PodsMetricStatus) String() string {
  2221. if this == nil {
  2222. return "nil"
  2223. }
  2224. s := strings.Join([]string{`&PodsMetricStatus{`,
  2225. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  2226. `CurrentAverageValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2227. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
  2228. `}`,
  2229. }, "")
  2230. return s
  2231. }
  2232. func (this *ResourceMetricSource) String() string {
  2233. if this == nil {
  2234. return "nil"
  2235. }
  2236. s := strings.Join([]string{`&ResourceMetricSource{`,
  2237. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  2238. `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
  2239. `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "resource.Quantity", 1) + `,`,
  2240. `}`,
  2241. }, "")
  2242. return s
  2243. }
  2244. func (this *ResourceMetricStatus) String() string {
  2245. if this == nil {
  2246. return "nil"
  2247. }
  2248. s := strings.Join([]string{`&ResourceMetricStatus{`,
  2249. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  2250. `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
  2251. `CurrentAverageValue:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
  2252. `}`,
  2253. }, "")
  2254. return s
  2255. }
  2256. func valueToStringGenerated(v interface{}) string {
  2257. rv := reflect.ValueOf(v)
  2258. if rv.IsNil() {
  2259. return "nil"
  2260. }
  2261. pv := reflect.Indirect(rv).Interface()
  2262. return fmt.Sprintf("*%v", pv)
  2263. }
  2264. func (m *ContainerResourceMetricSource) Unmarshal(dAtA []byte) error {
  2265. l := len(dAtA)
  2266. iNdEx := 0
  2267. for iNdEx < l {
  2268. preIndex := iNdEx
  2269. var wire uint64
  2270. for shift := uint(0); ; shift += 7 {
  2271. if shift >= 64 {
  2272. return ErrIntOverflowGenerated
  2273. }
  2274. if iNdEx >= l {
  2275. return io.ErrUnexpectedEOF
  2276. }
  2277. b := dAtA[iNdEx]
  2278. iNdEx++
  2279. wire |= uint64(b&0x7F) << shift
  2280. if b < 0x80 {
  2281. break
  2282. }
  2283. }
  2284. fieldNum := int32(wire >> 3)
  2285. wireType := int(wire & 0x7)
  2286. if wireType == 4 {
  2287. return fmt.Errorf("proto: ContainerResourceMetricSource: wiretype end group for non-group")
  2288. }
  2289. if fieldNum <= 0 {
  2290. return fmt.Errorf("proto: ContainerResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  2291. }
  2292. switch fieldNum {
  2293. case 1:
  2294. if wireType != 2 {
  2295. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2296. }
  2297. var stringLen uint64
  2298. for shift := uint(0); ; shift += 7 {
  2299. if shift >= 64 {
  2300. return ErrIntOverflowGenerated
  2301. }
  2302. if iNdEx >= l {
  2303. return io.ErrUnexpectedEOF
  2304. }
  2305. b := dAtA[iNdEx]
  2306. iNdEx++
  2307. stringLen |= uint64(b&0x7F) << shift
  2308. if b < 0x80 {
  2309. break
  2310. }
  2311. }
  2312. intStringLen := int(stringLen)
  2313. if intStringLen < 0 {
  2314. return ErrInvalidLengthGenerated
  2315. }
  2316. postIndex := iNdEx + intStringLen
  2317. if postIndex < 0 {
  2318. return ErrInvalidLengthGenerated
  2319. }
  2320. if postIndex > l {
  2321. return io.ErrUnexpectedEOF
  2322. }
  2323. m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
  2324. iNdEx = postIndex
  2325. case 2:
  2326. if wireType != 0 {
  2327. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
  2328. }
  2329. var v int32
  2330. for shift := uint(0); ; shift += 7 {
  2331. if shift >= 64 {
  2332. return ErrIntOverflowGenerated
  2333. }
  2334. if iNdEx >= l {
  2335. return io.ErrUnexpectedEOF
  2336. }
  2337. b := dAtA[iNdEx]
  2338. iNdEx++
  2339. v |= int32(b&0x7F) << shift
  2340. if b < 0x80 {
  2341. break
  2342. }
  2343. }
  2344. m.TargetAverageUtilization = &v
  2345. case 3:
  2346. if wireType != 2 {
  2347. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  2348. }
  2349. var msglen int
  2350. for shift := uint(0); ; shift += 7 {
  2351. if shift >= 64 {
  2352. return ErrIntOverflowGenerated
  2353. }
  2354. if iNdEx >= l {
  2355. return io.ErrUnexpectedEOF
  2356. }
  2357. b := dAtA[iNdEx]
  2358. iNdEx++
  2359. msglen |= int(b&0x7F) << shift
  2360. if b < 0x80 {
  2361. break
  2362. }
  2363. }
  2364. if msglen < 0 {
  2365. return ErrInvalidLengthGenerated
  2366. }
  2367. postIndex := iNdEx + msglen
  2368. if postIndex < 0 {
  2369. return ErrInvalidLengthGenerated
  2370. }
  2371. if postIndex > l {
  2372. return io.ErrUnexpectedEOF
  2373. }
  2374. if m.TargetAverageValue == nil {
  2375. m.TargetAverageValue = &resource.Quantity{}
  2376. }
  2377. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2378. return err
  2379. }
  2380. iNdEx = postIndex
  2381. case 4:
  2382. if wireType != 2 {
  2383. return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
  2384. }
  2385. var stringLen uint64
  2386. for shift := uint(0); ; shift += 7 {
  2387. if shift >= 64 {
  2388. return ErrIntOverflowGenerated
  2389. }
  2390. if iNdEx >= l {
  2391. return io.ErrUnexpectedEOF
  2392. }
  2393. b := dAtA[iNdEx]
  2394. iNdEx++
  2395. stringLen |= uint64(b&0x7F) << shift
  2396. if b < 0x80 {
  2397. break
  2398. }
  2399. }
  2400. intStringLen := int(stringLen)
  2401. if intStringLen < 0 {
  2402. return ErrInvalidLengthGenerated
  2403. }
  2404. postIndex := iNdEx + intStringLen
  2405. if postIndex < 0 {
  2406. return ErrInvalidLengthGenerated
  2407. }
  2408. if postIndex > l {
  2409. return io.ErrUnexpectedEOF
  2410. }
  2411. m.Container = string(dAtA[iNdEx:postIndex])
  2412. iNdEx = postIndex
  2413. default:
  2414. iNdEx = preIndex
  2415. skippy, err := skipGenerated(dAtA[iNdEx:])
  2416. if err != nil {
  2417. return err
  2418. }
  2419. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2420. return ErrInvalidLengthGenerated
  2421. }
  2422. if (iNdEx + skippy) > l {
  2423. return io.ErrUnexpectedEOF
  2424. }
  2425. iNdEx += skippy
  2426. }
  2427. }
  2428. if iNdEx > l {
  2429. return io.ErrUnexpectedEOF
  2430. }
  2431. return nil
  2432. }
  2433. func (m *ContainerResourceMetricStatus) Unmarshal(dAtA []byte) error {
  2434. l := len(dAtA)
  2435. iNdEx := 0
  2436. for iNdEx < l {
  2437. preIndex := iNdEx
  2438. var wire uint64
  2439. for shift := uint(0); ; shift += 7 {
  2440. if shift >= 64 {
  2441. return ErrIntOverflowGenerated
  2442. }
  2443. if iNdEx >= l {
  2444. return io.ErrUnexpectedEOF
  2445. }
  2446. b := dAtA[iNdEx]
  2447. iNdEx++
  2448. wire |= uint64(b&0x7F) << shift
  2449. if b < 0x80 {
  2450. break
  2451. }
  2452. }
  2453. fieldNum := int32(wire >> 3)
  2454. wireType := int(wire & 0x7)
  2455. if wireType == 4 {
  2456. return fmt.Errorf("proto: ContainerResourceMetricStatus: wiretype end group for non-group")
  2457. }
  2458. if fieldNum <= 0 {
  2459. return fmt.Errorf("proto: ContainerResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  2460. }
  2461. switch fieldNum {
  2462. case 1:
  2463. if wireType != 2 {
  2464. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2465. }
  2466. var stringLen uint64
  2467. for shift := uint(0); ; shift += 7 {
  2468. if shift >= 64 {
  2469. return ErrIntOverflowGenerated
  2470. }
  2471. if iNdEx >= l {
  2472. return io.ErrUnexpectedEOF
  2473. }
  2474. b := dAtA[iNdEx]
  2475. iNdEx++
  2476. stringLen |= uint64(b&0x7F) << shift
  2477. if b < 0x80 {
  2478. break
  2479. }
  2480. }
  2481. intStringLen := int(stringLen)
  2482. if intStringLen < 0 {
  2483. return ErrInvalidLengthGenerated
  2484. }
  2485. postIndex := iNdEx + intStringLen
  2486. if postIndex < 0 {
  2487. return ErrInvalidLengthGenerated
  2488. }
  2489. if postIndex > l {
  2490. return io.ErrUnexpectedEOF
  2491. }
  2492. m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
  2493. iNdEx = postIndex
  2494. case 2:
  2495. if wireType != 0 {
  2496. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
  2497. }
  2498. var v int32
  2499. for shift := uint(0); ; shift += 7 {
  2500. if shift >= 64 {
  2501. return ErrIntOverflowGenerated
  2502. }
  2503. if iNdEx >= l {
  2504. return io.ErrUnexpectedEOF
  2505. }
  2506. b := dAtA[iNdEx]
  2507. iNdEx++
  2508. v |= int32(b&0x7F) << shift
  2509. if b < 0x80 {
  2510. break
  2511. }
  2512. }
  2513. m.CurrentAverageUtilization = &v
  2514. case 3:
  2515. if wireType != 2 {
  2516. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  2517. }
  2518. var msglen int
  2519. for shift := uint(0); ; shift += 7 {
  2520. if shift >= 64 {
  2521. return ErrIntOverflowGenerated
  2522. }
  2523. if iNdEx >= l {
  2524. return io.ErrUnexpectedEOF
  2525. }
  2526. b := dAtA[iNdEx]
  2527. iNdEx++
  2528. msglen |= int(b&0x7F) << shift
  2529. if b < 0x80 {
  2530. break
  2531. }
  2532. }
  2533. if msglen < 0 {
  2534. return ErrInvalidLengthGenerated
  2535. }
  2536. postIndex := iNdEx + msglen
  2537. if postIndex < 0 {
  2538. return ErrInvalidLengthGenerated
  2539. }
  2540. if postIndex > l {
  2541. return io.ErrUnexpectedEOF
  2542. }
  2543. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2544. return err
  2545. }
  2546. iNdEx = postIndex
  2547. case 4:
  2548. if wireType != 2 {
  2549. return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
  2550. }
  2551. var stringLen uint64
  2552. for shift := uint(0); ; shift += 7 {
  2553. if shift >= 64 {
  2554. return ErrIntOverflowGenerated
  2555. }
  2556. if iNdEx >= l {
  2557. return io.ErrUnexpectedEOF
  2558. }
  2559. b := dAtA[iNdEx]
  2560. iNdEx++
  2561. stringLen |= uint64(b&0x7F) << shift
  2562. if b < 0x80 {
  2563. break
  2564. }
  2565. }
  2566. intStringLen := int(stringLen)
  2567. if intStringLen < 0 {
  2568. return ErrInvalidLengthGenerated
  2569. }
  2570. postIndex := iNdEx + intStringLen
  2571. if postIndex < 0 {
  2572. return ErrInvalidLengthGenerated
  2573. }
  2574. if postIndex > l {
  2575. return io.ErrUnexpectedEOF
  2576. }
  2577. m.Container = string(dAtA[iNdEx:postIndex])
  2578. iNdEx = postIndex
  2579. default:
  2580. iNdEx = preIndex
  2581. skippy, err := skipGenerated(dAtA[iNdEx:])
  2582. if err != nil {
  2583. return err
  2584. }
  2585. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2586. return ErrInvalidLengthGenerated
  2587. }
  2588. if (iNdEx + skippy) > l {
  2589. return io.ErrUnexpectedEOF
  2590. }
  2591. iNdEx += skippy
  2592. }
  2593. }
  2594. if iNdEx > l {
  2595. return io.ErrUnexpectedEOF
  2596. }
  2597. return nil
  2598. }
  2599. func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
  2600. l := len(dAtA)
  2601. iNdEx := 0
  2602. for iNdEx < l {
  2603. preIndex := iNdEx
  2604. var wire uint64
  2605. for shift := uint(0); ; shift += 7 {
  2606. if shift >= 64 {
  2607. return ErrIntOverflowGenerated
  2608. }
  2609. if iNdEx >= l {
  2610. return io.ErrUnexpectedEOF
  2611. }
  2612. b := dAtA[iNdEx]
  2613. iNdEx++
  2614. wire |= uint64(b&0x7F) << shift
  2615. if b < 0x80 {
  2616. break
  2617. }
  2618. }
  2619. fieldNum := int32(wire >> 3)
  2620. wireType := int(wire & 0x7)
  2621. if wireType == 4 {
  2622. return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
  2623. }
  2624. if fieldNum <= 0 {
  2625. return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
  2626. }
  2627. switch fieldNum {
  2628. case 1:
  2629. if wireType != 2 {
  2630. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  2631. }
  2632. var stringLen uint64
  2633. for shift := uint(0); ; shift += 7 {
  2634. if shift >= 64 {
  2635. return ErrIntOverflowGenerated
  2636. }
  2637. if iNdEx >= l {
  2638. return io.ErrUnexpectedEOF
  2639. }
  2640. b := dAtA[iNdEx]
  2641. iNdEx++
  2642. stringLen |= uint64(b&0x7F) << shift
  2643. if b < 0x80 {
  2644. break
  2645. }
  2646. }
  2647. intStringLen := int(stringLen)
  2648. if intStringLen < 0 {
  2649. return ErrInvalidLengthGenerated
  2650. }
  2651. postIndex := iNdEx + intStringLen
  2652. if postIndex < 0 {
  2653. return ErrInvalidLengthGenerated
  2654. }
  2655. if postIndex > l {
  2656. return io.ErrUnexpectedEOF
  2657. }
  2658. m.Kind = string(dAtA[iNdEx:postIndex])
  2659. iNdEx = postIndex
  2660. case 2:
  2661. if wireType != 2 {
  2662. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2663. }
  2664. var stringLen uint64
  2665. for shift := uint(0); ; shift += 7 {
  2666. if shift >= 64 {
  2667. return ErrIntOverflowGenerated
  2668. }
  2669. if iNdEx >= l {
  2670. return io.ErrUnexpectedEOF
  2671. }
  2672. b := dAtA[iNdEx]
  2673. iNdEx++
  2674. stringLen |= uint64(b&0x7F) << shift
  2675. if b < 0x80 {
  2676. break
  2677. }
  2678. }
  2679. intStringLen := int(stringLen)
  2680. if intStringLen < 0 {
  2681. return ErrInvalidLengthGenerated
  2682. }
  2683. postIndex := iNdEx + intStringLen
  2684. if postIndex < 0 {
  2685. return ErrInvalidLengthGenerated
  2686. }
  2687. if postIndex > l {
  2688. return io.ErrUnexpectedEOF
  2689. }
  2690. m.Name = string(dAtA[iNdEx:postIndex])
  2691. iNdEx = postIndex
  2692. case 3:
  2693. if wireType != 2 {
  2694. return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
  2695. }
  2696. var stringLen uint64
  2697. for shift := uint(0); ; shift += 7 {
  2698. if shift >= 64 {
  2699. return ErrIntOverflowGenerated
  2700. }
  2701. if iNdEx >= l {
  2702. return io.ErrUnexpectedEOF
  2703. }
  2704. b := dAtA[iNdEx]
  2705. iNdEx++
  2706. stringLen |= uint64(b&0x7F) << shift
  2707. if b < 0x80 {
  2708. break
  2709. }
  2710. }
  2711. intStringLen := int(stringLen)
  2712. if intStringLen < 0 {
  2713. return ErrInvalidLengthGenerated
  2714. }
  2715. postIndex := iNdEx + intStringLen
  2716. if postIndex < 0 {
  2717. return ErrInvalidLengthGenerated
  2718. }
  2719. if postIndex > l {
  2720. return io.ErrUnexpectedEOF
  2721. }
  2722. m.APIVersion = string(dAtA[iNdEx:postIndex])
  2723. iNdEx = postIndex
  2724. default:
  2725. iNdEx = preIndex
  2726. skippy, err := skipGenerated(dAtA[iNdEx:])
  2727. if err != nil {
  2728. return err
  2729. }
  2730. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2731. return ErrInvalidLengthGenerated
  2732. }
  2733. if (iNdEx + skippy) > l {
  2734. return io.ErrUnexpectedEOF
  2735. }
  2736. iNdEx += skippy
  2737. }
  2738. }
  2739. if iNdEx > l {
  2740. return io.ErrUnexpectedEOF
  2741. }
  2742. return nil
  2743. }
  2744. func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error {
  2745. l := len(dAtA)
  2746. iNdEx := 0
  2747. for iNdEx < l {
  2748. preIndex := iNdEx
  2749. var wire uint64
  2750. for shift := uint(0); ; shift += 7 {
  2751. if shift >= 64 {
  2752. return ErrIntOverflowGenerated
  2753. }
  2754. if iNdEx >= l {
  2755. return io.ErrUnexpectedEOF
  2756. }
  2757. b := dAtA[iNdEx]
  2758. iNdEx++
  2759. wire |= uint64(b&0x7F) << shift
  2760. if b < 0x80 {
  2761. break
  2762. }
  2763. }
  2764. fieldNum := int32(wire >> 3)
  2765. wireType := int(wire & 0x7)
  2766. if wireType == 4 {
  2767. return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group")
  2768. }
  2769. if fieldNum <= 0 {
  2770. return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  2771. }
  2772. switch fieldNum {
  2773. case 1:
  2774. if wireType != 2 {
  2775. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  2776. }
  2777. var stringLen uint64
  2778. for shift := uint(0); ; shift += 7 {
  2779. if shift >= 64 {
  2780. return ErrIntOverflowGenerated
  2781. }
  2782. if iNdEx >= l {
  2783. return io.ErrUnexpectedEOF
  2784. }
  2785. b := dAtA[iNdEx]
  2786. iNdEx++
  2787. stringLen |= uint64(b&0x7F) << shift
  2788. if b < 0x80 {
  2789. break
  2790. }
  2791. }
  2792. intStringLen := int(stringLen)
  2793. if intStringLen < 0 {
  2794. return ErrInvalidLengthGenerated
  2795. }
  2796. postIndex := iNdEx + intStringLen
  2797. if postIndex < 0 {
  2798. return ErrInvalidLengthGenerated
  2799. }
  2800. if postIndex > l {
  2801. return io.ErrUnexpectedEOF
  2802. }
  2803. m.MetricName = string(dAtA[iNdEx:postIndex])
  2804. iNdEx = postIndex
  2805. case 2:
  2806. if wireType != 2 {
  2807. return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
  2808. }
  2809. var msglen int
  2810. for shift := uint(0); ; shift += 7 {
  2811. if shift >= 64 {
  2812. return ErrIntOverflowGenerated
  2813. }
  2814. if iNdEx >= l {
  2815. return io.ErrUnexpectedEOF
  2816. }
  2817. b := dAtA[iNdEx]
  2818. iNdEx++
  2819. msglen |= int(b&0x7F) << shift
  2820. if b < 0x80 {
  2821. break
  2822. }
  2823. }
  2824. if msglen < 0 {
  2825. return ErrInvalidLengthGenerated
  2826. }
  2827. postIndex := iNdEx + msglen
  2828. if postIndex < 0 {
  2829. return ErrInvalidLengthGenerated
  2830. }
  2831. if postIndex > l {
  2832. return io.ErrUnexpectedEOF
  2833. }
  2834. if m.MetricSelector == nil {
  2835. m.MetricSelector = &v1.LabelSelector{}
  2836. }
  2837. if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2838. return err
  2839. }
  2840. iNdEx = postIndex
  2841. case 3:
  2842. if wireType != 2 {
  2843. return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
  2844. }
  2845. var msglen int
  2846. for shift := uint(0); ; shift += 7 {
  2847. if shift >= 64 {
  2848. return ErrIntOverflowGenerated
  2849. }
  2850. if iNdEx >= l {
  2851. return io.ErrUnexpectedEOF
  2852. }
  2853. b := dAtA[iNdEx]
  2854. iNdEx++
  2855. msglen |= int(b&0x7F) << shift
  2856. if b < 0x80 {
  2857. break
  2858. }
  2859. }
  2860. if msglen < 0 {
  2861. return ErrInvalidLengthGenerated
  2862. }
  2863. postIndex := iNdEx + msglen
  2864. if postIndex < 0 {
  2865. return ErrInvalidLengthGenerated
  2866. }
  2867. if postIndex > l {
  2868. return io.ErrUnexpectedEOF
  2869. }
  2870. if m.TargetValue == nil {
  2871. m.TargetValue = &resource.Quantity{}
  2872. }
  2873. if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2874. return err
  2875. }
  2876. iNdEx = postIndex
  2877. case 4:
  2878. if wireType != 2 {
  2879. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  2880. }
  2881. var msglen int
  2882. for shift := uint(0); ; shift += 7 {
  2883. if shift >= 64 {
  2884. return ErrIntOverflowGenerated
  2885. }
  2886. if iNdEx >= l {
  2887. return io.ErrUnexpectedEOF
  2888. }
  2889. b := dAtA[iNdEx]
  2890. iNdEx++
  2891. msglen |= int(b&0x7F) << shift
  2892. if b < 0x80 {
  2893. break
  2894. }
  2895. }
  2896. if msglen < 0 {
  2897. return ErrInvalidLengthGenerated
  2898. }
  2899. postIndex := iNdEx + msglen
  2900. if postIndex < 0 {
  2901. return ErrInvalidLengthGenerated
  2902. }
  2903. if postIndex > l {
  2904. return io.ErrUnexpectedEOF
  2905. }
  2906. if m.TargetAverageValue == nil {
  2907. m.TargetAverageValue = &resource.Quantity{}
  2908. }
  2909. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2910. return err
  2911. }
  2912. iNdEx = postIndex
  2913. default:
  2914. iNdEx = preIndex
  2915. skippy, err := skipGenerated(dAtA[iNdEx:])
  2916. if err != nil {
  2917. return err
  2918. }
  2919. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2920. return ErrInvalidLengthGenerated
  2921. }
  2922. if (iNdEx + skippy) > l {
  2923. return io.ErrUnexpectedEOF
  2924. }
  2925. iNdEx += skippy
  2926. }
  2927. }
  2928. if iNdEx > l {
  2929. return io.ErrUnexpectedEOF
  2930. }
  2931. return nil
  2932. }
  2933. func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error {
  2934. l := len(dAtA)
  2935. iNdEx := 0
  2936. for iNdEx < l {
  2937. preIndex := iNdEx
  2938. var wire uint64
  2939. for shift := uint(0); ; shift += 7 {
  2940. if shift >= 64 {
  2941. return ErrIntOverflowGenerated
  2942. }
  2943. if iNdEx >= l {
  2944. return io.ErrUnexpectedEOF
  2945. }
  2946. b := dAtA[iNdEx]
  2947. iNdEx++
  2948. wire |= uint64(b&0x7F) << shift
  2949. if b < 0x80 {
  2950. break
  2951. }
  2952. }
  2953. fieldNum := int32(wire >> 3)
  2954. wireType := int(wire & 0x7)
  2955. if wireType == 4 {
  2956. return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group")
  2957. }
  2958. if fieldNum <= 0 {
  2959. return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  2960. }
  2961. switch fieldNum {
  2962. case 1:
  2963. if wireType != 2 {
  2964. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  2965. }
  2966. var stringLen uint64
  2967. for shift := uint(0); ; shift += 7 {
  2968. if shift >= 64 {
  2969. return ErrIntOverflowGenerated
  2970. }
  2971. if iNdEx >= l {
  2972. return io.ErrUnexpectedEOF
  2973. }
  2974. b := dAtA[iNdEx]
  2975. iNdEx++
  2976. stringLen |= uint64(b&0x7F) << shift
  2977. if b < 0x80 {
  2978. break
  2979. }
  2980. }
  2981. intStringLen := int(stringLen)
  2982. if intStringLen < 0 {
  2983. return ErrInvalidLengthGenerated
  2984. }
  2985. postIndex := iNdEx + intStringLen
  2986. if postIndex < 0 {
  2987. return ErrInvalidLengthGenerated
  2988. }
  2989. if postIndex > l {
  2990. return io.ErrUnexpectedEOF
  2991. }
  2992. m.MetricName = string(dAtA[iNdEx:postIndex])
  2993. iNdEx = postIndex
  2994. case 2:
  2995. if wireType != 2 {
  2996. return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
  2997. }
  2998. var msglen int
  2999. for shift := uint(0); ; shift += 7 {
  3000. if shift >= 64 {
  3001. return ErrIntOverflowGenerated
  3002. }
  3003. if iNdEx >= l {
  3004. return io.ErrUnexpectedEOF
  3005. }
  3006. b := dAtA[iNdEx]
  3007. iNdEx++
  3008. msglen |= int(b&0x7F) << shift
  3009. if b < 0x80 {
  3010. break
  3011. }
  3012. }
  3013. if msglen < 0 {
  3014. return ErrInvalidLengthGenerated
  3015. }
  3016. postIndex := iNdEx + msglen
  3017. if postIndex < 0 {
  3018. return ErrInvalidLengthGenerated
  3019. }
  3020. if postIndex > l {
  3021. return io.ErrUnexpectedEOF
  3022. }
  3023. if m.MetricSelector == nil {
  3024. m.MetricSelector = &v1.LabelSelector{}
  3025. }
  3026. if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3027. return err
  3028. }
  3029. iNdEx = postIndex
  3030. case 3:
  3031. if wireType != 2 {
  3032. return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
  3033. }
  3034. var msglen int
  3035. for shift := uint(0); ; shift += 7 {
  3036. if shift >= 64 {
  3037. return ErrIntOverflowGenerated
  3038. }
  3039. if iNdEx >= l {
  3040. return io.ErrUnexpectedEOF
  3041. }
  3042. b := dAtA[iNdEx]
  3043. iNdEx++
  3044. msglen |= int(b&0x7F) << shift
  3045. if b < 0x80 {
  3046. break
  3047. }
  3048. }
  3049. if msglen < 0 {
  3050. return ErrInvalidLengthGenerated
  3051. }
  3052. postIndex := iNdEx + msglen
  3053. if postIndex < 0 {
  3054. return ErrInvalidLengthGenerated
  3055. }
  3056. if postIndex > l {
  3057. return io.ErrUnexpectedEOF
  3058. }
  3059. if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3060. return err
  3061. }
  3062. iNdEx = postIndex
  3063. case 4:
  3064. if wireType != 2 {
  3065. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  3066. }
  3067. var msglen int
  3068. for shift := uint(0); ; shift += 7 {
  3069. if shift >= 64 {
  3070. return ErrIntOverflowGenerated
  3071. }
  3072. if iNdEx >= l {
  3073. return io.ErrUnexpectedEOF
  3074. }
  3075. b := dAtA[iNdEx]
  3076. iNdEx++
  3077. msglen |= int(b&0x7F) << shift
  3078. if b < 0x80 {
  3079. break
  3080. }
  3081. }
  3082. if msglen < 0 {
  3083. return ErrInvalidLengthGenerated
  3084. }
  3085. postIndex := iNdEx + msglen
  3086. if postIndex < 0 {
  3087. return ErrInvalidLengthGenerated
  3088. }
  3089. if postIndex > l {
  3090. return io.ErrUnexpectedEOF
  3091. }
  3092. if m.CurrentAverageValue == nil {
  3093. m.CurrentAverageValue = &resource.Quantity{}
  3094. }
  3095. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3096. return err
  3097. }
  3098. iNdEx = postIndex
  3099. default:
  3100. iNdEx = preIndex
  3101. skippy, err := skipGenerated(dAtA[iNdEx:])
  3102. if err != nil {
  3103. return err
  3104. }
  3105. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3106. return ErrInvalidLengthGenerated
  3107. }
  3108. if (iNdEx + skippy) > l {
  3109. return io.ErrUnexpectedEOF
  3110. }
  3111. iNdEx += skippy
  3112. }
  3113. }
  3114. if iNdEx > l {
  3115. return io.ErrUnexpectedEOF
  3116. }
  3117. return nil
  3118. }
  3119. func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
  3120. l := len(dAtA)
  3121. iNdEx := 0
  3122. for iNdEx < l {
  3123. preIndex := iNdEx
  3124. var wire uint64
  3125. for shift := uint(0); ; shift += 7 {
  3126. if shift >= 64 {
  3127. return ErrIntOverflowGenerated
  3128. }
  3129. if iNdEx >= l {
  3130. return io.ErrUnexpectedEOF
  3131. }
  3132. b := dAtA[iNdEx]
  3133. iNdEx++
  3134. wire |= uint64(b&0x7F) << shift
  3135. if b < 0x80 {
  3136. break
  3137. }
  3138. }
  3139. fieldNum := int32(wire >> 3)
  3140. wireType := int(wire & 0x7)
  3141. if wireType == 4 {
  3142. return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
  3143. }
  3144. if fieldNum <= 0 {
  3145. return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
  3146. }
  3147. switch fieldNum {
  3148. case 1:
  3149. if wireType != 2 {
  3150. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  3151. }
  3152. var msglen int
  3153. for shift := uint(0); ; shift += 7 {
  3154. if shift >= 64 {
  3155. return ErrIntOverflowGenerated
  3156. }
  3157. if iNdEx >= l {
  3158. return io.ErrUnexpectedEOF
  3159. }
  3160. b := dAtA[iNdEx]
  3161. iNdEx++
  3162. msglen |= int(b&0x7F) << shift
  3163. if b < 0x80 {
  3164. break
  3165. }
  3166. }
  3167. if msglen < 0 {
  3168. return ErrInvalidLengthGenerated
  3169. }
  3170. postIndex := iNdEx + msglen
  3171. if postIndex < 0 {
  3172. return ErrInvalidLengthGenerated
  3173. }
  3174. if postIndex > l {
  3175. return io.ErrUnexpectedEOF
  3176. }
  3177. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3178. return err
  3179. }
  3180. iNdEx = postIndex
  3181. case 2:
  3182. if wireType != 2 {
  3183. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  3184. }
  3185. var msglen int
  3186. for shift := uint(0); ; shift += 7 {
  3187. if shift >= 64 {
  3188. return ErrIntOverflowGenerated
  3189. }
  3190. if iNdEx >= l {
  3191. return io.ErrUnexpectedEOF
  3192. }
  3193. b := dAtA[iNdEx]
  3194. iNdEx++
  3195. msglen |= int(b&0x7F) << shift
  3196. if b < 0x80 {
  3197. break
  3198. }
  3199. }
  3200. if msglen < 0 {
  3201. return ErrInvalidLengthGenerated
  3202. }
  3203. postIndex := iNdEx + msglen
  3204. if postIndex < 0 {
  3205. return ErrInvalidLengthGenerated
  3206. }
  3207. if postIndex > l {
  3208. return io.ErrUnexpectedEOF
  3209. }
  3210. if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3211. return err
  3212. }
  3213. iNdEx = postIndex
  3214. case 3:
  3215. if wireType != 2 {
  3216. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  3217. }
  3218. var msglen int
  3219. for shift := uint(0); ; shift += 7 {
  3220. if shift >= 64 {
  3221. return ErrIntOverflowGenerated
  3222. }
  3223. if iNdEx >= l {
  3224. return io.ErrUnexpectedEOF
  3225. }
  3226. b := dAtA[iNdEx]
  3227. iNdEx++
  3228. msglen |= int(b&0x7F) << shift
  3229. if b < 0x80 {
  3230. break
  3231. }
  3232. }
  3233. if msglen < 0 {
  3234. return ErrInvalidLengthGenerated
  3235. }
  3236. postIndex := iNdEx + msglen
  3237. if postIndex < 0 {
  3238. return ErrInvalidLengthGenerated
  3239. }
  3240. if postIndex > l {
  3241. return io.ErrUnexpectedEOF
  3242. }
  3243. if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3244. return err
  3245. }
  3246. iNdEx = postIndex
  3247. default:
  3248. iNdEx = preIndex
  3249. skippy, err := skipGenerated(dAtA[iNdEx:])
  3250. if err != nil {
  3251. return err
  3252. }
  3253. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3254. return ErrInvalidLengthGenerated
  3255. }
  3256. if (iNdEx + skippy) > l {
  3257. return io.ErrUnexpectedEOF
  3258. }
  3259. iNdEx += skippy
  3260. }
  3261. }
  3262. if iNdEx > l {
  3263. return io.ErrUnexpectedEOF
  3264. }
  3265. return nil
  3266. }
  3267. func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
  3268. l := len(dAtA)
  3269. iNdEx := 0
  3270. for iNdEx < l {
  3271. preIndex := iNdEx
  3272. var wire uint64
  3273. for shift := uint(0); ; shift += 7 {
  3274. if shift >= 64 {
  3275. return ErrIntOverflowGenerated
  3276. }
  3277. if iNdEx >= l {
  3278. return io.ErrUnexpectedEOF
  3279. }
  3280. b := dAtA[iNdEx]
  3281. iNdEx++
  3282. wire |= uint64(b&0x7F) << shift
  3283. if b < 0x80 {
  3284. break
  3285. }
  3286. }
  3287. fieldNum := int32(wire >> 3)
  3288. wireType := int(wire & 0x7)
  3289. if wireType == 4 {
  3290. return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
  3291. }
  3292. if fieldNum <= 0 {
  3293. return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
  3294. }
  3295. switch fieldNum {
  3296. case 1:
  3297. if wireType != 2 {
  3298. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3299. }
  3300. var stringLen uint64
  3301. for shift := uint(0); ; shift += 7 {
  3302. if shift >= 64 {
  3303. return ErrIntOverflowGenerated
  3304. }
  3305. if iNdEx >= l {
  3306. return io.ErrUnexpectedEOF
  3307. }
  3308. b := dAtA[iNdEx]
  3309. iNdEx++
  3310. stringLen |= uint64(b&0x7F) << shift
  3311. if b < 0x80 {
  3312. break
  3313. }
  3314. }
  3315. intStringLen := int(stringLen)
  3316. if intStringLen < 0 {
  3317. return ErrInvalidLengthGenerated
  3318. }
  3319. postIndex := iNdEx + intStringLen
  3320. if postIndex < 0 {
  3321. return ErrInvalidLengthGenerated
  3322. }
  3323. if postIndex > l {
  3324. return io.ErrUnexpectedEOF
  3325. }
  3326. m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
  3327. iNdEx = postIndex
  3328. case 2:
  3329. if wireType != 2 {
  3330. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  3331. }
  3332. var stringLen uint64
  3333. for shift := uint(0); ; shift += 7 {
  3334. if shift >= 64 {
  3335. return ErrIntOverflowGenerated
  3336. }
  3337. if iNdEx >= l {
  3338. return io.ErrUnexpectedEOF
  3339. }
  3340. b := dAtA[iNdEx]
  3341. iNdEx++
  3342. stringLen |= uint64(b&0x7F) << shift
  3343. if b < 0x80 {
  3344. break
  3345. }
  3346. }
  3347. intStringLen := int(stringLen)
  3348. if intStringLen < 0 {
  3349. return ErrInvalidLengthGenerated
  3350. }
  3351. postIndex := iNdEx + intStringLen
  3352. if postIndex < 0 {
  3353. return ErrInvalidLengthGenerated
  3354. }
  3355. if postIndex > l {
  3356. return io.ErrUnexpectedEOF
  3357. }
  3358. m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
  3359. iNdEx = postIndex
  3360. case 3:
  3361. if wireType != 2 {
  3362. return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
  3363. }
  3364. var msglen int
  3365. for shift := uint(0); ; shift += 7 {
  3366. if shift >= 64 {
  3367. return ErrIntOverflowGenerated
  3368. }
  3369. if iNdEx >= l {
  3370. return io.ErrUnexpectedEOF
  3371. }
  3372. b := dAtA[iNdEx]
  3373. iNdEx++
  3374. msglen |= int(b&0x7F) << shift
  3375. if b < 0x80 {
  3376. break
  3377. }
  3378. }
  3379. if msglen < 0 {
  3380. return ErrInvalidLengthGenerated
  3381. }
  3382. postIndex := iNdEx + msglen
  3383. if postIndex < 0 {
  3384. return ErrInvalidLengthGenerated
  3385. }
  3386. if postIndex > l {
  3387. return io.ErrUnexpectedEOF
  3388. }
  3389. if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3390. return err
  3391. }
  3392. iNdEx = postIndex
  3393. case 4:
  3394. if wireType != 2 {
  3395. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  3396. }
  3397. var stringLen uint64
  3398. for shift := uint(0); ; shift += 7 {
  3399. if shift >= 64 {
  3400. return ErrIntOverflowGenerated
  3401. }
  3402. if iNdEx >= l {
  3403. return io.ErrUnexpectedEOF
  3404. }
  3405. b := dAtA[iNdEx]
  3406. iNdEx++
  3407. stringLen |= uint64(b&0x7F) << shift
  3408. if b < 0x80 {
  3409. break
  3410. }
  3411. }
  3412. intStringLen := int(stringLen)
  3413. if intStringLen < 0 {
  3414. return ErrInvalidLengthGenerated
  3415. }
  3416. postIndex := iNdEx + intStringLen
  3417. if postIndex < 0 {
  3418. return ErrInvalidLengthGenerated
  3419. }
  3420. if postIndex > l {
  3421. return io.ErrUnexpectedEOF
  3422. }
  3423. m.Reason = string(dAtA[iNdEx:postIndex])
  3424. iNdEx = postIndex
  3425. case 5:
  3426. if wireType != 2 {
  3427. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  3428. }
  3429. var stringLen uint64
  3430. for shift := uint(0); ; shift += 7 {
  3431. if shift >= 64 {
  3432. return ErrIntOverflowGenerated
  3433. }
  3434. if iNdEx >= l {
  3435. return io.ErrUnexpectedEOF
  3436. }
  3437. b := dAtA[iNdEx]
  3438. iNdEx++
  3439. stringLen |= uint64(b&0x7F) << shift
  3440. if b < 0x80 {
  3441. break
  3442. }
  3443. }
  3444. intStringLen := int(stringLen)
  3445. if intStringLen < 0 {
  3446. return ErrInvalidLengthGenerated
  3447. }
  3448. postIndex := iNdEx + intStringLen
  3449. if postIndex < 0 {
  3450. return ErrInvalidLengthGenerated
  3451. }
  3452. if postIndex > l {
  3453. return io.ErrUnexpectedEOF
  3454. }
  3455. m.Message = string(dAtA[iNdEx:postIndex])
  3456. iNdEx = postIndex
  3457. default:
  3458. iNdEx = preIndex
  3459. skippy, err := skipGenerated(dAtA[iNdEx:])
  3460. if err != nil {
  3461. return err
  3462. }
  3463. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3464. return ErrInvalidLengthGenerated
  3465. }
  3466. if (iNdEx + skippy) > l {
  3467. return io.ErrUnexpectedEOF
  3468. }
  3469. iNdEx += skippy
  3470. }
  3471. }
  3472. if iNdEx > l {
  3473. return io.ErrUnexpectedEOF
  3474. }
  3475. return nil
  3476. }
  3477. func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
  3478. l := len(dAtA)
  3479. iNdEx := 0
  3480. for iNdEx < l {
  3481. preIndex := iNdEx
  3482. var wire uint64
  3483. for shift := uint(0); ; shift += 7 {
  3484. if shift >= 64 {
  3485. return ErrIntOverflowGenerated
  3486. }
  3487. if iNdEx >= l {
  3488. return io.ErrUnexpectedEOF
  3489. }
  3490. b := dAtA[iNdEx]
  3491. iNdEx++
  3492. wire |= uint64(b&0x7F) << shift
  3493. if b < 0x80 {
  3494. break
  3495. }
  3496. }
  3497. fieldNum := int32(wire >> 3)
  3498. wireType := int(wire & 0x7)
  3499. if wireType == 4 {
  3500. return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
  3501. }
  3502. if fieldNum <= 0 {
  3503. return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
  3504. }
  3505. switch fieldNum {
  3506. case 1:
  3507. if wireType != 2 {
  3508. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  3509. }
  3510. var msglen int
  3511. for shift := uint(0); ; shift += 7 {
  3512. if shift >= 64 {
  3513. return ErrIntOverflowGenerated
  3514. }
  3515. if iNdEx >= l {
  3516. return io.ErrUnexpectedEOF
  3517. }
  3518. b := dAtA[iNdEx]
  3519. iNdEx++
  3520. msglen |= int(b&0x7F) << shift
  3521. if b < 0x80 {
  3522. break
  3523. }
  3524. }
  3525. if msglen < 0 {
  3526. return ErrInvalidLengthGenerated
  3527. }
  3528. postIndex := iNdEx + msglen
  3529. if postIndex < 0 {
  3530. return ErrInvalidLengthGenerated
  3531. }
  3532. if postIndex > l {
  3533. return io.ErrUnexpectedEOF
  3534. }
  3535. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3536. return err
  3537. }
  3538. iNdEx = postIndex
  3539. case 2:
  3540. if wireType != 2 {
  3541. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  3542. }
  3543. var msglen int
  3544. for shift := uint(0); ; shift += 7 {
  3545. if shift >= 64 {
  3546. return ErrIntOverflowGenerated
  3547. }
  3548. if iNdEx >= l {
  3549. return io.ErrUnexpectedEOF
  3550. }
  3551. b := dAtA[iNdEx]
  3552. iNdEx++
  3553. msglen |= int(b&0x7F) << shift
  3554. if b < 0x80 {
  3555. break
  3556. }
  3557. }
  3558. if msglen < 0 {
  3559. return ErrInvalidLengthGenerated
  3560. }
  3561. postIndex := iNdEx + msglen
  3562. if postIndex < 0 {
  3563. return ErrInvalidLengthGenerated
  3564. }
  3565. if postIndex > l {
  3566. return io.ErrUnexpectedEOF
  3567. }
  3568. m.Items = append(m.Items, HorizontalPodAutoscaler{})
  3569. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3570. return err
  3571. }
  3572. iNdEx = postIndex
  3573. default:
  3574. iNdEx = preIndex
  3575. skippy, err := skipGenerated(dAtA[iNdEx:])
  3576. if err != nil {
  3577. return err
  3578. }
  3579. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3580. return ErrInvalidLengthGenerated
  3581. }
  3582. if (iNdEx + skippy) > l {
  3583. return io.ErrUnexpectedEOF
  3584. }
  3585. iNdEx += skippy
  3586. }
  3587. }
  3588. if iNdEx > l {
  3589. return io.ErrUnexpectedEOF
  3590. }
  3591. return nil
  3592. }
  3593. func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
  3594. l := len(dAtA)
  3595. iNdEx := 0
  3596. for iNdEx < l {
  3597. preIndex := iNdEx
  3598. var wire uint64
  3599. for shift := uint(0); ; shift += 7 {
  3600. if shift >= 64 {
  3601. return ErrIntOverflowGenerated
  3602. }
  3603. if iNdEx >= l {
  3604. return io.ErrUnexpectedEOF
  3605. }
  3606. b := dAtA[iNdEx]
  3607. iNdEx++
  3608. wire |= uint64(b&0x7F) << shift
  3609. if b < 0x80 {
  3610. break
  3611. }
  3612. }
  3613. fieldNum := int32(wire >> 3)
  3614. wireType := int(wire & 0x7)
  3615. if wireType == 4 {
  3616. return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
  3617. }
  3618. if fieldNum <= 0 {
  3619. return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3620. }
  3621. switch fieldNum {
  3622. case 1:
  3623. if wireType != 2 {
  3624. return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
  3625. }
  3626. var msglen int
  3627. for shift := uint(0); ; shift += 7 {
  3628. if shift >= 64 {
  3629. return ErrIntOverflowGenerated
  3630. }
  3631. if iNdEx >= l {
  3632. return io.ErrUnexpectedEOF
  3633. }
  3634. b := dAtA[iNdEx]
  3635. iNdEx++
  3636. msglen |= int(b&0x7F) << shift
  3637. if b < 0x80 {
  3638. break
  3639. }
  3640. }
  3641. if msglen < 0 {
  3642. return ErrInvalidLengthGenerated
  3643. }
  3644. postIndex := iNdEx + msglen
  3645. if postIndex < 0 {
  3646. return ErrInvalidLengthGenerated
  3647. }
  3648. if postIndex > l {
  3649. return io.ErrUnexpectedEOF
  3650. }
  3651. if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3652. return err
  3653. }
  3654. iNdEx = postIndex
  3655. case 2:
  3656. if wireType != 0 {
  3657. return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
  3658. }
  3659. var v int32
  3660. for shift := uint(0); ; shift += 7 {
  3661. if shift >= 64 {
  3662. return ErrIntOverflowGenerated
  3663. }
  3664. if iNdEx >= l {
  3665. return io.ErrUnexpectedEOF
  3666. }
  3667. b := dAtA[iNdEx]
  3668. iNdEx++
  3669. v |= int32(b&0x7F) << shift
  3670. if b < 0x80 {
  3671. break
  3672. }
  3673. }
  3674. m.MinReplicas = &v
  3675. case 3:
  3676. if wireType != 0 {
  3677. return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
  3678. }
  3679. m.MaxReplicas = 0
  3680. for shift := uint(0); ; shift += 7 {
  3681. if shift >= 64 {
  3682. return ErrIntOverflowGenerated
  3683. }
  3684. if iNdEx >= l {
  3685. return io.ErrUnexpectedEOF
  3686. }
  3687. b := dAtA[iNdEx]
  3688. iNdEx++
  3689. m.MaxReplicas |= int32(b&0x7F) << shift
  3690. if b < 0x80 {
  3691. break
  3692. }
  3693. }
  3694. case 4:
  3695. if wireType != 2 {
  3696. return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
  3697. }
  3698. var msglen int
  3699. for shift := uint(0); ; shift += 7 {
  3700. if shift >= 64 {
  3701. return ErrIntOverflowGenerated
  3702. }
  3703. if iNdEx >= l {
  3704. return io.ErrUnexpectedEOF
  3705. }
  3706. b := dAtA[iNdEx]
  3707. iNdEx++
  3708. msglen |= int(b&0x7F) << shift
  3709. if b < 0x80 {
  3710. break
  3711. }
  3712. }
  3713. if msglen < 0 {
  3714. return ErrInvalidLengthGenerated
  3715. }
  3716. postIndex := iNdEx + msglen
  3717. if postIndex < 0 {
  3718. return ErrInvalidLengthGenerated
  3719. }
  3720. if postIndex > l {
  3721. return io.ErrUnexpectedEOF
  3722. }
  3723. m.Metrics = append(m.Metrics, MetricSpec{})
  3724. if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3725. return err
  3726. }
  3727. iNdEx = postIndex
  3728. default:
  3729. iNdEx = preIndex
  3730. skippy, err := skipGenerated(dAtA[iNdEx:])
  3731. if err != nil {
  3732. return err
  3733. }
  3734. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3735. return ErrInvalidLengthGenerated
  3736. }
  3737. if (iNdEx + skippy) > l {
  3738. return io.ErrUnexpectedEOF
  3739. }
  3740. iNdEx += skippy
  3741. }
  3742. }
  3743. if iNdEx > l {
  3744. return io.ErrUnexpectedEOF
  3745. }
  3746. return nil
  3747. }
  3748. func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
  3749. l := len(dAtA)
  3750. iNdEx := 0
  3751. for iNdEx < l {
  3752. preIndex := iNdEx
  3753. var wire uint64
  3754. for shift := uint(0); ; shift += 7 {
  3755. if shift >= 64 {
  3756. return ErrIntOverflowGenerated
  3757. }
  3758. if iNdEx >= l {
  3759. return io.ErrUnexpectedEOF
  3760. }
  3761. b := dAtA[iNdEx]
  3762. iNdEx++
  3763. wire |= uint64(b&0x7F) << shift
  3764. if b < 0x80 {
  3765. break
  3766. }
  3767. }
  3768. fieldNum := int32(wire >> 3)
  3769. wireType := int(wire & 0x7)
  3770. if wireType == 4 {
  3771. return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
  3772. }
  3773. if fieldNum <= 0 {
  3774. return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  3775. }
  3776. switch fieldNum {
  3777. case 1:
  3778. if wireType != 0 {
  3779. return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
  3780. }
  3781. var v int64
  3782. for shift := uint(0); ; shift += 7 {
  3783. if shift >= 64 {
  3784. return ErrIntOverflowGenerated
  3785. }
  3786. if iNdEx >= l {
  3787. return io.ErrUnexpectedEOF
  3788. }
  3789. b := dAtA[iNdEx]
  3790. iNdEx++
  3791. v |= int64(b&0x7F) << shift
  3792. if b < 0x80 {
  3793. break
  3794. }
  3795. }
  3796. m.ObservedGeneration = &v
  3797. case 2:
  3798. if wireType != 2 {
  3799. return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
  3800. }
  3801. var msglen int
  3802. for shift := uint(0); ; shift += 7 {
  3803. if shift >= 64 {
  3804. return ErrIntOverflowGenerated
  3805. }
  3806. if iNdEx >= l {
  3807. return io.ErrUnexpectedEOF
  3808. }
  3809. b := dAtA[iNdEx]
  3810. iNdEx++
  3811. msglen |= int(b&0x7F) << shift
  3812. if b < 0x80 {
  3813. break
  3814. }
  3815. }
  3816. if msglen < 0 {
  3817. return ErrInvalidLengthGenerated
  3818. }
  3819. postIndex := iNdEx + msglen
  3820. if postIndex < 0 {
  3821. return ErrInvalidLengthGenerated
  3822. }
  3823. if postIndex > l {
  3824. return io.ErrUnexpectedEOF
  3825. }
  3826. if m.LastScaleTime == nil {
  3827. m.LastScaleTime = &v1.Time{}
  3828. }
  3829. if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3830. return err
  3831. }
  3832. iNdEx = postIndex
  3833. case 3:
  3834. if wireType != 0 {
  3835. return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
  3836. }
  3837. m.CurrentReplicas = 0
  3838. for shift := uint(0); ; shift += 7 {
  3839. if shift >= 64 {
  3840. return ErrIntOverflowGenerated
  3841. }
  3842. if iNdEx >= l {
  3843. return io.ErrUnexpectedEOF
  3844. }
  3845. b := dAtA[iNdEx]
  3846. iNdEx++
  3847. m.CurrentReplicas |= int32(b&0x7F) << shift
  3848. if b < 0x80 {
  3849. break
  3850. }
  3851. }
  3852. case 4:
  3853. if wireType != 0 {
  3854. return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
  3855. }
  3856. m.DesiredReplicas = 0
  3857. for shift := uint(0); ; shift += 7 {
  3858. if shift >= 64 {
  3859. return ErrIntOverflowGenerated
  3860. }
  3861. if iNdEx >= l {
  3862. return io.ErrUnexpectedEOF
  3863. }
  3864. b := dAtA[iNdEx]
  3865. iNdEx++
  3866. m.DesiredReplicas |= int32(b&0x7F) << shift
  3867. if b < 0x80 {
  3868. break
  3869. }
  3870. }
  3871. case 5:
  3872. if wireType != 2 {
  3873. return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType)
  3874. }
  3875. var msglen int
  3876. for shift := uint(0); ; shift += 7 {
  3877. if shift >= 64 {
  3878. return ErrIntOverflowGenerated
  3879. }
  3880. if iNdEx >= l {
  3881. return io.ErrUnexpectedEOF
  3882. }
  3883. b := dAtA[iNdEx]
  3884. iNdEx++
  3885. msglen |= int(b&0x7F) << shift
  3886. if b < 0x80 {
  3887. break
  3888. }
  3889. }
  3890. if msglen < 0 {
  3891. return ErrInvalidLengthGenerated
  3892. }
  3893. postIndex := iNdEx + msglen
  3894. if postIndex < 0 {
  3895. return ErrInvalidLengthGenerated
  3896. }
  3897. if postIndex > l {
  3898. return io.ErrUnexpectedEOF
  3899. }
  3900. m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{})
  3901. if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3902. return err
  3903. }
  3904. iNdEx = postIndex
  3905. case 6:
  3906. if wireType != 2 {
  3907. return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
  3908. }
  3909. var msglen int
  3910. for shift := uint(0); ; shift += 7 {
  3911. if shift >= 64 {
  3912. return ErrIntOverflowGenerated
  3913. }
  3914. if iNdEx >= l {
  3915. return io.ErrUnexpectedEOF
  3916. }
  3917. b := dAtA[iNdEx]
  3918. iNdEx++
  3919. msglen |= int(b&0x7F) << shift
  3920. if b < 0x80 {
  3921. break
  3922. }
  3923. }
  3924. if msglen < 0 {
  3925. return ErrInvalidLengthGenerated
  3926. }
  3927. postIndex := iNdEx + msglen
  3928. if postIndex < 0 {
  3929. return ErrInvalidLengthGenerated
  3930. }
  3931. if postIndex > l {
  3932. return io.ErrUnexpectedEOF
  3933. }
  3934. m.Conditions = append(m.Conditions, HorizontalPodAutoscalerCondition{})
  3935. if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3936. return err
  3937. }
  3938. iNdEx = postIndex
  3939. default:
  3940. iNdEx = preIndex
  3941. skippy, err := skipGenerated(dAtA[iNdEx:])
  3942. if err != nil {
  3943. return err
  3944. }
  3945. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3946. return ErrInvalidLengthGenerated
  3947. }
  3948. if (iNdEx + skippy) > l {
  3949. return io.ErrUnexpectedEOF
  3950. }
  3951. iNdEx += skippy
  3952. }
  3953. }
  3954. if iNdEx > l {
  3955. return io.ErrUnexpectedEOF
  3956. }
  3957. return nil
  3958. }
  3959. func (m *MetricSpec) Unmarshal(dAtA []byte) error {
  3960. l := len(dAtA)
  3961. iNdEx := 0
  3962. for iNdEx < l {
  3963. preIndex := iNdEx
  3964. var wire uint64
  3965. for shift := uint(0); ; shift += 7 {
  3966. if shift >= 64 {
  3967. return ErrIntOverflowGenerated
  3968. }
  3969. if iNdEx >= l {
  3970. return io.ErrUnexpectedEOF
  3971. }
  3972. b := dAtA[iNdEx]
  3973. iNdEx++
  3974. wire |= uint64(b&0x7F) << shift
  3975. if b < 0x80 {
  3976. break
  3977. }
  3978. }
  3979. fieldNum := int32(wire >> 3)
  3980. wireType := int(wire & 0x7)
  3981. if wireType == 4 {
  3982. return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
  3983. }
  3984. if fieldNum <= 0 {
  3985. return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3986. }
  3987. switch fieldNum {
  3988. case 1:
  3989. if wireType != 2 {
  3990. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3991. }
  3992. var stringLen uint64
  3993. for shift := uint(0); ; shift += 7 {
  3994. if shift >= 64 {
  3995. return ErrIntOverflowGenerated
  3996. }
  3997. if iNdEx >= l {
  3998. return io.ErrUnexpectedEOF
  3999. }
  4000. b := dAtA[iNdEx]
  4001. iNdEx++
  4002. stringLen |= uint64(b&0x7F) << shift
  4003. if b < 0x80 {
  4004. break
  4005. }
  4006. }
  4007. intStringLen := int(stringLen)
  4008. if intStringLen < 0 {
  4009. return ErrInvalidLengthGenerated
  4010. }
  4011. postIndex := iNdEx + intStringLen
  4012. if postIndex < 0 {
  4013. return ErrInvalidLengthGenerated
  4014. }
  4015. if postIndex > l {
  4016. return io.ErrUnexpectedEOF
  4017. }
  4018. m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
  4019. iNdEx = postIndex
  4020. case 2:
  4021. if wireType != 2 {
  4022. return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
  4023. }
  4024. var msglen int
  4025. for shift := uint(0); ; shift += 7 {
  4026. if shift >= 64 {
  4027. return ErrIntOverflowGenerated
  4028. }
  4029. if iNdEx >= l {
  4030. return io.ErrUnexpectedEOF
  4031. }
  4032. b := dAtA[iNdEx]
  4033. iNdEx++
  4034. msglen |= int(b&0x7F) << shift
  4035. if b < 0x80 {
  4036. break
  4037. }
  4038. }
  4039. if msglen < 0 {
  4040. return ErrInvalidLengthGenerated
  4041. }
  4042. postIndex := iNdEx + msglen
  4043. if postIndex < 0 {
  4044. return ErrInvalidLengthGenerated
  4045. }
  4046. if postIndex > l {
  4047. return io.ErrUnexpectedEOF
  4048. }
  4049. if m.Object == nil {
  4050. m.Object = &ObjectMetricSource{}
  4051. }
  4052. if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4053. return err
  4054. }
  4055. iNdEx = postIndex
  4056. case 3:
  4057. if wireType != 2 {
  4058. return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
  4059. }
  4060. var msglen int
  4061. for shift := uint(0); ; shift += 7 {
  4062. if shift >= 64 {
  4063. return ErrIntOverflowGenerated
  4064. }
  4065. if iNdEx >= l {
  4066. return io.ErrUnexpectedEOF
  4067. }
  4068. b := dAtA[iNdEx]
  4069. iNdEx++
  4070. msglen |= int(b&0x7F) << shift
  4071. if b < 0x80 {
  4072. break
  4073. }
  4074. }
  4075. if msglen < 0 {
  4076. return ErrInvalidLengthGenerated
  4077. }
  4078. postIndex := iNdEx + msglen
  4079. if postIndex < 0 {
  4080. return ErrInvalidLengthGenerated
  4081. }
  4082. if postIndex > l {
  4083. return io.ErrUnexpectedEOF
  4084. }
  4085. if m.Pods == nil {
  4086. m.Pods = &PodsMetricSource{}
  4087. }
  4088. if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4089. return err
  4090. }
  4091. iNdEx = postIndex
  4092. case 4:
  4093. if wireType != 2 {
  4094. return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
  4095. }
  4096. var msglen int
  4097. for shift := uint(0); ; shift += 7 {
  4098. if shift >= 64 {
  4099. return ErrIntOverflowGenerated
  4100. }
  4101. if iNdEx >= l {
  4102. return io.ErrUnexpectedEOF
  4103. }
  4104. b := dAtA[iNdEx]
  4105. iNdEx++
  4106. msglen |= int(b&0x7F) << shift
  4107. if b < 0x80 {
  4108. break
  4109. }
  4110. }
  4111. if msglen < 0 {
  4112. return ErrInvalidLengthGenerated
  4113. }
  4114. postIndex := iNdEx + msglen
  4115. if postIndex < 0 {
  4116. return ErrInvalidLengthGenerated
  4117. }
  4118. if postIndex > l {
  4119. return io.ErrUnexpectedEOF
  4120. }
  4121. if m.Resource == nil {
  4122. m.Resource = &ResourceMetricSource{}
  4123. }
  4124. if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4125. return err
  4126. }
  4127. iNdEx = postIndex
  4128. case 5:
  4129. if wireType != 2 {
  4130. return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
  4131. }
  4132. var msglen int
  4133. for shift := uint(0); ; shift += 7 {
  4134. if shift >= 64 {
  4135. return ErrIntOverflowGenerated
  4136. }
  4137. if iNdEx >= l {
  4138. return io.ErrUnexpectedEOF
  4139. }
  4140. b := dAtA[iNdEx]
  4141. iNdEx++
  4142. msglen |= int(b&0x7F) << shift
  4143. if b < 0x80 {
  4144. break
  4145. }
  4146. }
  4147. if msglen < 0 {
  4148. return ErrInvalidLengthGenerated
  4149. }
  4150. postIndex := iNdEx + msglen
  4151. if postIndex < 0 {
  4152. return ErrInvalidLengthGenerated
  4153. }
  4154. if postIndex > l {
  4155. return io.ErrUnexpectedEOF
  4156. }
  4157. if m.External == nil {
  4158. m.External = &ExternalMetricSource{}
  4159. }
  4160. if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4161. return err
  4162. }
  4163. iNdEx = postIndex
  4164. case 7:
  4165. if wireType != 2 {
  4166. return fmt.Errorf("proto: wrong wireType = %d for field ContainerResource", wireType)
  4167. }
  4168. var msglen int
  4169. for shift := uint(0); ; shift += 7 {
  4170. if shift >= 64 {
  4171. return ErrIntOverflowGenerated
  4172. }
  4173. if iNdEx >= l {
  4174. return io.ErrUnexpectedEOF
  4175. }
  4176. b := dAtA[iNdEx]
  4177. iNdEx++
  4178. msglen |= int(b&0x7F) << shift
  4179. if b < 0x80 {
  4180. break
  4181. }
  4182. }
  4183. if msglen < 0 {
  4184. return ErrInvalidLengthGenerated
  4185. }
  4186. postIndex := iNdEx + msglen
  4187. if postIndex < 0 {
  4188. return ErrInvalidLengthGenerated
  4189. }
  4190. if postIndex > l {
  4191. return io.ErrUnexpectedEOF
  4192. }
  4193. if m.ContainerResource == nil {
  4194. m.ContainerResource = &ContainerResourceMetricSource{}
  4195. }
  4196. if err := m.ContainerResource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4197. return err
  4198. }
  4199. iNdEx = postIndex
  4200. default:
  4201. iNdEx = preIndex
  4202. skippy, err := skipGenerated(dAtA[iNdEx:])
  4203. if err != nil {
  4204. return err
  4205. }
  4206. if (skippy < 0) || (iNdEx+skippy) < 0 {
  4207. return ErrInvalidLengthGenerated
  4208. }
  4209. if (iNdEx + skippy) > l {
  4210. return io.ErrUnexpectedEOF
  4211. }
  4212. iNdEx += skippy
  4213. }
  4214. }
  4215. if iNdEx > l {
  4216. return io.ErrUnexpectedEOF
  4217. }
  4218. return nil
  4219. }
  4220. func (m *MetricStatus) Unmarshal(dAtA []byte) error {
  4221. l := len(dAtA)
  4222. iNdEx := 0
  4223. for iNdEx < l {
  4224. preIndex := iNdEx
  4225. var wire uint64
  4226. for shift := uint(0); ; shift += 7 {
  4227. if shift >= 64 {
  4228. return ErrIntOverflowGenerated
  4229. }
  4230. if iNdEx >= l {
  4231. return io.ErrUnexpectedEOF
  4232. }
  4233. b := dAtA[iNdEx]
  4234. iNdEx++
  4235. wire |= uint64(b&0x7F) << shift
  4236. if b < 0x80 {
  4237. break
  4238. }
  4239. }
  4240. fieldNum := int32(wire >> 3)
  4241. wireType := int(wire & 0x7)
  4242. if wireType == 4 {
  4243. return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
  4244. }
  4245. if fieldNum <= 0 {
  4246. return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  4247. }
  4248. switch fieldNum {
  4249. case 1:
  4250. if wireType != 2 {
  4251. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  4252. }
  4253. var stringLen uint64
  4254. for shift := uint(0); ; shift += 7 {
  4255. if shift >= 64 {
  4256. return ErrIntOverflowGenerated
  4257. }
  4258. if iNdEx >= l {
  4259. return io.ErrUnexpectedEOF
  4260. }
  4261. b := dAtA[iNdEx]
  4262. iNdEx++
  4263. stringLen |= uint64(b&0x7F) << shift
  4264. if b < 0x80 {
  4265. break
  4266. }
  4267. }
  4268. intStringLen := int(stringLen)
  4269. if intStringLen < 0 {
  4270. return ErrInvalidLengthGenerated
  4271. }
  4272. postIndex := iNdEx + intStringLen
  4273. if postIndex < 0 {
  4274. return ErrInvalidLengthGenerated
  4275. }
  4276. if postIndex > l {
  4277. return io.ErrUnexpectedEOF
  4278. }
  4279. m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
  4280. iNdEx = postIndex
  4281. case 2:
  4282. if wireType != 2 {
  4283. return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
  4284. }
  4285. var msglen int
  4286. for shift := uint(0); ; shift += 7 {
  4287. if shift >= 64 {
  4288. return ErrIntOverflowGenerated
  4289. }
  4290. if iNdEx >= l {
  4291. return io.ErrUnexpectedEOF
  4292. }
  4293. b := dAtA[iNdEx]
  4294. iNdEx++
  4295. msglen |= int(b&0x7F) << shift
  4296. if b < 0x80 {
  4297. break
  4298. }
  4299. }
  4300. if msglen < 0 {
  4301. return ErrInvalidLengthGenerated
  4302. }
  4303. postIndex := iNdEx + msglen
  4304. if postIndex < 0 {
  4305. return ErrInvalidLengthGenerated
  4306. }
  4307. if postIndex > l {
  4308. return io.ErrUnexpectedEOF
  4309. }
  4310. if m.Object == nil {
  4311. m.Object = &ObjectMetricStatus{}
  4312. }
  4313. if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4314. return err
  4315. }
  4316. iNdEx = postIndex
  4317. case 3:
  4318. if wireType != 2 {
  4319. return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
  4320. }
  4321. var msglen int
  4322. for shift := uint(0); ; shift += 7 {
  4323. if shift >= 64 {
  4324. return ErrIntOverflowGenerated
  4325. }
  4326. if iNdEx >= l {
  4327. return io.ErrUnexpectedEOF
  4328. }
  4329. b := dAtA[iNdEx]
  4330. iNdEx++
  4331. msglen |= int(b&0x7F) << shift
  4332. if b < 0x80 {
  4333. break
  4334. }
  4335. }
  4336. if msglen < 0 {
  4337. return ErrInvalidLengthGenerated
  4338. }
  4339. postIndex := iNdEx + msglen
  4340. if postIndex < 0 {
  4341. return ErrInvalidLengthGenerated
  4342. }
  4343. if postIndex > l {
  4344. return io.ErrUnexpectedEOF
  4345. }
  4346. if m.Pods == nil {
  4347. m.Pods = &PodsMetricStatus{}
  4348. }
  4349. if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4350. return err
  4351. }
  4352. iNdEx = postIndex
  4353. case 4:
  4354. if wireType != 2 {
  4355. return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
  4356. }
  4357. var msglen int
  4358. for shift := uint(0); ; shift += 7 {
  4359. if shift >= 64 {
  4360. return ErrIntOverflowGenerated
  4361. }
  4362. if iNdEx >= l {
  4363. return io.ErrUnexpectedEOF
  4364. }
  4365. b := dAtA[iNdEx]
  4366. iNdEx++
  4367. msglen |= int(b&0x7F) << shift
  4368. if b < 0x80 {
  4369. break
  4370. }
  4371. }
  4372. if msglen < 0 {
  4373. return ErrInvalidLengthGenerated
  4374. }
  4375. postIndex := iNdEx + msglen
  4376. if postIndex < 0 {
  4377. return ErrInvalidLengthGenerated
  4378. }
  4379. if postIndex > l {
  4380. return io.ErrUnexpectedEOF
  4381. }
  4382. if m.Resource == nil {
  4383. m.Resource = &ResourceMetricStatus{}
  4384. }
  4385. if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4386. return err
  4387. }
  4388. iNdEx = postIndex
  4389. case 5:
  4390. if wireType != 2 {
  4391. return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
  4392. }
  4393. var msglen int
  4394. for shift := uint(0); ; shift += 7 {
  4395. if shift >= 64 {
  4396. return ErrIntOverflowGenerated
  4397. }
  4398. if iNdEx >= l {
  4399. return io.ErrUnexpectedEOF
  4400. }
  4401. b := dAtA[iNdEx]
  4402. iNdEx++
  4403. msglen |= int(b&0x7F) << shift
  4404. if b < 0x80 {
  4405. break
  4406. }
  4407. }
  4408. if msglen < 0 {
  4409. return ErrInvalidLengthGenerated
  4410. }
  4411. postIndex := iNdEx + msglen
  4412. if postIndex < 0 {
  4413. return ErrInvalidLengthGenerated
  4414. }
  4415. if postIndex > l {
  4416. return io.ErrUnexpectedEOF
  4417. }
  4418. if m.External == nil {
  4419. m.External = &ExternalMetricStatus{}
  4420. }
  4421. if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4422. return err
  4423. }
  4424. iNdEx = postIndex
  4425. case 7:
  4426. if wireType != 2 {
  4427. return fmt.Errorf("proto: wrong wireType = %d for field ContainerResource", wireType)
  4428. }
  4429. var msglen int
  4430. for shift := uint(0); ; shift += 7 {
  4431. if shift >= 64 {
  4432. return ErrIntOverflowGenerated
  4433. }
  4434. if iNdEx >= l {
  4435. return io.ErrUnexpectedEOF
  4436. }
  4437. b := dAtA[iNdEx]
  4438. iNdEx++
  4439. msglen |= int(b&0x7F) << shift
  4440. if b < 0x80 {
  4441. break
  4442. }
  4443. }
  4444. if msglen < 0 {
  4445. return ErrInvalidLengthGenerated
  4446. }
  4447. postIndex := iNdEx + msglen
  4448. if postIndex < 0 {
  4449. return ErrInvalidLengthGenerated
  4450. }
  4451. if postIndex > l {
  4452. return io.ErrUnexpectedEOF
  4453. }
  4454. if m.ContainerResource == nil {
  4455. m.ContainerResource = &ContainerResourceMetricStatus{}
  4456. }
  4457. if err := m.ContainerResource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4458. return err
  4459. }
  4460. iNdEx = postIndex
  4461. default:
  4462. iNdEx = preIndex
  4463. skippy, err := skipGenerated(dAtA[iNdEx:])
  4464. if err != nil {
  4465. return err
  4466. }
  4467. if (skippy < 0) || (iNdEx+skippy) < 0 {
  4468. return ErrInvalidLengthGenerated
  4469. }
  4470. if (iNdEx + skippy) > l {
  4471. return io.ErrUnexpectedEOF
  4472. }
  4473. iNdEx += skippy
  4474. }
  4475. }
  4476. if iNdEx > l {
  4477. return io.ErrUnexpectedEOF
  4478. }
  4479. return nil
  4480. }
  4481. func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
  4482. l := len(dAtA)
  4483. iNdEx := 0
  4484. for iNdEx < l {
  4485. preIndex := iNdEx
  4486. var wire uint64
  4487. for shift := uint(0); ; shift += 7 {
  4488. if shift >= 64 {
  4489. return ErrIntOverflowGenerated
  4490. }
  4491. if iNdEx >= l {
  4492. return io.ErrUnexpectedEOF
  4493. }
  4494. b := dAtA[iNdEx]
  4495. iNdEx++
  4496. wire |= uint64(b&0x7F) << shift
  4497. if b < 0x80 {
  4498. break
  4499. }
  4500. }
  4501. fieldNum := int32(wire >> 3)
  4502. wireType := int(wire & 0x7)
  4503. if wireType == 4 {
  4504. return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
  4505. }
  4506. if fieldNum <= 0 {
  4507. return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  4508. }
  4509. switch fieldNum {
  4510. case 1:
  4511. if wireType != 2 {
  4512. return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  4513. }
  4514. var msglen int
  4515. for shift := uint(0); ; shift += 7 {
  4516. if shift >= 64 {
  4517. return ErrIntOverflowGenerated
  4518. }
  4519. if iNdEx >= l {
  4520. return io.ErrUnexpectedEOF
  4521. }
  4522. b := dAtA[iNdEx]
  4523. iNdEx++
  4524. msglen |= int(b&0x7F) << shift
  4525. if b < 0x80 {
  4526. break
  4527. }
  4528. }
  4529. if msglen < 0 {
  4530. return ErrInvalidLengthGenerated
  4531. }
  4532. postIndex := iNdEx + msglen
  4533. if postIndex < 0 {
  4534. return ErrInvalidLengthGenerated
  4535. }
  4536. if postIndex > l {
  4537. return io.ErrUnexpectedEOF
  4538. }
  4539. if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4540. return err
  4541. }
  4542. iNdEx = postIndex
  4543. case 2:
  4544. if wireType != 2 {
  4545. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  4546. }
  4547. var stringLen uint64
  4548. for shift := uint(0); ; shift += 7 {
  4549. if shift >= 64 {
  4550. return ErrIntOverflowGenerated
  4551. }
  4552. if iNdEx >= l {
  4553. return io.ErrUnexpectedEOF
  4554. }
  4555. b := dAtA[iNdEx]
  4556. iNdEx++
  4557. stringLen |= uint64(b&0x7F) << shift
  4558. if b < 0x80 {
  4559. break
  4560. }
  4561. }
  4562. intStringLen := int(stringLen)
  4563. if intStringLen < 0 {
  4564. return ErrInvalidLengthGenerated
  4565. }
  4566. postIndex := iNdEx + intStringLen
  4567. if postIndex < 0 {
  4568. return ErrInvalidLengthGenerated
  4569. }
  4570. if postIndex > l {
  4571. return io.ErrUnexpectedEOF
  4572. }
  4573. m.MetricName = string(dAtA[iNdEx:postIndex])
  4574. iNdEx = postIndex
  4575. case 3:
  4576. if wireType != 2 {
  4577. return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
  4578. }
  4579. var msglen int
  4580. for shift := uint(0); ; shift += 7 {
  4581. if shift >= 64 {
  4582. return ErrIntOverflowGenerated
  4583. }
  4584. if iNdEx >= l {
  4585. return io.ErrUnexpectedEOF
  4586. }
  4587. b := dAtA[iNdEx]
  4588. iNdEx++
  4589. msglen |= int(b&0x7F) << shift
  4590. if b < 0x80 {
  4591. break
  4592. }
  4593. }
  4594. if msglen < 0 {
  4595. return ErrInvalidLengthGenerated
  4596. }
  4597. postIndex := iNdEx + msglen
  4598. if postIndex < 0 {
  4599. return ErrInvalidLengthGenerated
  4600. }
  4601. if postIndex > l {
  4602. return io.ErrUnexpectedEOF
  4603. }
  4604. if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4605. return err
  4606. }
  4607. iNdEx = postIndex
  4608. case 4:
  4609. if wireType != 2 {
  4610. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  4611. }
  4612. var msglen int
  4613. for shift := uint(0); ; shift += 7 {
  4614. if shift >= 64 {
  4615. return ErrIntOverflowGenerated
  4616. }
  4617. if iNdEx >= l {
  4618. return io.ErrUnexpectedEOF
  4619. }
  4620. b := dAtA[iNdEx]
  4621. iNdEx++
  4622. msglen |= int(b&0x7F) << shift
  4623. if b < 0x80 {
  4624. break
  4625. }
  4626. }
  4627. if msglen < 0 {
  4628. return ErrInvalidLengthGenerated
  4629. }
  4630. postIndex := iNdEx + msglen
  4631. if postIndex < 0 {
  4632. return ErrInvalidLengthGenerated
  4633. }
  4634. if postIndex > l {
  4635. return io.ErrUnexpectedEOF
  4636. }
  4637. if m.Selector == nil {
  4638. m.Selector = &v1.LabelSelector{}
  4639. }
  4640. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4641. return err
  4642. }
  4643. iNdEx = postIndex
  4644. case 5:
  4645. if wireType != 2 {
  4646. return fmt.Errorf("proto: wrong wireType = %d for field AverageValue", wireType)
  4647. }
  4648. var msglen int
  4649. for shift := uint(0); ; shift += 7 {
  4650. if shift >= 64 {
  4651. return ErrIntOverflowGenerated
  4652. }
  4653. if iNdEx >= l {
  4654. return io.ErrUnexpectedEOF
  4655. }
  4656. b := dAtA[iNdEx]
  4657. iNdEx++
  4658. msglen |= int(b&0x7F) << shift
  4659. if b < 0x80 {
  4660. break
  4661. }
  4662. }
  4663. if msglen < 0 {
  4664. return ErrInvalidLengthGenerated
  4665. }
  4666. postIndex := iNdEx + msglen
  4667. if postIndex < 0 {
  4668. return ErrInvalidLengthGenerated
  4669. }
  4670. if postIndex > l {
  4671. return io.ErrUnexpectedEOF
  4672. }
  4673. if m.AverageValue == nil {
  4674. m.AverageValue = &resource.Quantity{}
  4675. }
  4676. if err := m.AverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4677. return err
  4678. }
  4679. iNdEx = postIndex
  4680. default:
  4681. iNdEx = preIndex
  4682. skippy, err := skipGenerated(dAtA[iNdEx:])
  4683. if err != nil {
  4684. return err
  4685. }
  4686. if (skippy < 0) || (iNdEx+skippy) < 0 {
  4687. return ErrInvalidLengthGenerated
  4688. }
  4689. if (iNdEx + skippy) > l {
  4690. return io.ErrUnexpectedEOF
  4691. }
  4692. iNdEx += skippy
  4693. }
  4694. }
  4695. if iNdEx > l {
  4696. return io.ErrUnexpectedEOF
  4697. }
  4698. return nil
  4699. }
  4700. func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
  4701. l := len(dAtA)
  4702. iNdEx := 0
  4703. for iNdEx < l {
  4704. preIndex := iNdEx
  4705. var wire uint64
  4706. for shift := uint(0); ; shift += 7 {
  4707. if shift >= 64 {
  4708. return ErrIntOverflowGenerated
  4709. }
  4710. if iNdEx >= l {
  4711. return io.ErrUnexpectedEOF
  4712. }
  4713. b := dAtA[iNdEx]
  4714. iNdEx++
  4715. wire |= uint64(b&0x7F) << shift
  4716. if b < 0x80 {
  4717. break
  4718. }
  4719. }
  4720. fieldNum := int32(wire >> 3)
  4721. wireType := int(wire & 0x7)
  4722. if wireType == 4 {
  4723. return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
  4724. }
  4725. if fieldNum <= 0 {
  4726. return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  4727. }
  4728. switch fieldNum {
  4729. case 1:
  4730. if wireType != 2 {
  4731. return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  4732. }
  4733. var msglen int
  4734. for shift := uint(0); ; shift += 7 {
  4735. if shift >= 64 {
  4736. return ErrIntOverflowGenerated
  4737. }
  4738. if iNdEx >= l {
  4739. return io.ErrUnexpectedEOF
  4740. }
  4741. b := dAtA[iNdEx]
  4742. iNdEx++
  4743. msglen |= int(b&0x7F) << shift
  4744. if b < 0x80 {
  4745. break
  4746. }
  4747. }
  4748. if msglen < 0 {
  4749. return ErrInvalidLengthGenerated
  4750. }
  4751. postIndex := iNdEx + msglen
  4752. if postIndex < 0 {
  4753. return ErrInvalidLengthGenerated
  4754. }
  4755. if postIndex > l {
  4756. return io.ErrUnexpectedEOF
  4757. }
  4758. if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4759. return err
  4760. }
  4761. iNdEx = postIndex
  4762. case 2:
  4763. if wireType != 2 {
  4764. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  4765. }
  4766. var stringLen uint64
  4767. for shift := uint(0); ; shift += 7 {
  4768. if shift >= 64 {
  4769. return ErrIntOverflowGenerated
  4770. }
  4771. if iNdEx >= l {
  4772. return io.ErrUnexpectedEOF
  4773. }
  4774. b := dAtA[iNdEx]
  4775. iNdEx++
  4776. stringLen |= uint64(b&0x7F) << shift
  4777. if b < 0x80 {
  4778. break
  4779. }
  4780. }
  4781. intStringLen := int(stringLen)
  4782. if intStringLen < 0 {
  4783. return ErrInvalidLengthGenerated
  4784. }
  4785. postIndex := iNdEx + intStringLen
  4786. if postIndex < 0 {
  4787. return ErrInvalidLengthGenerated
  4788. }
  4789. if postIndex > l {
  4790. return io.ErrUnexpectedEOF
  4791. }
  4792. m.MetricName = string(dAtA[iNdEx:postIndex])
  4793. iNdEx = postIndex
  4794. case 3:
  4795. if wireType != 2 {
  4796. return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
  4797. }
  4798. var msglen int
  4799. for shift := uint(0); ; shift += 7 {
  4800. if shift >= 64 {
  4801. return ErrIntOverflowGenerated
  4802. }
  4803. if iNdEx >= l {
  4804. return io.ErrUnexpectedEOF
  4805. }
  4806. b := dAtA[iNdEx]
  4807. iNdEx++
  4808. msglen |= int(b&0x7F) << shift
  4809. if b < 0x80 {
  4810. break
  4811. }
  4812. }
  4813. if msglen < 0 {
  4814. return ErrInvalidLengthGenerated
  4815. }
  4816. postIndex := iNdEx + msglen
  4817. if postIndex < 0 {
  4818. return ErrInvalidLengthGenerated
  4819. }
  4820. if postIndex > l {
  4821. return io.ErrUnexpectedEOF
  4822. }
  4823. if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4824. return err
  4825. }
  4826. iNdEx = postIndex
  4827. case 4:
  4828. if wireType != 2 {
  4829. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  4830. }
  4831. var msglen int
  4832. for shift := uint(0); ; shift += 7 {
  4833. if shift >= 64 {
  4834. return ErrIntOverflowGenerated
  4835. }
  4836. if iNdEx >= l {
  4837. return io.ErrUnexpectedEOF
  4838. }
  4839. b := dAtA[iNdEx]
  4840. iNdEx++
  4841. msglen |= int(b&0x7F) << shift
  4842. if b < 0x80 {
  4843. break
  4844. }
  4845. }
  4846. if msglen < 0 {
  4847. return ErrInvalidLengthGenerated
  4848. }
  4849. postIndex := iNdEx + msglen
  4850. if postIndex < 0 {
  4851. return ErrInvalidLengthGenerated
  4852. }
  4853. if postIndex > l {
  4854. return io.ErrUnexpectedEOF
  4855. }
  4856. if m.Selector == nil {
  4857. m.Selector = &v1.LabelSelector{}
  4858. }
  4859. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4860. return err
  4861. }
  4862. iNdEx = postIndex
  4863. case 5:
  4864. if wireType != 2 {
  4865. return fmt.Errorf("proto: wrong wireType = %d for field AverageValue", wireType)
  4866. }
  4867. var msglen int
  4868. for shift := uint(0); ; shift += 7 {
  4869. if shift >= 64 {
  4870. return ErrIntOverflowGenerated
  4871. }
  4872. if iNdEx >= l {
  4873. return io.ErrUnexpectedEOF
  4874. }
  4875. b := dAtA[iNdEx]
  4876. iNdEx++
  4877. msglen |= int(b&0x7F) << shift
  4878. if b < 0x80 {
  4879. break
  4880. }
  4881. }
  4882. if msglen < 0 {
  4883. return ErrInvalidLengthGenerated
  4884. }
  4885. postIndex := iNdEx + msglen
  4886. if postIndex < 0 {
  4887. return ErrInvalidLengthGenerated
  4888. }
  4889. if postIndex > l {
  4890. return io.ErrUnexpectedEOF
  4891. }
  4892. if m.AverageValue == nil {
  4893. m.AverageValue = &resource.Quantity{}
  4894. }
  4895. if err := m.AverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4896. return err
  4897. }
  4898. iNdEx = postIndex
  4899. default:
  4900. iNdEx = preIndex
  4901. skippy, err := skipGenerated(dAtA[iNdEx:])
  4902. if err != nil {
  4903. return err
  4904. }
  4905. if (skippy < 0) || (iNdEx+skippy) < 0 {
  4906. return ErrInvalidLengthGenerated
  4907. }
  4908. if (iNdEx + skippy) > l {
  4909. return io.ErrUnexpectedEOF
  4910. }
  4911. iNdEx += skippy
  4912. }
  4913. }
  4914. if iNdEx > l {
  4915. return io.ErrUnexpectedEOF
  4916. }
  4917. return nil
  4918. }
  4919. func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
  4920. l := len(dAtA)
  4921. iNdEx := 0
  4922. for iNdEx < l {
  4923. preIndex := iNdEx
  4924. var wire uint64
  4925. for shift := uint(0); ; shift += 7 {
  4926. if shift >= 64 {
  4927. return ErrIntOverflowGenerated
  4928. }
  4929. if iNdEx >= l {
  4930. return io.ErrUnexpectedEOF
  4931. }
  4932. b := dAtA[iNdEx]
  4933. iNdEx++
  4934. wire |= uint64(b&0x7F) << shift
  4935. if b < 0x80 {
  4936. break
  4937. }
  4938. }
  4939. fieldNum := int32(wire >> 3)
  4940. wireType := int(wire & 0x7)
  4941. if wireType == 4 {
  4942. return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
  4943. }
  4944. if fieldNum <= 0 {
  4945. return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  4946. }
  4947. switch fieldNum {
  4948. case 1:
  4949. if wireType != 2 {
  4950. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  4951. }
  4952. var stringLen uint64
  4953. for shift := uint(0); ; shift += 7 {
  4954. if shift >= 64 {
  4955. return ErrIntOverflowGenerated
  4956. }
  4957. if iNdEx >= l {
  4958. return io.ErrUnexpectedEOF
  4959. }
  4960. b := dAtA[iNdEx]
  4961. iNdEx++
  4962. stringLen |= uint64(b&0x7F) << shift
  4963. if b < 0x80 {
  4964. break
  4965. }
  4966. }
  4967. intStringLen := int(stringLen)
  4968. if intStringLen < 0 {
  4969. return ErrInvalidLengthGenerated
  4970. }
  4971. postIndex := iNdEx + intStringLen
  4972. if postIndex < 0 {
  4973. return ErrInvalidLengthGenerated
  4974. }
  4975. if postIndex > l {
  4976. return io.ErrUnexpectedEOF
  4977. }
  4978. m.MetricName = string(dAtA[iNdEx:postIndex])
  4979. iNdEx = postIndex
  4980. case 2:
  4981. if wireType != 2 {
  4982. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  4983. }
  4984. var msglen int
  4985. for shift := uint(0); ; shift += 7 {
  4986. if shift >= 64 {
  4987. return ErrIntOverflowGenerated
  4988. }
  4989. if iNdEx >= l {
  4990. return io.ErrUnexpectedEOF
  4991. }
  4992. b := dAtA[iNdEx]
  4993. iNdEx++
  4994. msglen |= int(b&0x7F) << shift
  4995. if b < 0x80 {
  4996. break
  4997. }
  4998. }
  4999. if msglen < 0 {
  5000. return ErrInvalidLengthGenerated
  5001. }
  5002. postIndex := iNdEx + msglen
  5003. if postIndex < 0 {
  5004. return ErrInvalidLengthGenerated
  5005. }
  5006. if postIndex > l {
  5007. return io.ErrUnexpectedEOF
  5008. }
  5009. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5010. return err
  5011. }
  5012. iNdEx = postIndex
  5013. case 3:
  5014. if wireType != 2 {
  5015. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  5016. }
  5017. var msglen int
  5018. for shift := uint(0); ; shift += 7 {
  5019. if shift >= 64 {
  5020. return ErrIntOverflowGenerated
  5021. }
  5022. if iNdEx >= l {
  5023. return io.ErrUnexpectedEOF
  5024. }
  5025. b := dAtA[iNdEx]
  5026. iNdEx++
  5027. msglen |= int(b&0x7F) << shift
  5028. if b < 0x80 {
  5029. break
  5030. }
  5031. }
  5032. if msglen < 0 {
  5033. return ErrInvalidLengthGenerated
  5034. }
  5035. postIndex := iNdEx + msglen
  5036. if postIndex < 0 {
  5037. return ErrInvalidLengthGenerated
  5038. }
  5039. if postIndex > l {
  5040. return io.ErrUnexpectedEOF
  5041. }
  5042. if m.Selector == nil {
  5043. m.Selector = &v1.LabelSelector{}
  5044. }
  5045. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5046. return err
  5047. }
  5048. iNdEx = postIndex
  5049. default:
  5050. iNdEx = preIndex
  5051. skippy, err := skipGenerated(dAtA[iNdEx:])
  5052. if err != nil {
  5053. return err
  5054. }
  5055. if (skippy < 0) || (iNdEx+skippy) < 0 {
  5056. return ErrInvalidLengthGenerated
  5057. }
  5058. if (iNdEx + skippy) > l {
  5059. return io.ErrUnexpectedEOF
  5060. }
  5061. iNdEx += skippy
  5062. }
  5063. }
  5064. if iNdEx > l {
  5065. return io.ErrUnexpectedEOF
  5066. }
  5067. return nil
  5068. }
  5069. func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
  5070. l := len(dAtA)
  5071. iNdEx := 0
  5072. for iNdEx < l {
  5073. preIndex := iNdEx
  5074. var wire uint64
  5075. for shift := uint(0); ; shift += 7 {
  5076. if shift >= 64 {
  5077. return ErrIntOverflowGenerated
  5078. }
  5079. if iNdEx >= l {
  5080. return io.ErrUnexpectedEOF
  5081. }
  5082. b := dAtA[iNdEx]
  5083. iNdEx++
  5084. wire |= uint64(b&0x7F) << shift
  5085. if b < 0x80 {
  5086. break
  5087. }
  5088. }
  5089. fieldNum := int32(wire >> 3)
  5090. wireType := int(wire & 0x7)
  5091. if wireType == 4 {
  5092. return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
  5093. }
  5094. if fieldNum <= 0 {
  5095. return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  5096. }
  5097. switch fieldNum {
  5098. case 1:
  5099. if wireType != 2 {
  5100. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  5101. }
  5102. var stringLen uint64
  5103. for shift := uint(0); ; shift += 7 {
  5104. if shift >= 64 {
  5105. return ErrIntOverflowGenerated
  5106. }
  5107. if iNdEx >= l {
  5108. return io.ErrUnexpectedEOF
  5109. }
  5110. b := dAtA[iNdEx]
  5111. iNdEx++
  5112. stringLen |= uint64(b&0x7F) << shift
  5113. if b < 0x80 {
  5114. break
  5115. }
  5116. }
  5117. intStringLen := int(stringLen)
  5118. if intStringLen < 0 {
  5119. return ErrInvalidLengthGenerated
  5120. }
  5121. postIndex := iNdEx + intStringLen
  5122. if postIndex < 0 {
  5123. return ErrInvalidLengthGenerated
  5124. }
  5125. if postIndex > l {
  5126. return io.ErrUnexpectedEOF
  5127. }
  5128. m.MetricName = string(dAtA[iNdEx:postIndex])
  5129. iNdEx = postIndex
  5130. case 2:
  5131. if wireType != 2 {
  5132. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  5133. }
  5134. var msglen int
  5135. for shift := uint(0); ; shift += 7 {
  5136. if shift >= 64 {
  5137. return ErrIntOverflowGenerated
  5138. }
  5139. if iNdEx >= l {
  5140. return io.ErrUnexpectedEOF
  5141. }
  5142. b := dAtA[iNdEx]
  5143. iNdEx++
  5144. msglen |= int(b&0x7F) << shift
  5145. if b < 0x80 {
  5146. break
  5147. }
  5148. }
  5149. if msglen < 0 {
  5150. return ErrInvalidLengthGenerated
  5151. }
  5152. postIndex := iNdEx + msglen
  5153. if postIndex < 0 {
  5154. return ErrInvalidLengthGenerated
  5155. }
  5156. if postIndex > l {
  5157. return io.ErrUnexpectedEOF
  5158. }
  5159. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5160. return err
  5161. }
  5162. iNdEx = postIndex
  5163. case 3:
  5164. if wireType != 2 {
  5165. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  5166. }
  5167. var msglen int
  5168. for shift := uint(0); ; shift += 7 {
  5169. if shift >= 64 {
  5170. return ErrIntOverflowGenerated
  5171. }
  5172. if iNdEx >= l {
  5173. return io.ErrUnexpectedEOF
  5174. }
  5175. b := dAtA[iNdEx]
  5176. iNdEx++
  5177. msglen |= int(b&0x7F) << shift
  5178. if b < 0x80 {
  5179. break
  5180. }
  5181. }
  5182. if msglen < 0 {
  5183. return ErrInvalidLengthGenerated
  5184. }
  5185. postIndex := iNdEx + msglen
  5186. if postIndex < 0 {
  5187. return ErrInvalidLengthGenerated
  5188. }
  5189. if postIndex > l {
  5190. return io.ErrUnexpectedEOF
  5191. }
  5192. if m.Selector == nil {
  5193. m.Selector = &v1.LabelSelector{}
  5194. }
  5195. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5196. return err
  5197. }
  5198. iNdEx = postIndex
  5199. default:
  5200. iNdEx = preIndex
  5201. skippy, err := skipGenerated(dAtA[iNdEx:])
  5202. if err != nil {
  5203. return err
  5204. }
  5205. if (skippy < 0) || (iNdEx+skippy) < 0 {
  5206. return ErrInvalidLengthGenerated
  5207. }
  5208. if (iNdEx + skippy) > l {
  5209. return io.ErrUnexpectedEOF
  5210. }
  5211. iNdEx += skippy
  5212. }
  5213. }
  5214. if iNdEx > l {
  5215. return io.ErrUnexpectedEOF
  5216. }
  5217. return nil
  5218. }
  5219. func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
  5220. l := len(dAtA)
  5221. iNdEx := 0
  5222. for iNdEx < l {
  5223. preIndex := iNdEx
  5224. var wire uint64
  5225. for shift := uint(0); ; shift += 7 {
  5226. if shift >= 64 {
  5227. return ErrIntOverflowGenerated
  5228. }
  5229. if iNdEx >= l {
  5230. return io.ErrUnexpectedEOF
  5231. }
  5232. b := dAtA[iNdEx]
  5233. iNdEx++
  5234. wire |= uint64(b&0x7F) << shift
  5235. if b < 0x80 {
  5236. break
  5237. }
  5238. }
  5239. fieldNum := int32(wire >> 3)
  5240. wireType := int(wire & 0x7)
  5241. if wireType == 4 {
  5242. return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
  5243. }
  5244. if fieldNum <= 0 {
  5245. return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  5246. }
  5247. switch fieldNum {
  5248. case 1:
  5249. if wireType != 2 {
  5250. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  5251. }
  5252. var stringLen uint64
  5253. for shift := uint(0); ; shift += 7 {
  5254. if shift >= 64 {
  5255. return ErrIntOverflowGenerated
  5256. }
  5257. if iNdEx >= l {
  5258. return io.ErrUnexpectedEOF
  5259. }
  5260. b := dAtA[iNdEx]
  5261. iNdEx++
  5262. stringLen |= uint64(b&0x7F) << shift
  5263. if b < 0x80 {
  5264. break
  5265. }
  5266. }
  5267. intStringLen := int(stringLen)
  5268. if intStringLen < 0 {
  5269. return ErrInvalidLengthGenerated
  5270. }
  5271. postIndex := iNdEx + intStringLen
  5272. if postIndex < 0 {
  5273. return ErrInvalidLengthGenerated
  5274. }
  5275. if postIndex > l {
  5276. return io.ErrUnexpectedEOF
  5277. }
  5278. m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
  5279. iNdEx = postIndex
  5280. case 2:
  5281. if wireType != 0 {
  5282. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
  5283. }
  5284. var v int32
  5285. for shift := uint(0); ; shift += 7 {
  5286. if shift >= 64 {
  5287. return ErrIntOverflowGenerated
  5288. }
  5289. if iNdEx >= l {
  5290. return io.ErrUnexpectedEOF
  5291. }
  5292. b := dAtA[iNdEx]
  5293. iNdEx++
  5294. v |= int32(b&0x7F) << shift
  5295. if b < 0x80 {
  5296. break
  5297. }
  5298. }
  5299. m.TargetAverageUtilization = &v
  5300. case 3:
  5301. if wireType != 2 {
  5302. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  5303. }
  5304. var msglen int
  5305. for shift := uint(0); ; shift += 7 {
  5306. if shift >= 64 {
  5307. return ErrIntOverflowGenerated
  5308. }
  5309. if iNdEx >= l {
  5310. return io.ErrUnexpectedEOF
  5311. }
  5312. b := dAtA[iNdEx]
  5313. iNdEx++
  5314. msglen |= int(b&0x7F) << shift
  5315. if b < 0x80 {
  5316. break
  5317. }
  5318. }
  5319. if msglen < 0 {
  5320. return ErrInvalidLengthGenerated
  5321. }
  5322. postIndex := iNdEx + msglen
  5323. if postIndex < 0 {
  5324. return ErrInvalidLengthGenerated
  5325. }
  5326. if postIndex > l {
  5327. return io.ErrUnexpectedEOF
  5328. }
  5329. if m.TargetAverageValue == nil {
  5330. m.TargetAverageValue = &resource.Quantity{}
  5331. }
  5332. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5333. return err
  5334. }
  5335. iNdEx = postIndex
  5336. default:
  5337. iNdEx = preIndex
  5338. skippy, err := skipGenerated(dAtA[iNdEx:])
  5339. if err != nil {
  5340. return err
  5341. }
  5342. if (skippy < 0) || (iNdEx+skippy) < 0 {
  5343. return ErrInvalidLengthGenerated
  5344. }
  5345. if (iNdEx + skippy) > l {
  5346. return io.ErrUnexpectedEOF
  5347. }
  5348. iNdEx += skippy
  5349. }
  5350. }
  5351. if iNdEx > l {
  5352. return io.ErrUnexpectedEOF
  5353. }
  5354. return nil
  5355. }
  5356. func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
  5357. l := len(dAtA)
  5358. iNdEx := 0
  5359. for iNdEx < l {
  5360. preIndex := iNdEx
  5361. var wire uint64
  5362. for shift := uint(0); ; shift += 7 {
  5363. if shift >= 64 {
  5364. return ErrIntOverflowGenerated
  5365. }
  5366. if iNdEx >= l {
  5367. return io.ErrUnexpectedEOF
  5368. }
  5369. b := dAtA[iNdEx]
  5370. iNdEx++
  5371. wire |= uint64(b&0x7F) << shift
  5372. if b < 0x80 {
  5373. break
  5374. }
  5375. }
  5376. fieldNum := int32(wire >> 3)
  5377. wireType := int(wire & 0x7)
  5378. if wireType == 4 {
  5379. return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
  5380. }
  5381. if fieldNum <= 0 {
  5382. return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  5383. }
  5384. switch fieldNum {
  5385. case 1:
  5386. if wireType != 2 {
  5387. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  5388. }
  5389. var stringLen uint64
  5390. for shift := uint(0); ; shift += 7 {
  5391. if shift >= 64 {
  5392. return ErrIntOverflowGenerated
  5393. }
  5394. if iNdEx >= l {
  5395. return io.ErrUnexpectedEOF
  5396. }
  5397. b := dAtA[iNdEx]
  5398. iNdEx++
  5399. stringLen |= uint64(b&0x7F) << shift
  5400. if b < 0x80 {
  5401. break
  5402. }
  5403. }
  5404. intStringLen := int(stringLen)
  5405. if intStringLen < 0 {
  5406. return ErrInvalidLengthGenerated
  5407. }
  5408. postIndex := iNdEx + intStringLen
  5409. if postIndex < 0 {
  5410. return ErrInvalidLengthGenerated
  5411. }
  5412. if postIndex > l {
  5413. return io.ErrUnexpectedEOF
  5414. }
  5415. m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
  5416. iNdEx = postIndex
  5417. case 2:
  5418. if wireType != 0 {
  5419. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
  5420. }
  5421. var v int32
  5422. for shift := uint(0); ; shift += 7 {
  5423. if shift >= 64 {
  5424. return ErrIntOverflowGenerated
  5425. }
  5426. if iNdEx >= l {
  5427. return io.ErrUnexpectedEOF
  5428. }
  5429. b := dAtA[iNdEx]
  5430. iNdEx++
  5431. v |= int32(b&0x7F) << shift
  5432. if b < 0x80 {
  5433. break
  5434. }
  5435. }
  5436. m.CurrentAverageUtilization = &v
  5437. case 3:
  5438. if wireType != 2 {
  5439. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  5440. }
  5441. var msglen int
  5442. for shift := uint(0); ; shift += 7 {
  5443. if shift >= 64 {
  5444. return ErrIntOverflowGenerated
  5445. }
  5446. if iNdEx >= l {
  5447. return io.ErrUnexpectedEOF
  5448. }
  5449. b := dAtA[iNdEx]
  5450. iNdEx++
  5451. msglen |= int(b&0x7F) << shift
  5452. if b < 0x80 {
  5453. break
  5454. }
  5455. }
  5456. if msglen < 0 {
  5457. return ErrInvalidLengthGenerated
  5458. }
  5459. postIndex := iNdEx + msglen
  5460. if postIndex < 0 {
  5461. return ErrInvalidLengthGenerated
  5462. }
  5463. if postIndex > l {
  5464. return io.ErrUnexpectedEOF
  5465. }
  5466. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5467. return err
  5468. }
  5469. iNdEx = postIndex
  5470. default:
  5471. iNdEx = preIndex
  5472. skippy, err := skipGenerated(dAtA[iNdEx:])
  5473. if err != nil {
  5474. return err
  5475. }
  5476. if (skippy < 0) || (iNdEx+skippy) < 0 {
  5477. return ErrInvalidLengthGenerated
  5478. }
  5479. if (iNdEx + skippy) > l {
  5480. return io.ErrUnexpectedEOF
  5481. }
  5482. iNdEx += skippy
  5483. }
  5484. }
  5485. if iNdEx > l {
  5486. return io.ErrUnexpectedEOF
  5487. }
  5488. return nil
  5489. }
  5490. func skipGenerated(dAtA []byte) (n int, err error) {
  5491. l := len(dAtA)
  5492. iNdEx := 0
  5493. depth := 0
  5494. for iNdEx < l {
  5495. var wire uint64
  5496. for shift := uint(0); ; shift += 7 {
  5497. if shift >= 64 {
  5498. return 0, ErrIntOverflowGenerated
  5499. }
  5500. if iNdEx >= l {
  5501. return 0, io.ErrUnexpectedEOF
  5502. }
  5503. b := dAtA[iNdEx]
  5504. iNdEx++
  5505. wire |= (uint64(b) & 0x7F) << shift
  5506. if b < 0x80 {
  5507. break
  5508. }
  5509. }
  5510. wireType := int(wire & 0x7)
  5511. switch wireType {
  5512. case 0:
  5513. for shift := uint(0); ; shift += 7 {
  5514. if shift >= 64 {
  5515. return 0, ErrIntOverflowGenerated
  5516. }
  5517. if iNdEx >= l {
  5518. return 0, io.ErrUnexpectedEOF
  5519. }
  5520. iNdEx++
  5521. if dAtA[iNdEx-1] < 0x80 {
  5522. break
  5523. }
  5524. }
  5525. case 1:
  5526. iNdEx += 8
  5527. case 2:
  5528. var length int
  5529. for shift := uint(0); ; shift += 7 {
  5530. if shift >= 64 {
  5531. return 0, ErrIntOverflowGenerated
  5532. }
  5533. if iNdEx >= l {
  5534. return 0, io.ErrUnexpectedEOF
  5535. }
  5536. b := dAtA[iNdEx]
  5537. iNdEx++
  5538. length |= (int(b) & 0x7F) << shift
  5539. if b < 0x80 {
  5540. break
  5541. }
  5542. }
  5543. if length < 0 {
  5544. return 0, ErrInvalidLengthGenerated
  5545. }
  5546. iNdEx += length
  5547. case 3:
  5548. depth++
  5549. case 4:
  5550. if depth == 0 {
  5551. return 0, ErrUnexpectedEndOfGroupGenerated
  5552. }
  5553. depth--
  5554. case 5:
  5555. iNdEx += 4
  5556. default:
  5557. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  5558. }
  5559. if iNdEx < 0 {
  5560. return 0, ErrInvalidLengthGenerated
  5561. }
  5562. if depth == 0 {
  5563. return iNdEx, nil
  5564. }
  5565. }
  5566. return 0, io.ErrUnexpectedEOF
  5567. }
  5568. var (
  5569. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  5570. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  5571. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  5572. )