generated.pb.go 110 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307
  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. /*
  16. Package v2beta1 is a generated protocol buffer package.
  17. It is generated from these files:
  18. k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
  19. It has these top-level messages:
  20. CrossVersionObjectReference
  21. ExternalMetricSource
  22. ExternalMetricStatus
  23. HorizontalPodAutoscaler
  24. HorizontalPodAutoscalerCondition
  25. HorizontalPodAutoscalerList
  26. HorizontalPodAutoscalerSpec
  27. HorizontalPodAutoscalerStatus
  28. MetricSpec
  29. MetricStatus
  30. ObjectMetricSource
  31. ObjectMetricStatus
  32. PodsMetricSource
  33. PodsMetricStatus
  34. ResourceMetricSource
  35. ResourceMetricStatus
  36. */
  37. package v2beta1
  38. import proto "github.com/gogo/protobuf/proto"
  39. import fmt "fmt"
  40. import math "math"
  41. import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
  42. import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  43. import k8s_io_api_core_v1 "k8s.io/api/core/v1"
  44. import strings "strings"
  45. import reflect "reflect"
  46. import io "io"
  47. // Reference imports to suppress errors if they are not otherwise used.
  48. var _ = proto.Marshal
  49. var _ = fmt.Errorf
  50. var _ = math.Inf
  51. // This is a compile-time assertion to ensure that this generated file
  52. // is compatible with the proto package it is being compiled against.
  53. // A compilation error at this line likely means your copy of the
  54. // proto package needs to be updated.
  55. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  56. func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
  57. func (*CrossVersionObjectReference) ProtoMessage() {}
  58. func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
  59. return fileDescriptorGenerated, []int{0}
  60. }
  61. func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} }
  62. func (*ExternalMetricSource) ProtoMessage() {}
  63. func (*ExternalMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
  64. func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} }
  65. func (*ExternalMetricStatus) ProtoMessage() {}
  66. func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
  67. func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
  68. func (*HorizontalPodAutoscaler) ProtoMessage() {}
  69. func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
  70. func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
  71. func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
  72. func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
  73. return fileDescriptorGenerated, []int{4}
  74. }
  75. func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
  76. func (*HorizontalPodAutoscalerList) ProtoMessage() {}
  77. func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
  78. return fileDescriptorGenerated, []int{5}
  79. }
  80. func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
  81. func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
  82. func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
  83. return fileDescriptorGenerated, []int{6}
  84. }
  85. func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
  86. func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
  87. func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
  88. return fileDescriptorGenerated, []int{7}
  89. }
  90. func (m *MetricSpec) Reset() { *m = MetricSpec{} }
  91. func (*MetricSpec) ProtoMessage() {}
  92. func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
  93. func (m *MetricStatus) Reset() { *m = MetricStatus{} }
  94. func (*MetricStatus) ProtoMessage() {}
  95. func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
  96. func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
  97. func (*ObjectMetricSource) ProtoMessage() {}
  98. func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
  99. func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
  100. func (*ObjectMetricStatus) ProtoMessage() {}
  101. func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
  102. func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
  103. func (*PodsMetricSource) ProtoMessage() {}
  104. func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
  105. func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
  106. func (*PodsMetricStatus) ProtoMessage() {}
  107. func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
  108. func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
  109. func (*ResourceMetricSource) ProtoMessage() {}
  110. func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
  111. func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
  112. func (*ResourceMetricStatus) ProtoMessage() {}
  113. func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
  114. func init() {
  115. proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference")
  116. proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricSource")
  117. proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricStatus")
  118. proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscaler")
  119. proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition")
  120. proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerList")
  121. proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec")
  122. proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus")
  123. proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta1.MetricSpec")
  124. proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.MetricStatus")
  125. proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricSource")
  126. proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricStatus")
  127. proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricSource")
  128. proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricStatus")
  129. proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricSource")
  130. proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricStatus")
  131. }
  132. func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
  133. size := m.Size()
  134. dAtA = make([]byte, size)
  135. n, err := m.MarshalTo(dAtA)
  136. if err != nil {
  137. return nil, err
  138. }
  139. return dAtA[:n], nil
  140. }
  141. func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
  142. var i int
  143. _ = i
  144. var l int
  145. _ = l
  146. dAtA[i] = 0xa
  147. i++
  148. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
  149. i += copy(dAtA[i:], m.Kind)
  150. dAtA[i] = 0x12
  151. i++
  152. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  153. i += copy(dAtA[i:], m.Name)
  154. dAtA[i] = 0x1a
  155. i++
  156. i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
  157. i += copy(dAtA[i:], m.APIVersion)
  158. return i, nil
  159. }
  160. func (m *ExternalMetricSource) Marshal() (dAtA []byte, err error) {
  161. size := m.Size()
  162. dAtA = make([]byte, size)
  163. n, err := m.MarshalTo(dAtA)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return dAtA[:n], nil
  168. }
  169. func (m *ExternalMetricSource) MarshalTo(dAtA []byte) (int, error) {
  170. var i int
  171. _ = i
  172. var l int
  173. _ = l
  174. dAtA[i] = 0xa
  175. i++
  176. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  177. i += copy(dAtA[i:], m.MetricName)
  178. if m.MetricSelector != nil {
  179. dAtA[i] = 0x12
  180. i++
  181. i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size()))
  182. n1, err := m.MetricSelector.MarshalTo(dAtA[i:])
  183. if err != nil {
  184. return 0, err
  185. }
  186. i += n1
  187. }
  188. if m.TargetValue != nil {
  189. dAtA[i] = 0x1a
  190. i++
  191. i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
  192. n2, err := m.TargetValue.MarshalTo(dAtA[i:])
  193. if err != nil {
  194. return 0, err
  195. }
  196. i += n2
  197. }
  198. if m.TargetAverageValue != nil {
  199. dAtA[i] = 0x22
  200. i++
  201. i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
  202. n3, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
  203. if err != nil {
  204. return 0, err
  205. }
  206. i += n3
  207. }
  208. return i, nil
  209. }
  210. func (m *ExternalMetricStatus) Marshal() (dAtA []byte, err error) {
  211. size := m.Size()
  212. dAtA = make([]byte, size)
  213. n, err := m.MarshalTo(dAtA)
  214. if err != nil {
  215. return nil, err
  216. }
  217. return dAtA[:n], nil
  218. }
  219. func (m *ExternalMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  220. var i int
  221. _ = i
  222. var l int
  223. _ = l
  224. dAtA[i] = 0xa
  225. i++
  226. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  227. i += copy(dAtA[i:], m.MetricName)
  228. if m.MetricSelector != nil {
  229. dAtA[i] = 0x12
  230. i++
  231. i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size()))
  232. n4, err := m.MetricSelector.MarshalTo(dAtA[i:])
  233. if err != nil {
  234. return 0, err
  235. }
  236. i += n4
  237. }
  238. dAtA[i] = 0x1a
  239. i++
  240. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
  241. n5, err := m.CurrentValue.MarshalTo(dAtA[i:])
  242. if err != nil {
  243. return 0, err
  244. }
  245. i += n5
  246. if m.CurrentAverageValue != nil {
  247. dAtA[i] = 0x22
  248. i++
  249. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
  250. n6, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
  251. if err != nil {
  252. return 0, err
  253. }
  254. i += n6
  255. }
  256. return i, nil
  257. }
  258. func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
  259. size := m.Size()
  260. dAtA = make([]byte, size)
  261. n, err := m.MarshalTo(dAtA)
  262. if err != nil {
  263. return nil, err
  264. }
  265. return dAtA[:n], nil
  266. }
  267. func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
  268. var i int
  269. _ = i
  270. var l int
  271. _ = l
  272. dAtA[i] = 0xa
  273. i++
  274. i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
  275. n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
  276. if err != nil {
  277. return 0, err
  278. }
  279. i += n7
  280. dAtA[i] = 0x12
  281. i++
  282. i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
  283. n8, err := m.Spec.MarshalTo(dAtA[i:])
  284. if err != nil {
  285. return 0, err
  286. }
  287. i += n8
  288. dAtA[i] = 0x1a
  289. i++
  290. i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
  291. n9, err := m.Status.MarshalTo(dAtA[i:])
  292. if err != nil {
  293. return 0, err
  294. }
  295. i += n9
  296. return i, nil
  297. }
  298. func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
  299. size := m.Size()
  300. dAtA = make([]byte, size)
  301. n, err := m.MarshalTo(dAtA)
  302. if err != nil {
  303. return nil, err
  304. }
  305. return dAtA[:n], nil
  306. }
  307. func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
  308. var i int
  309. _ = i
  310. var l int
  311. _ = l
  312. dAtA[i] = 0xa
  313. i++
  314. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
  315. i += copy(dAtA[i:], m.Type)
  316. dAtA[i] = 0x12
  317. i++
  318. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
  319. i += copy(dAtA[i:], m.Status)
  320. dAtA[i] = 0x1a
  321. i++
  322. i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
  323. n10, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
  324. if err != nil {
  325. return 0, err
  326. }
  327. i += n10
  328. dAtA[i] = 0x22
  329. i++
  330. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
  331. i += copy(dAtA[i:], m.Reason)
  332. dAtA[i] = 0x2a
  333. i++
  334. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
  335. i += copy(dAtA[i:], m.Message)
  336. return i, nil
  337. }
  338. func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
  339. size := m.Size()
  340. dAtA = make([]byte, size)
  341. n, err := m.MarshalTo(dAtA)
  342. if err != nil {
  343. return nil, err
  344. }
  345. return dAtA[:n], nil
  346. }
  347. func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
  348. var i int
  349. _ = i
  350. var l int
  351. _ = l
  352. dAtA[i] = 0xa
  353. i++
  354. i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
  355. n11, err := m.ListMeta.MarshalTo(dAtA[i:])
  356. if err != nil {
  357. return 0, err
  358. }
  359. i += n11
  360. if len(m.Items) > 0 {
  361. for _, msg := range m.Items {
  362. dAtA[i] = 0x12
  363. i++
  364. i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
  365. n, err := msg.MarshalTo(dAtA[i:])
  366. if err != nil {
  367. return 0, err
  368. }
  369. i += n
  370. }
  371. }
  372. return i, nil
  373. }
  374. func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
  375. size := m.Size()
  376. dAtA = make([]byte, size)
  377. n, err := m.MarshalTo(dAtA)
  378. if err != nil {
  379. return nil, err
  380. }
  381. return dAtA[:n], nil
  382. }
  383. func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
  384. var i int
  385. _ = i
  386. var l int
  387. _ = l
  388. dAtA[i] = 0xa
  389. i++
  390. i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
  391. n12, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
  392. if err != nil {
  393. return 0, err
  394. }
  395. i += n12
  396. if m.MinReplicas != nil {
  397. dAtA[i] = 0x10
  398. i++
  399. i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
  400. }
  401. dAtA[i] = 0x18
  402. i++
  403. i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
  404. if len(m.Metrics) > 0 {
  405. for _, msg := range m.Metrics {
  406. dAtA[i] = 0x22
  407. i++
  408. i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
  409. n, err := msg.MarshalTo(dAtA[i:])
  410. if err != nil {
  411. return 0, err
  412. }
  413. i += n
  414. }
  415. }
  416. return i, nil
  417. }
  418. func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
  419. size := m.Size()
  420. dAtA = make([]byte, size)
  421. n, err := m.MarshalTo(dAtA)
  422. if err != nil {
  423. return nil, err
  424. }
  425. return dAtA[:n], nil
  426. }
  427. func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
  428. var i int
  429. _ = i
  430. var l int
  431. _ = l
  432. if m.ObservedGeneration != nil {
  433. dAtA[i] = 0x8
  434. i++
  435. i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
  436. }
  437. if m.LastScaleTime != nil {
  438. dAtA[i] = 0x12
  439. i++
  440. i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
  441. n13, err := m.LastScaleTime.MarshalTo(dAtA[i:])
  442. if err != nil {
  443. return 0, err
  444. }
  445. i += n13
  446. }
  447. dAtA[i] = 0x18
  448. i++
  449. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
  450. dAtA[i] = 0x20
  451. i++
  452. i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
  453. if len(m.CurrentMetrics) > 0 {
  454. for _, msg := range m.CurrentMetrics {
  455. dAtA[i] = 0x2a
  456. i++
  457. i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
  458. n, err := msg.MarshalTo(dAtA[i:])
  459. if err != nil {
  460. return 0, err
  461. }
  462. i += n
  463. }
  464. }
  465. if len(m.Conditions) > 0 {
  466. for _, msg := range m.Conditions {
  467. dAtA[i] = 0x32
  468. i++
  469. i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
  470. n, err := msg.MarshalTo(dAtA[i:])
  471. if err != nil {
  472. return 0, err
  473. }
  474. i += n
  475. }
  476. }
  477. return i, nil
  478. }
  479. func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
  480. size := m.Size()
  481. dAtA = make([]byte, size)
  482. n, err := m.MarshalTo(dAtA)
  483. if err != nil {
  484. return nil, err
  485. }
  486. return dAtA[:n], nil
  487. }
  488. func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
  489. var i int
  490. _ = i
  491. var l int
  492. _ = l
  493. dAtA[i] = 0xa
  494. i++
  495. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
  496. i += copy(dAtA[i:], m.Type)
  497. if m.Object != nil {
  498. dAtA[i] = 0x12
  499. i++
  500. i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
  501. n14, err := m.Object.MarshalTo(dAtA[i:])
  502. if err != nil {
  503. return 0, err
  504. }
  505. i += n14
  506. }
  507. if m.Pods != nil {
  508. dAtA[i] = 0x1a
  509. i++
  510. i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
  511. n15, err := m.Pods.MarshalTo(dAtA[i:])
  512. if err != nil {
  513. return 0, err
  514. }
  515. i += n15
  516. }
  517. if m.Resource != nil {
  518. dAtA[i] = 0x22
  519. i++
  520. i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
  521. n16, err := m.Resource.MarshalTo(dAtA[i:])
  522. if err != nil {
  523. return 0, err
  524. }
  525. i += n16
  526. }
  527. if m.External != nil {
  528. dAtA[i] = 0x2a
  529. i++
  530. i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size()))
  531. n17, err := m.External.MarshalTo(dAtA[i:])
  532. if err != nil {
  533. return 0, err
  534. }
  535. i += n17
  536. }
  537. return i, nil
  538. }
  539. func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
  540. size := m.Size()
  541. dAtA = make([]byte, size)
  542. n, err := m.MarshalTo(dAtA)
  543. if err != nil {
  544. return nil, err
  545. }
  546. return dAtA[:n], nil
  547. }
  548. func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
  549. var i int
  550. _ = i
  551. var l int
  552. _ = l
  553. dAtA[i] = 0xa
  554. i++
  555. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
  556. i += copy(dAtA[i:], m.Type)
  557. if m.Object != nil {
  558. dAtA[i] = 0x12
  559. i++
  560. i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
  561. n18, err := m.Object.MarshalTo(dAtA[i:])
  562. if err != nil {
  563. return 0, err
  564. }
  565. i += n18
  566. }
  567. if m.Pods != nil {
  568. dAtA[i] = 0x1a
  569. i++
  570. i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
  571. n19, err := m.Pods.MarshalTo(dAtA[i:])
  572. if err != nil {
  573. return 0, err
  574. }
  575. i += n19
  576. }
  577. if m.Resource != nil {
  578. dAtA[i] = 0x22
  579. i++
  580. i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
  581. n20, err := m.Resource.MarshalTo(dAtA[i:])
  582. if err != nil {
  583. return 0, err
  584. }
  585. i += n20
  586. }
  587. if m.External != nil {
  588. dAtA[i] = 0x2a
  589. i++
  590. i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size()))
  591. n21, err := m.External.MarshalTo(dAtA[i:])
  592. if err != nil {
  593. return 0, err
  594. }
  595. i += n21
  596. }
  597. return i, nil
  598. }
  599. func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
  600. size := m.Size()
  601. dAtA = make([]byte, size)
  602. n, err := m.MarshalTo(dAtA)
  603. if err != nil {
  604. return nil, err
  605. }
  606. return dAtA[:n], nil
  607. }
  608. func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
  609. var i int
  610. _ = i
  611. var l int
  612. _ = l
  613. dAtA[i] = 0xa
  614. i++
  615. i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
  616. n22, err := m.Target.MarshalTo(dAtA[i:])
  617. if err != nil {
  618. return 0, err
  619. }
  620. i += n22
  621. dAtA[i] = 0x12
  622. i++
  623. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  624. i += copy(dAtA[i:], m.MetricName)
  625. dAtA[i] = 0x1a
  626. i++
  627. i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
  628. n23, err := m.TargetValue.MarshalTo(dAtA[i:])
  629. if err != nil {
  630. return 0, err
  631. }
  632. i += n23
  633. if m.Selector != nil {
  634. dAtA[i] = 0x22
  635. i++
  636. i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
  637. n24, err := m.Selector.MarshalTo(dAtA[i:])
  638. if err != nil {
  639. return 0, err
  640. }
  641. i += n24
  642. }
  643. if m.AverageValue != nil {
  644. dAtA[i] = 0x2a
  645. i++
  646. i = encodeVarintGenerated(dAtA, i, uint64(m.AverageValue.Size()))
  647. n25, err := m.AverageValue.MarshalTo(dAtA[i:])
  648. if err != nil {
  649. return 0, err
  650. }
  651. i += n25
  652. }
  653. return i, nil
  654. }
  655. func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
  656. size := m.Size()
  657. dAtA = make([]byte, size)
  658. n, err := m.MarshalTo(dAtA)
  659. if err != nil {
  660. return nil, err
  661. }
  662. return dAtA[:n], nil
  663. }
  664. func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  665. var i int
  666. _ = i
  667. var l int
  668. _ = l
  669. dAtA[i] = 0xa
  670. i++
  671. i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
  672. n26, err := m.Target.MarshalTo(dAtA[i:])
  673. if err != nil {
  674. return 0, err
  675. }
  676. i += n26
  677. dAtA[i] = 0x12
  678. i++
  679. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  680. i += copy(dAtA[i:], m.MetricName)
  681. dAtA[i] = 0x1a
  682. i++
  683. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
  684. n27, err := m.CurrentValue.MarshalTo(dAtA[i:])
  685. if err != nil {
  686. return 0, err
  687. }
  688. i += n27
  689. if m.Selector != nil {
  690. dAtA[i] = 0x22
  691. i++
  692. i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
  693. n28, err := m.Selector.MarshalTo(dAtA[i:])
  694. if err != nil {
  695. return 0, err
  696. }
  697. i += n28
  698. }
  699. if m.AverageValue != nil {
  700. dAtA[i] = 0x2a
  701. i++
  702. i = encodeVarintGenerated(dAtA, i, uint64(m.AverageValue.Size()))
  703. n29, err := m.AverageValue.MarshalTo(dAtA[i:])
  704. if err != nil {
  705. return 0, err
  706. }
  707. i += n29
  708. }
  709. return i, nil
  710. }
  711. func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
  712. size := m.Size()
  713. dAtA = make([]byte, size)
  714. n, err := m.MarshalTo(dAtA)
  715. if err != nil {
  716. return nil, err
  717. }
  718. return dAtA[:n], nil
  719. }
  720. func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
  721. var i int
  722. _ = i
  723. var l int
  724. _ = l
  725. dAtA[i] = 0xa
  726. i++
  727. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  728. i += copy(dAtA[i:], m.MetricName)
  729. dAtA[i] = 0x12
  730. i++
  731. i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
  732. n30, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
  733. if err != nil {
  734. return 0, err
  735. }
  736. i += n30
  737. if m.Selector != nil {
  738. dAtA[i] = 0x1a
  739. i++
  740. i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
  741. n31, err := m.Selector.MarshalTo(dAtA[i:])
  742. if err != nil {
  743. return 0, err
  744. }
  745. i += n31
  746. }
  747. return i, nil
  748. }
  749. func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
  750. size := m.Size()
  751. dAtA = make([]byte, size)
  752. n, err := m.MarshalTo(dAtA)
  753. if err != nil {
  754. return nil, err
  755. }
  756. return dAtA[:n], nil
  757. }
  758. func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  759. var i int
  760. _ = i
  761. var l int
  762. _ = l
  763. dAtA[i] = 0xa
  764. i++
  765. i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
  766. i += copy(dAtA[i:], m.MetricName)
  767. dAtA[i] = 0x12
  768. i++
  769. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
  770. n32, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
  771. if err != nil {
  772. return 0, err
  773. }
  774. i += n32
  775. if m.Selector != nil {
  776. dAtA[i] = 0x1a
  777. i++
  778. i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
  779. n33, err := m.Selector.MarshalTo(dAtA[i:])
  780. if err != nil {
  781. return 0, err
  782. }
  783. i += n33
  784. }
  785. return i, nil
  786. }
  787. func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
  788. size := m.Size()
  789. dAtA = make([]byte, size)
  790. n, err := m.MarshalTo(dAtA)
  791. if err != nil {
  792. return nil, err
  793. }
  794. return dAtA[:n], nil
  795. }
  796. func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
  797. var i int
  798. _ = i
  799. var l int
  800. _ = l
  801. dAtA[i] = 0xa
  802. i++
  803. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  804. i += copy(dAtA[i:], m.Name)
  805. if m.TargetAverageUtilization != nil {
  806. dAtA[i] = 0x10
  807. i++
  808. i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
  809. }
  810. if m.TargetAverageValue != nil {
  811. dAtA[i] = 0x1a
  812. i++
  813. i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
  814. n34, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
  815. if err != nil {
  816. return 0, err
  817. }
  818. i += n34
  819. }
  820. return i, nil
  821. }
  822. func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
  823. size := m.Size()
  824. dAtA = make([]byte, size)
  825. n, err := m.MarshalTo(dAtA)
  826. if err != nil {
  827. return nil, err
  828. }
  829. return dAtA[:n], nil
  830. }
  831. func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
  832. var i int
  833. _ = i
  834. var l int
  835. _ = l
  836. dAtA[i] = 0xa
  837. i++
  838. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  839. i += copy(dAtA[i:], m.Name)
  840. if m.CurrentAverageUtilization != nil {
  841. dAtA[i] = 0x10
  842. i++
  843. i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
  844. }
  845. dAtA[i] = 0x1a
  846. i++
  847. i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
  848. n35, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
  849. if err != nil {
  850. return 0, err
  851. }
  852. i += n35
  853. return i, nil
  854. }
  855. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  856. for v >= 1<<7 {
  857. dAtA[offset] = uint8(v&0x7f | 0x80)
  858. v >>= 7
  859. offset++
  860. }
  861. dAtA[offset] = uint8(v)
  862. return offset + 1
  863. }
  864. func (m *CrossVersionObjectReference) Size() (n int) {
  865. var l int
  866. _ = l
  867. l = len(m.Kind)
  868. n += 1 + l + sovGenerated(uint64(l))
  869. l = len(m.Name)
  870. n += 1 + l + sovGenerated(uint64(l))
  871. l = len(m.APIVersion)
  872. n += 1 + l + sovGenerated(uint64(l))
  873. return n
  874. }
  875. func (m *ExternalMetricSource) Size() (n int) {
  876. var l int
  877. _ = l
  878. l = len(m.MetricName)
  879. n += 1 + l + sovGenerated(uint64(l))
  880. if m.MetricSelector != nil {
  881. l = m.MetricSelector.Size()
  882. n += 1 + l + sovGenerated(uint64(l))
  883. }
  884. if m.TargetValue != nil {
  885. l = m.TargetValue.Size()
  886. n += 1 + l + sovGenerated(uint64(l))
  887. }
  888. if m.TargetAverageValue != nil {
  889. l = m.TargetAverageValue.Size()
  890. n += 1 + l + sovGenerated(uint64(l))
  891. }
  892. return n
  893. }
  894. func (m *ExternalMetricStatus) Size() (n int) {
  895. var l int
  896. _ = l
  897. l = len(m.MetricName)
  898. n += 1 + l + sovGenerated(uint64(l))
  899. if m.MetricSelector != nil {
  900. l = m.MetricSelector.Size()
  901. n += 1 + l + sovGenerated(uint64(l))
  902. }
  903. l = m.CurrentValue.Size()
  904. n += 1 + l + sovGenerated(uint64(l))
  905. if m.CurrentAverageValue != nil {
  906. l = m.CurrentAverageValue.Size()
  907. n += 1 + l + sovGenerated(uint64(l))
  908. }
  909. return n
  910. }
  911. func (m *HorizontalPodAutoscaler) Size() (n int) {
  912. var l int
  913. _ = l
  914. l = m.ObjectMeta.Size()
  915. n += 1 + l + sovGenerated(uint64(l))
  916. l = m.Spec.Size()
  917. n += 1 + l + sovGenerated(uint64(l))
  918. l = m.Status.Size()
  919. n += 1 + l + sovGenerated(uint64(l))
  920. return n
  921. }
  922. func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
  923. var l int
  924. _ = l
  925. l = len(m.Type)
  926. n += 1 + l + sovGenerated(uint64(l))
  927. l = len(m.Status)
  928. n += 1 + l + sovGenerated(uint64(l))
  929. l = m.LastTransitionTime.Size()
  930. n += 1 + l + sovGenerated(uint64(l))
  931. l = len(m.Reason)
  932. n += 1 + l + sovGenerated(uint64(l))
  933. l = len(m.Message)
  934. n += 1 + l + sovGenerated(uint64(l))
  935. return n
  936. }
  937. func (m *HorizontalPodAutoscalerList) Size() (n int) {
  938. var l int
  939. _ = l
  940. l = m.ListMeta.Size()
  941. n += 1 + l + sovGenerated(uint64(l))
  942. if len(m.Items) > 0 {
  943. for _, e := range m.Items {
  944. l = e.Size()
  945. n += 1 + l + sovGenerated(uint64(l))
  946. }
  947. }
  948. return n
  949. }
  950. func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
  951. var l int
  952. _ = l
  953. l = m.ScaleTargetRef.Size()
  954. n += 1 + l + sovGenerated(uint64(l))
  955. if m.MinReplicas != nil {
  956. n += 1 + sovGenerated(uint64(*m.MinReplicas))
  957. }
  958. n += 1 + sovGenerated(uint64(m.MaxReplicas))
  959. if len(m.Metrics) > 0 {
  960. for _, e := range m.Metrics {
  961. l = e.Size()
  962. n += 1 + l + sovGenerated(uint64(l))
  963. }
  964. }
  965. return n
  966. }
  967. func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
  968. var l int
  969. _ = l
  970. if m.ObservedGeneration != nil {
  971. n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
  972. }
  973. if m.LastScaleTime != nil {
  974. l = m.LastScaleTime.Size()
  975. n += 1 + l + sovGenerated(uint64(l))
  976. }
  977. n += 1 + sovGenerated(uint64(m.CurrentReplicas))
  978. n += 1 + sovGenerated(uint64(m.DesiredReplicas))
  979. if len(m.CurrentMetrics) > 0 {
  980. for _, e := range m.CurrentMetrics {
  981. l = e.Size()
  982. n += 1 + l + sovGenerated(uint64(l))
  983. }
  984. }
  985. if len(m.Conditions) > 0 {
  986. for _, e := range m.Conditions {
  987. l = e.Size()
  988. n += 1 + l + sovGenerated(uint64(l))
  989. }
  990. }
  991. return n
  992. }
  993. func (m *MetricSpec) Size() (n int) {
  994. var l int
  995. _ = l
  996. l = len(m.Type)
  997. n += 1 + l + sovGenerated(uint64(l))
  998. if m.Object != nil {
  999. l = m.Object.Size()
  1000. n += 1 + l + sovGenerated(uint64(l))
  1001. }
  1002. if m.Pods != nil {
  1003. l = m.Pods.Size()
  1004. n += 1 + l + sovGenerated(uint64(l))
  1005. }
  1006. if m.Resource != nil {
  1007. l = m.Resource.Size()
  1008. n += 1 + l + sovGenerated(uint64(l))
  1009. }
  1010. if m.External != nil {
  1011. l = m.External.Size()
  1012. n += 1 + l + sovGenerated(uint64(l))
  1013. }
  1014. return n
  1015. }
  1016. func (m *MetricStatus) Size() (n int) {
  1017. var l int
  1018. _ = l
  1019. l = len(m.Type)
  1020. n += 1 + l + sovGenerated(uint64(l))
  1021. if m.Object != nil {
  1022. l = m.Object.Size()
  1023. n += 1 + l + sovGenerated(uint64(l))
  1024. }
  1025. if m.Pods != nil {
  1026. l = m.Pods.Size()
  1027. n += 1 + l + sovGenerated(uint64(l))
  1028. }
  1029. if m.Resource != nil {
  1030. l = m.Resource.Size()
  1031. n += 1 + l + sovGenerated(uint64(l))
  1032. }
  1033. if m.External != nil {
  1034. l = m.External.Size()
  1035. n += 1 + l + sovGenerated(uint64(l))
  1036. }
  1037. return n
  1038. }
  1039. func (m *ObjectMetricSource) Size() (n int) {
  1040. var l int
  1041. _ = l
  1042. l = m.Target.Size()
  1043. n += 1 + l + sovGenerated(uint64(l))
  1044. l = len(m.MetricName)
  1045. n += 1 + l + sovGenerated(uint64(l))
  1046. l = m.TargetValue.Size()
  1047. n += 1 + l + sovGenerated(uint64(l))
  1048. if m.Selector != nil {
  1049. l = m.Selector.Size()
  1050. n += 1 + l + sovGenerated(uint64(l))
  1051. }
  1052. if m.AverageValue != nil {
  1053. l = m.AverageValue.Size()
  1054. n += 1 + l + sovGenerated(uint64(l))
  1055. }
  1056. return n
  1057. }
  1058. func (m *ObjectMetricStatus) Size() (n int) {
  1059. var l int
  1060. _ = l
  1061. l = m.Target.Size()
  1062. n += 1 + l + sovGenerated(uint64(l))
  1063. l = len(m.MetricName)
  1064. n += 1 + l + sovGenerated(uint64(l))
  1065. l = m.CurrentValue.Size()
  1066. n += 1 + l + sovGenerated(uint64(l))
  1067. if m.Selector != nil {
  1068. l = m.Selector.Size()
  1069. n += 1 + l + sovGenerated(uint64(l))
  1070. }
  1071. if m.AverageValue != nil {
  1072. l = m.AverageValue.Size()
  1073. n += 1 + l + sovGenerated(uint64(l))
  1074. }
  1075. return n
  1076. }
  1077. func (m *PodsMetricSource) Size() (n int) {
  1078. var l int
  1079. _ = l
  1080. l = len(m.MetricName)
  1081. n += 1 + l + sovGenerated(uint64(l))
  1082. l = m.TargetAverageValue.Size()
  1083. n += 1 + l + sovGenerated(uint64(l))
  1084. if m.Selector != nil {
  1085. l = m.Selector.Size()
  1086. n += 1 + l + sovGenerated(uint64(l))
  1087. }
  1088. return n
  1089. }
  1090. func (m *PodsMetricStatus) Size() (n int) {
  1091. var l int
  1092. _ = l
  1093. l = len(m.MetricName)
  1094. n += 1 + l + sovGenerated(uint64(l))
  1095. l = m.CurrentAverageValue.Size()
  1096. n += 1 + l + sovGenerated(uint64(l))
  1097. if m.Selector != nil {
  1098. l = m.Selector.Size()
  1099. n += 1 + l + sovGenerated(uint64(l))
  1100. }
  1101. return n
  1102. }
  1103. func (m *ResourceMetricSource) Size() (n int) {
  1104. var l int
  1105. _ = l
  1106. l = len(m.Name)
  1107. n += 1 + l + sovGenerated(uint64(l))
  1108. if m.TargetAverageUtilization != nil {
  1109. n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
  1110. }
  1111. if m.TargetAverageValue != nil {
  1112. l = m.TargetAverageValue.Size()
  1113. n += 1 + l + sovGenerated(uint64(l))
  1114. }
  1115. return n
  1116. }
  1117. func (m *ResourceMetricStatus) Size() (n int) {
  1118. var l int
  1119. _ = l
  1120. l = len(m.Name)
  1121. n += 1 + l + sovGenerated(uint64(l))
  1122. if m.CurrentAverageUtilization != nil {
  1123. n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
  1124. }
  1125. l = m.CurrentAverageValue.Size()
  1126. n += 1 + l + sovGenerated(uint64(l))
  1127. return n
  1128. }
  1129. func sovGenerated(x uint64) (n int) {
  1130. for {
  1131. n++
  1132. x >>= 7
  1133. if x == 0 {
  1134. break
  1135. }
  1136. }
  1137. return n
  1138. }
  1139. func sozGenerated(x uint64) (n int) {
  1140. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1141. }
  1142. func (this *CrossVersionObjectReference) String() string {
  1143. if this == nil {
  1144. return "nil"
  1145. }
  1146. s := strings.Join([]string{`&CrossVersionObjectReference{`,
  1147. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  1148. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  1149. `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
  1150. `}`,
  1151. }, "")
  1152. return s
  1153. }
  1154. func (this *ExternalMetricSource) String() string {
  1155. if this == nil {
  1156. return "nil"
  1157. }
  1158. s := strings.Join([]string{`&ExternalMetricSource{`,
  1159. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  1160. `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
  1161. `TargetValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
  1162. `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
  1163. `}`,
  1164. }, "")
  1165. return s
  1166. }
  1167. func (this *ExternalMetricStatus) String() string {
  1168. if this == nil {
  1169. return "nil"
  1170. }
  1171. s := strings.Join([]string{`&ExternalMetricStatus{`,
  1172. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  1173. `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
  1174. `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
  1175. `CurrentAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
  1176. `}`,
  1177. }, "")
  1178. return s
  1179. }
  1180. func (this *HorizontalPodAutoscaler) String() string {
  1181. if this == nil {
  1182. return "nil"
  1183. }
  1184. s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
  1185. `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  1186. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
  1187. `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
  1188. `}`,
  1189. }, "")
  1190. return s
  1191. }
  1192. func (this *HorizontalPodAutoscalerCondition) String() string {
  1193. if this == nil {
  1194. return "nil"
  1195. }
  1196. s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
  1197. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  1198. `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
  1199. `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
  1200. `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
  1201. `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
  1202. `}`,
  1203. }, "")
  1204. return s
  1205. }
  1206. func (this *HorizontalPodAutoscalerList) String() string {
  1207. if this == nil {
  1208. return "nil"
  1209. }
  1210. s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
  1211. `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
  1212. `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
  1213. `}`,
  1214. }, "")
  1215. return s
  1216. }
  1217. func (this *HorizontalPodAutoscalerSpec) String() string {
  1218. if this == nil {
  1219. return "nil"
  1220. }
  1221. s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
  1222. `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
  1223. `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
  1224. `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
  1225. `Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + `,`,
  1226. `}`,
  1227. }, "")
  1228. return s
  1229. }
  1230. func (this *HorizontalPodAutoscalerStatus) String() string {
  1231. if this == nil {
  1232. return "nil"
  1233. }
  1234. s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
  1235. `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
  1236. `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
  1237. `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
  1238. `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
  1239. `CurrentMetrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentMetrics), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + `,`,
  1240. `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "HorizontalPodAutoscalerCondition", "HorizontalPodAutoscalerCondition", 1), `&`, ``, 1) + `,`,
  1241. `}`,
  1242. }, "")
  1243. return s
  1244. }
  1245. func (this *MetricSpec) String() string {
  1246. if this == nil {
  1247. return "nil"
  1248. }
  1249. s := strings.Join([]string{`&MetricSpec{`,
  1250. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  1251. `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
  1252. `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
  1253. `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
  1254. `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricSource", "ExternalMetricSource", 1) + `,`,
  1255. `}`,
  1256. }, "")
  1257. return s
  1258. }
  1259. func (this *MetricStatus) String() string {
  1260. if this == nil {
  1261. return "nil"
  1262. }
  1263. s := strings.Join([]string{`&MetricStatus{`,
  1264. `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
  1265. `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
  1266. `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
  1267. `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
  1268. `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricStatus", "ExternalMetricStatus", 1) + `,`,
  1269. `}`,
  1270. }, "")
  1271. return s
  1272. }
  1273. func (this *ObjectMetricSource) String() string {
  1274. if this == nil {
  1275. return "nil"
  1276. }
  1277. s := strings.Join([]string{`&ObjectMetricSource{`,
  1278. `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
  1279. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  1280. `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
  1281. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
  1282. `AverageValue:` + strings.Replace(fmt.Sprintf("%v", this.AverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
  1283. `}`,
  1284. }, "")
  1285. return s
  1286. }
  1287. func (this *ObjectMetricStatus) String() string {
  1288. if this == nil {
  1289. return "nil"
  1290. }
  1291. s := strings.Join([]string{`&ObjectMetricStatus{`,
  1292. `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
  1293. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  1294. `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
  1295. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
  1296. `AverageValue:` + strings.Replace(fmt.Sprintf("%v", this.AverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
  1297. `}`,
  1298. }, "")
  1299. return s
  1300. }
  1301. func (this *PodsMetricSource) String() string {
  1302. if this == nil {
  1303. return "nil"
  1304. }
  1305. s := strings.Join([]string{`&PodsMetricSource{`,
  1306. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  1307. `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
  1308. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
  1309. `}`,
  1310. }, "")
  1311. return s
  1312. }
  1313. func (this *PodsMetricStatus) String() string {
  1314. if this == nil {
  1315. return "nil"
  1316. }
  1317. s := strings.Join([]string{`&PodsMetricStatus{`,
  1318. `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
  1319. `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
  1320. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
  1321. `}`,
  1322. }, "")
  1323. return s
  1324. }
  1325. func (this *ResourceMetricSource) String() string {
  1326. if this == nil {
  1327. return "nil"
  1328. }
  1329. s := strings.Join([]string{`&ResourceMetricSource{`,
  1330. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  1331. `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
  1332. `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
  1333. `}`,
  1334. }, "")
  1335. return s
  1336. }
  1337. func (this *ResourceMetricStatus) String() string {
  1338. if this == nil {
  1339. return "nil"
  1340. }
  1341. s := strings.Join([]string{`&ResourceMetricStatus{`,
  1342. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  1343. `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
  1344. `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
  1345. `}`,
  1346. }, "")
  1347. return s
  1348. }
  1349. func valueToStringGenerated(v interface{}) string {
  1350. rv := reflect.ValueOf(v)
  1351. if rv.IsNil() {
  1352. return "nil"
  1353. }
  1354. pv := reflect.Indirect(rv).Interface()
  1355. return fmt.Sprintf("*%v", pv)
  1356. }
  1357. func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
  1358. l := len(dAtA)
  1359. iNdEx := 0
  1360. for iNdEx < l {
  1361. preIndex := iNdEx
  1362. var wire uint64
  1363. for shift := uint(0); ; shift += 7 {
  1364. if shift >= 64 {
  1365. return ErrIntOverflowGenerated
  1366. }
  1367. if iNdEx >= l {
  1368. return io.ErrUnexpectedEOF
  1369. }
  1370. b := dAtA[iNdEx]
  1371. iNdEx++
  1372. wire |= (uint64(b) & 0x7F) << shift
  1373. if b < 0x80 {
  1374. break
  1375. }
  1376. }
  1377. fieldNum := int32(wire >> 3)
  1378. wireType := int(wire & 0x7)
  1379. if wireType == 4 {
  1380. return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
  1381. }
  1382. if fieldNum <= 0 {
  1383. return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
  1384. }
  1385. switch fieldNum {
  1386. case 1:
  1387. if wireType != 2 {
  1388. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  1389. }
  1390. var stringLen uint64
  1391. for shift := uint(0); ; shift += 7 {
  1392. if shift >= 64 {
  1393. return ErrIntOverflowGenerated
  1394. }
  1395. if iNdEx >= l {
  1396. return io.ErrUnexpectedEOF
  1397. }
  1398. b := dAtA[iNdEx]
  1399. iNdEx++
  1400. stringLen |= (uint64(b) & 0x7F) << shift
  1401. if b < 0x80 {
  1402. break
  1403. }
  1404. }
  1405. intStringLen := int(stringLen)
  1406. if intStringLen < 0 {
  1407. return ErrInvalidLengthGenerated
  1408. }
  1409. postIndex := iNdEx + intStringLen
  1410. if postIndex > l {
  1411. return io.ErrUnexpectedEOF
  1412. }
  1413. m.Kind = string(dAtA[iNdEx:postIndex])
  1414. iNdEx = postIndex
  1415. case 2:
  1416. if wireType != 2 {
  1417. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1418. }
  1419. var stringLen uint64
  1420. for shift := uint(0); ; shift += 7 {
  1421. if shift >= 64 {
  1422. return ErrIntOverflowGenerated
  1423. }
  1424. if iNdEx >= l {
  1425. return io.ErrUnexpectedEOF
  1426. }
  1427. b := dAtA[iNdEx]
  1428. iNdEx++
  1429. stringLen |= (uint64(b) & 0x7F) << shift
  1430. if b < 0x80 {
  1431. break
  1432. }
  1433. }
  1434. intStringLen := int(stringLen)
  1435. if intStringLen < 0 {
  1436. return ErrInvalidLengthGenerated
  1437. }
  1438. postIndex := iNdEx + intStringLen
  1439. if postIndex > l {
  1440. return io.ErrUnexpectedEOF
  1441. }
  1442. m.Name = string(dAtA[iNdEx:postIndex])
  1443. iNdEx = postIndex
  1444. case 3:
  1445. if wireType != 2 {
  1446. return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
  1447. }
  1448. var stringLen uint64
  1449. for shift := uint(0); ; shift += 7 {
  1450. if shift >= 64 {
  1451. return ErrIntOverflowGenerated
  1452. }
  1453. if iNdEx >= l {
  1454. return io.ErrUnexpectedEOF
  1455. }
  1456. b := dAtA[iNdEx]
  1457. iNdEx++
  1458. stringLen |= (uint64(b) & 0x7F) << shift
  1459. if b < 0x80 {
  1460. break
  1461. }
  1462. }
  1463. intStringLen := int(stringLen)
  1464. if intStringLen < 0 {
  1465. return ErrInvalidLengthGenerated
  1466. }
  1467. postIndex := iNdEx + intStringLen
  1468. if postIndex > l {
  1469. return io.ErrUnexpectedEOF
  1470. }
  1471. m.APIVersion = string(dAtA[iNdEx:postIndex])
  1472. iNdEx = postIndex
  1473. default:
  1474. iNdEx = preIndex
  1475. skippy, err := skipGenerated(dAtA[iNdEx:])
  1476. if err != nil {
  1477. return err
  1478. }
  1479. if skippy < 0 {
  1480. return ErrInvalidLengthGenerated
  1481. }
  1482. if (iNdEx + skippy) > l {
  1483. return io.ErrUnexpectedEOF
  1484. }
  1485. iNdEx += skippy
  1486. }
  1487. }
  1488. if iNdEx > l {
  1489. return io.ErrUnexpectedEOF
  1490. }
  1491. return nil
  1492. }
  1493. func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error {
  1494. l := len(dAtA)
  1495. iNdEx := 0
  1496. for iNdEx < l {
  1497. preIndex := iNdEx
  1498. var wire uint64
  1499. for shift := uint(0); ; shift += 7 {
  1500. if shift >= 64 {
  1501. return ErrIntOverflowGenerated
  1502. }
  1503. if iNdEx >= l {
  1504. return io.ErrUnexpectedEOF
  1505. }
  1506. b := dAtA[iNdEx]
  1507. iNdEx++
  1508. wire |= (uint64(b) & 0x7F) << shift
  1509. if b < 0x80 {
  1510. break
  1511. }
  1512. }
  1513. fieldNum := int32(wire >> 3)
  1514. wireType := int(wire & 0x7)
  1515. if wireType == 4 {
  1516. return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group")
  1517. }
  1518. if fieldNum <= 0 {
  1519. return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  1520. }
  1521. switch fieldNum {
  1522. case 1:
  1523. if wireType != 2 {
  1524. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  1525. }
  1526. var stringLen uint64
  1527. for shift := uint(0); ; shift += 7 {
  1528. if shift >= 64 {
  1529. return ErrIntOverflowGenerated
  1530. }
  1531. if iNdEx >= l {
  1532. return io.ErrUnexpectedEOF
  1533. }
  1534. b := dAtA[iNdEx]
  1535. iNdEx++
  1536. stringLen |= (uint64(b) & 0x7F) << shift
  1537. if b < 0x80 {
  1538. break
  1539. }
  1540. }
  1541. intStringLen := int(stringLen)
  1542. if intStringLen < 0 {
  1543. return ErrInvalidLengthGenerated
  1544. }
  1545. postIndex := iNdEx + intStringLen
  1546. if postIndex > l {
  1547. return io.ErrUnexpectedEOF
  1548. }
  1549. m.MetricName = string(dAtA[iNdEx:postIndex])
  1550. iNdEx = postIndex
  1551. case 2:
  1552. if wireType != 2 {
  1553. return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
  1554. }
  1555. var msglen int
  1556. for shift := uint(0); ; shift += 7 {
  1557. if shift >= 64 {
  1558. return ErrIntOverflowGenerated
  1559. }
  1560. if iNdEx >= l {
  1561. return io.ErrUnexpectedEOF
  1562. }
  1563. b := dAtA[iNdEx]
  1564. iNdEx++
  1565. msglen |= (int(b) & 0x7F) << shift
  1566. if b < 0x80 {
  1567. break
  1568. }
  1569. }
  1570. if msglen < 0 {
  1571. return ErrInvalidLengthGenerated
  1572. }
  1573. postIndex := iNdEx + msglen
  1574. if postIndex > l {
  1575. return io.ErrUnexpectedEOF
  1576. }
  1577. if m.MetricSelector == nil {
  1578. m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
  1579. }
  1580. if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1581. return err
  1582. }
  1583. iNdEx = postIndex
  1584. case 3:
  1585. if wireType != 2 {
  1586. return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
  1587. }
  1588. var msglen int
  1589. for shift := uint(0); ; shift += 7 {
  1590. if shift >= 64 {
  1591. return ErrIntOverflowGenerated
  1592. }
  1593. if iNdEx >= l {
  1594. return io.ErrUnexpectedEOF
  1595. }
  1596. b := dAtA[iNdEx]
  1597. iNdEx++
  1598. msglen |= (int(b) & 0x7F) << shift
  1599. if b < 0x80 {
  1600. break
  1601. }
  1602. }
  1603. if msglen < 0 {
  1604. return ErrInvalidLengthGenerated
  1605. }
  1606. postIndex := iNdEx + msglen
  1607. if postIndex > l {
  1608. return io.ErrUnexpectedEOF
  1609. }
  1610. if m.TargetValue == nil {
  1611. m.TargetValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
  1612. }
  1613. if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1614. return err
  1615. }
  1616. iNdEx = postIndex
  1617. case 4:
  1618. if wireType != 2 {
  1619. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  1620. }
  1621. var msglen int
  1622. for shift := uint(0); ; shift += 7 {
  1623. if shift >= 64 {
  1624. return ErrIntOverflowGenerated
  1625. }
  1626. if iNdEx >= l {
  1627. return io.ErrUnexpectedEOF
  1628. }
  1629. b := dAtA[iNdEx]
  1630. iNdEx++
  1631. msglen |= (int(b) & 0x7F) << shift
  1632. if b < 0x80 {
  1633. break
  1634. }
  1635. }
  1636. if msglen < 0 {
  1637. return ErrInvalidLengthGenerated
  1638. }
  1639. postIndex := iNdEx + msglen
  1640. if postIndex > l {
  1641. return io.ErrUnexpectedEOF
  1642. }
  1643. if m.TargetAverageValue == nil {
  1644. m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
  1645. }
  1646. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1647. return err
  1648. }
  1649. iNdEx = postIndex
  1650. default:
  1651. iNdEx = preIndex
  1652. skippy, err := skipGenerated(dAtA[iNdEx:])
  1653. if err != nil {
  1654. return err
  1655. }
  1656. if skippy < 0 {
  1657. return ErrInvalidLengthGenerated
  1658. }
  1659. if (iNdEx + skippy) > l {
  1660. return io.ErrUnexpectedEOF
  1661. }
  1662. iNdEx += skippy
  1663. }
  1664. }
  1665. if iNdEx > l {
  1666. return io.ErrUnexpectedEOF
  1667. }
  1668. return nil
  1669. }
  1670. func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error {
  1671. l := len(dAtA)
  1672. iNdEx := 0
  1673. for iNdEx < l {
  1674. preIndex := iNdEx
  1675. var wire uint64
  1676. for shift := uint(0); ; shift += 7 {
  1677. if shift >= 64 {
  1678. return ErrIntOverflowGenerated
  1679. }
  1680. if iNdEx >= l {
  1681. return io.ErrUnexpectedEOF
  1682. }
  1683. b := dAtA[iNdEx]
  1684. iNdEx++
  1685. wire |= (uint64(b) & 0x7F) << shift
  1686. if b < 0x80 {
  1687. break
  1688. }
  1689. }
  1690. fieldNum := int32(wire >> 3)
  1691. wireType := int(wire & 0x7)
  1692. if wireType == 4 {
  1693. return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group")
  1694. }
  1695. if fieldNum <= 0 {
  1696. return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  1697. }
  1698. switch fieldNum {
  1699. case 1:
  1700. if wireType != 2 {
  1701. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  1702. }
  1703. var stringLen uint64
  1704. for shift := uint(0); ; shift += 7 {
  1705. if shift >= 64 {
  1706. return ErrIntOverflowGenerated
  1707. }
  1708. if iNdEx >= l {
  1709. return io.ErrUnexpectedEOF
  1710. }
  1711. b := dAtA[iNdEx]
  1712. iNdEx++
  1713. stringLen |= (uint64(b) & 0x7F) << shift
  1714. if b < 0x80 {
  1715. break
  1716. }
  1717. }
  1718. intStringLen := int(stringLen)
  1719. if intStringLen < 0 {
  1720. return ErrInvalidLengthGenerated
  1721. }
  1722. postIndex := iNdEx + intStringLen
  1723. if postIndex > l {
  1724. return io.ErrUnexpectedEOF
  1725. }
  1726. m.MetricName = string(dAtA[iNdEx:postIndex])
  1727. iNdEx = postIndex
  1728. case 2:
  1729. if wireType != 2 {
  1730. return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType)
  1731. }
  1732. var msglen int
  1733. for shift := uint(0); ; shift += 7 {
  1734. if shift >= 64 {
  1735. return ErrIntOverflowGenerated
  1736. }
  1737. if iNdEx >= l {
  1738. return io.ErrUnexpectedEOF
  1739. }
  1740. b := dAtA[iNdEx]
  1741. iNdEx++
  1742. msglen |= (int(b) & 0x7F) << shift
  1743. if b < 0x80 {
  1744. break
  1745. }
  1746. }
  1747. if msglen < 0 {
  1748. return ErrInvalidLengthGenerated
  1749. }
  1750. postIndex := iNdEx + msglen
  1751. if postIndex > l {
  1752. return io.ErrUnexpectedEOF
  1753. }
  1754. if m.MetricSelector == nil {
  1755. m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
  1756. }
  1757. if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1758. return err
  1759. }
  1760. iNdEx = postIndex
  1761. case 3:
  1762. if wireType != 2 {
  1763. return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
  1764. }
  1765. var msglen int
  1766. for shift := uint(0); ; shift += 7 {
  1767. if shift >= 64 {
  1768. return ErrIntOverflowGenerated
  1769. }
  1770. if iNdEx >= l {
  1771. return io.ErrUnexpectedEOF
  1772. }
  1773. b := dAtA[iNdEx]
  1774. iNdEx++
  1775. msglen |= (int(b) & 0x7F) << shift
  1776. if b < 0x80 {
  1777. break
  1778. }
  1779. }
  1780. if msglen < 0 {
  1781. return ErrInvalidLengthGenerated
  1782. }
  1783. postIndex := iNdEx + msglen
  1784. if postIndex > l {
  1785. return io.ErrUnexpectedEOF
  1786. }
  1787. if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1788. return err
  1789. }
  1790. iNdEx = postIndex
  1791. case 4:
  1792. if wireType != 2 {
  1793. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  1794. }
  1795. var msglen int
  1796. for shift := uint(0); ; shift += 7 {
  1797. if shift >= 64 {
  1798. return ErrIntOverflowGenerated
  1799. }
  1800. if iNdEx >= l {
  1801. return io.ErrUnexpectedEOF
  1802. }
  1803. b := dAtA[iNdEx]
  1804. iNdEx++
  1805. msglen |= (int(b) & 0x7F) << shift
  1806. if b < 0x80 {
  1807. break
  1808. }
  1809. }
  1810. if msglen < 0 {
  1811. return ErrInvalidLengthGenerated
  1812. }
  1813. postIndex := iNdEx + msglen
  1814. if postIndex > l {
  1815. return io.ErrUnexpectedEOF
  1816. }
  1817. if m.CurrentAverageValue == nil {
  1818. m.CurrentAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
  1819. }
  1820. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1821. return err
  1822. }
  1823. iNdEx = postIndex
  1824. default:
  1825. iNdEx = preIndex
  1826. skippy, err := skipGenerated(dAtA[iNdEx:])
  1827. if err != nil {
  1828. return err
  1829. }
  1830. if skippy < 0 {
  1831. return ErrInvalidLengthGenerated
  1832. }
  1833. if (iNdEx + skippy) > l {
  1834. return io.ErrUnexpectedEOF
  1835. }
  1836. iNdEx += skippy
  1837. }
  1838. }
  1839. if iNdEx > l {
  1840. return io.ErrUnexpectedEOF
  1841. }
  1842. return nil
  1843. }
  1844. func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
  1845. l := len(dAtA)
  1846. iNdEx := 0
  1847. for iNdEx < l {
  1848. preIndex := iNdEx
  1849. var wire uint64
  1850. for shift := uint(0); ; shift += 7 {
  1851. if shift >= 64 {
  1852. return ErrIntOverflowGenerated
  1853. }
  1854. if iNdEx >= l {
  1855. return io.ErrUnexpectedEOF
  1856. }
  1857. b := dAtA[iNdEx]
  1858. iNdEx++
  1859. wire |= (uint64(b) & 0x7F) << shift
  1860. if b < 0x80 {
  1861. break
  1862. }
  1863. }
  1864. fieldNum := int32(wire >> 3)
  1865. wireType := int(wire & 0x7)
  1866. if wireType == 4 {
  1867. return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
  1868. }
  1869. if fieldNum <= 0 {
  1870. return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
  1871. }
  1872. switch fieldNum {
  1873. case 1:
  1874. if wireType != 2 {
  1875. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  1876. }
  1877. var msglen int
  1878. for shift := uint(0); ; shift += 7 {
  1879. if shift >= 64 {
  1880. return ErrIntOverflowGenerated
  1881. }
  1882. if iNdEx >= l {
  1883. return io.ErrUnexpectedEOF
  1884. }
  1885. b := dAtA[iNdEx]
  1886. iNdEx++
  1887. msglen |= (int(b) & 0x7F) << shift
  1888. if b < 0x80 {
  1889. break
  1890. }
  1891. }
  1892. if msglen < 0 {
  1893. return ErrInvalidLengthGenerated
  1894. }
  1895. postIndex := iNdEx + msglen
  1896. if postIndex > l {
  1897. return io.ErrUnexpectedEOF
  1898. }
  1899. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1900. return err
  1901. }
  1902. iNdEx = postIndex
  1903. case 2:
  1904. if wireType != 2 {
  1905. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  1906. }
  1907. var msglen int
  1908. for shift := uint(0); ; shift += 7 {
  1909. if shift >= 64 {
  1910. return ErrIntOverflowGenerated
  1911. }
  1912. if iNdEx >= l {
  1913. return io.ErrUnexpectedEOF
  1914. }
  1915. b := dAtA[iNdEx]
  1916. iNdEx++
  1917. msglen |= (int(b) & 0x7F) << shift
  1918. if b < 0x80 {
  1919. break
  1920. }
  1921. }
  1922. if msglen < 0 {
  1923. return ErrInvalidLengthGenerated
  1924. }
  1925. postIndex := iNdEx + msglen
  1926. if postIndex > l {
  1927. return io.ErrUnexpectedEOF
  1928. }
  1929. if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1930. return err
  1931. }
  1932. iNdEx = postIndex
  1933. case 3:
  1934. if wireType != 2 {
  1935. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  1936. }
  1937. var msglen int
  1938. for shift := uint(0); ; shift += 7 {
  1939. if shift >= 64 {
  1940. return ErrIntOverflowGenerated
  1941. }
  1942. if iNdEx >= l {
  1943. return io.ErrUnexpectedEOF
  1944. }
  1945. b := dAtA[iNdEx]
  1946. iNdEx++
  1947. msglen |= (int(b) & 0x7F) << shift
  1948. if b < 0x80 {
  1949. break
  1950. }
  1951. }
  1952. if msglen < 0 {
  1953. return ErrInvalidLengthGenerated
  1954. }
  1955. postIndex := iNdEx + msglen
  1956. if postIndex > l {
  1957. return io.ErrUnexpectedEOF
  1958. }
  1959. if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1960. return err
  1961. }
  1962. iNdEx = postIndex
  1963. default:
  1964. iNdEx = preIndex
  1965. skippy, err := skipGenerated(dAtA[iNdEx:])
  1966. if err != nil {
  1967. return err
  1968. }
  1969. if skippy < 0 {
  1970. return ErrInvalidLengthGenerated
  1971. }
  1972. if (iNdEx + skippy) > l {
  1973. return io.ErrUnexpectedEOF
  1974. }
  1975. iNdEx += skippy
  1976. }
  1977. }
  1978. if iNdEx > l {
  1979. return io.ErrUnexpectedEOF
  1980. }
  1981. return nil
  1982. }
  1983. func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
  1984. l := len(dAtA)
  1985. iNdEx := 0
  1986. for iNdEx < l {
  1987. preIndex := iNdEx
  1988. var wire uint64
  1989. for shift := uint(0); ; shift += 7 {
  1990. if shift >= 64 {
  1991. return ErrIntOverflowGenerated
  1992. }
  1993. if iNdEx >= l {
  1994. return io.ErrUnexpectedEOF
  1995. }
  1996. b := dAtA[iNdEx]
  1997. iNdEx++
  1998. wire |= (uint64(b) & 0x7F) << shift
  1999. if b < 0x80 {
  2000. break
  2001. }
  2002. }
  2003. fieldNum := int32(wire >> 3)
  2004. wireType := int(wire & 0x7)
  2005. if wireType == 4 {
  2006. return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
  2007. }
  2008. if fieldNum <= 0 {
  2009. return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
  2010. }
  2011. switch fieldNum {
  2012. case 1:
  2013. if wireType != 2 {
  2014. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2015. }
  2016. var stringLen uint64
  2017. for shift := uint(0); ; shift += 7 {
  2018. if shift >= 64 {
  2019. return ErrIntOverflowGenerated
  2020. }
  2021. if iNdEx >= l {
  2022. return io.ErrUnexpectedEOF
  2023. }
  2024. b := dAtA[iNdEx]
  2025. iNdEx++
  2026. stringLen |= (uint64(b) & 0x7F) << shift
  2027. if b < 0x80 {
  2028. break
  2029. }
  2030. }
  2031. intStringLen := int(stringLen)
  2032. if intStringLen < 0 {
  2033. return ErrInvalidLengthGenerated
  2034. }
  2035. postIndex := iNdEx + intStringLen
  2036. if postIndex > l {
  2037. return io.ErrUnexpectedEOF
  2038. }
  2039. m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
  2040. iNdEx = postIndex
  2041. case 2:
  2042. if wireType != 2 {
  2043. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  2044. }
  2045. var stringLen uint64
  2046. for shift := uint(0); ; shift += 7 {
  2047. if shift >= 64 {
  2048. return ErrIntOverflowGenerated
  2049. }
  2050. if iNdEx >= l {
  2051. return io.ErrUnexpectedEOF
  2052. }
  2053. b := dAtA[iNdEx]
  2054. iNdEx++
  2055. stringLen |= (uint64(b) & 0x7F) << shift
  2056. if b < 0x80 {
  2057. break
  2058. }
  2059. }
  2060. intStringLen := int(stringLen)
  2061. if intStringLen < 0 {
  2062. return ErrInvalidLengthGenerated
  2063. }
  2064. postIndex := iNdEx + intStringLen
  2065. if postIndex > l {
  2066. return io.ErrUnexpectedEOF
  2067. }
  2068. m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
  2069. iNdEx = postIndex
  2070. case 3:
  2071. if wireType != 2 {
  2072. return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
  2073. }
  2074. var msglen int
  2075. for shift := uint(0); ; shift += 7 {
  2076. if shift >= 64 {
  2077. return ErrIntOverflowGenerated
  2078. }
  2079. if iNdEx >= l {
  2080. return io.ErrUnexpectedEOF
  2081. }
  2082. b := dAtA[iNdEx]
  2083. iNdEx++
  2084. msglen |= (int(b) & 0x7F) << shift
  2085. if b < 0x80 {
  2086. break
  2087. }
  2088. }
  2089. if msglen < 0 {
  2090. return ErrInvalidLengthGenerated
  2091. }
  2092. postIndex := iNdEx + msglen
  2093. if postIndex > l {
  2094. return io.ErrUnexpectedEOF
  2095. }
  2096. if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2097. return err
  2098. }
  2099. iNdEx = postIndex
  2100. case 4:
  2101. if wireType != 2 {
  2102. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  2103. }
  2104. var stringLen uint64
  2105. for shift := uint(0); ; shift += 7 {
  2106. if shift >= 64 {
  2107. return ErrIntOverflowGenerated
  2108. }
  2109. if iNdEx >= l {
  2110. return io.ErrUnexpectedEOF
  2111. }
  2112. b := dAtA[iNdEx]
  2113. iNdEx++
  2114. stringLen |= (uint64(b) & 0x7F) << shift
  2115. if b < 0x80 {
  2116. break
  2117. }
  2118. }
  2119. intStringLen := int(stringLen)
  2120. if intStringLen < 0 {
  2121. return ErrInvalidLengthGenerated
  2122. }
  2123. postIndex := iNdEx + intStringLen
  2124. if postIndex > l {
  2125. return io.ErrUnexpectedEOF
  2126. }
  2127. m.Reason = string(dAtA[iNdEx:postIndex])
  2128. iNdEx = postIndex
  2129. case 5:
  2130. if wireType != 2 {
  2131. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  2132. }
  2133. var stringLen uint64
  2134. for shift := uint(0); ; shift += 7 {
  2135. if shift >= 64 {
  2136. return ErrIntOverflowGenerated
  2137. }
  2138. if iNdEx >= l {
  2139. return io.ErrUnexpectedEOF
  2140. }
  2141. b := dAtA[iNdEx]
  2142. iNdEx++
  2143. stringLen |= (uint64(b) & 0x7F) << shift
  2144. if b < 0x80 {
  2145. break
  2146. }
  2147. }
  2148. intStringLen := int(stringLen)
  2149. if intStringLen < 0 {
  2150. return ErrInvalidLengthGenerated
  2151. }
  2152. postIndex := iNdEx + intStringLen
  2153. if postIndex > l {
  2154. return io.ErrUnexpectedEOF
  2155. }
  2156. m.Message = string(dAtA[iNdEx:postIndex])
  2157. iNdEx = postIndex
  2158. default:
  2159. iNdEx = preIndex
  2160. skippy, err := skipGenerated(dAtA[iNdEx:])
  2161. if err != nil {
  2162. return err
  2163. }
  2164. if skippy < 0 {
  2165. return ErrInvalidLengthGenerated
  2166. }
  2167. if (iNdEx + skippy) > l {
  2168. return io.ErrUnexpectedEOF
  2169. }
  2170. iNdEx += skippy
  2171. }
  2172. }
  2173. if iNdEx > l {
  2174. return io.ErrUnexpectedEOF
  2175. }
  2176. return nil
  2177. }
  2178. func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
  2179. l := len(dAtA)
  2180. iNdEx := 0
  2181. for iNdEx < l {
  2182. preIndex := iNdEx
  2183. var wire uint64
  2184. for shift := uint(0); ; shift += 7 {
  2185. if shift >= 64 {
  2186. return ErrIntOverflowGenerated
  2187. }
  2188. if iNdEx >= l {
  2189. return io.ErrUnexpectedEOF
  2190. }
  2191. b := dAtA[iNdEx]
  2192. iNdEx++
  2193. wire |= (uint64(b) & 0x7F) << shift
  2194. if b < 0x80 {
  2195. break
  2196. }
  2197. }
  2198. fieldNum := int32(wire >> 3)
  2199. wireType := int(wire & 0x7)
  2200. if wireType == 4 {
  2201. return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
  2202. }
  2203. if fieldNum <= 0 {
  2204. return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
  2205. }
  2206. switch fieldNum {
  2207. case 1:
  2208. if wireType != 2 {
  2209. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  2210. }
  2211. var msglen int
  2212. for shift := uint(0); ; shift += 7 {
  2213. if shift >= 64 {
  2214. return ErrIntOverflowGenerated
  2215. }
  2216. if iNdEx >= l {
  2217. return io.ErrUnexpectedEOF
  2218. }
  2219. b := dAtA[iNdEx]
  2220. iNdEx++
  2221. msglen |= (int(b) & 0x7F) << shift
  2222. if b < 0x80 {
  2223. break
  2224. }
  2225. }
  2226. if msglen < 0 {
  2227. return ErrInvalidLengthGenerated
  2228. }
  2229. postIndex := iNdEx + msglen
  2230. if postIndex > l {
  2231. return io.ErrUnexpectedEOF
  2232. }
  2233. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2234. return err
  2235. }
  2236. iNdEx = postIndex
  2237. case 2:
  2238. if wireType != 2 {
  2239. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  2240. }
  2241. var msglen int
  2242. for shift := uint(0); ; shift += 7 {
  2243. if shift >= 64 {
  2244. return ErrIntOverflowGenerated
  2245. }
  2246. if iNdEx >= l {
  2247. return io.ErrUnexpectedEOF
  2248. }
  2249. b := dAtA[iNdEx]
  2250. iNdEx++
  2251. msglen |= (int(b) & 0x7F) << shift
  2252. if b < 0x80 {
  2253. break
  2254. }
  2255. }
  2256. if msglen < 0 {
  2257. return ErrInvalidLengthGenerated
  2258. }
  2259. postIndex := iNdEx + msglen
  2260. if postIndex > l {
  2261. return io.ErrUnexpectedEOF
  2262. }
  2263. m.Items = append(m.Items, HorizontalPodAutoscaler{})
  2264. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2265. return err
  2266. }
  2267. iNdEx = postIndex
  2268. default:
  2269. iNdEx = preIndex
  2270. skippy, err := skipGenerated(dAtA[iNdEx:])
  2271. if err != nil {
  2272. return err
  2273. }
  2274. if skippy < 0 {
  2275. return ErrInvalidLengthGenerated
  2276. }
  2277. if (iNdEx + skippy) > l {
  2278. return io.ErrUnexpectedEOF
  2279. }
  2280. iNdEx += skippy
  2281. }
  2282. }
  2283. if iNdEx > l {
  2284. return io.ErrUnexpectedEOF
  2285. }
  2286. return nil
  2287. }
  2288. func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
  2289. l := len(dAtA)
  2290. iNdEx := 0
  2291. for iNdEx < l {
  2292. preIndex := iNdEx
  2293. var wire uint64
  2294. for shift := uint(0); ; shift += 7 {
  2295. if shift >= 64 {
  2296. return ErrIntOverflowGenerated
  2297. }
  2298. if iNdEx >= l {
  2299. return io.ErrUnexpectedEOF
  2300. }
  2301. b := dAtA[iNdEx]
  2302. iNdEx++
  2303. wire |= (uint64(b) & 0x7F) << shift
  2304. if b < 0x80 {
  2305. break
  2306. }
  2307. }
  2308. fieldNum := int32(wire >> 3)
  2309. wireType := int(wire & 0x7)
  2310. if wireType == 4 {
  2311. return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
  2312. }
  2313. if fieldNum <= 0 {
  2314. return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  2315. }
  2316. switch fieldNum {
  2317. case 1:
  2318. if wireType != 2 {
  2319. return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
  2320. }
  2321. var msglen int
  2322. for shift := uint(0); ; shift += 7 {
  2323. if shift >= 64 {
  2324. return ErrIntOverflowGenerated
  2325. }
  2326. if iNdEx >= l {
  2327. return io.ErrUnexpectedEOF
  2328. }
  2329. b := dAtA[iNdEx]
  2330. iNdEx++
  2331. msglen |= (int(b) & 0x7F) << shift
  2332. if b < 0x80 {
  2333. break
  2334. }
  2335. }
  2336. if msglen < 0 {
  2337. return ErrInvalidLengthGenerated
  2338. }
  2339. postIndex := iNdEx + msglen
  2340. if postIndex > l {
  2341. return io.ErrUnexpectedEOF
  2342. }
  2343. if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2344. return err
  2345. }
  2346. iNdEx = postIndex
  2347. case 2:
  2348. if wireType != 0 {
  2349. return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
  2350. }
  2351. var v int32
  2352. for shift := uint(0); ; shift += 7 {
  2353. if shift >= 64 {
  2354. return ErrIntOverflowGenerated
  2355. }
  2356. if iNdEx >= l {
  2357. return io.ErrUnexpectedEOF
  2358. }
  2359. b := dAtA[iNdEx]
  2360. iNdEx++
  2361. v |= (int32(b) & 0x7F) << shift
  2362. if b < 0x80 {
  2363. break
  2364. }
  2365. }
  2366. m.MinReplicas = &v
  2367. case 3:
  2368. if wireType != 0 {
  2369. return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
  2370. }
  2371. m.MaxReplicas = 0
  2372. for shift := uint(0); ; shift += 7 {
  2373. if shift >= 64 {
  2374. return ErrIntOverflowGenerated
  2375. }
  2376. if iNdEx >= l {
  2377. return io.ErrUnexpectedEOF
  2378. }
  2379. b := dAtA[iNdEx]
  2380. iNdEx++
  2381. m.MaxReplicas |= (int32(b) & 0x7F) << shift
  2382. if b < 0x80 {
  2383. break
  2384. }
  2385. }
  2386. case 4:
  2387. if wireType != 2 {
  2388. return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
  2389. }
  2390. var msglen int
  2391. for shift := uint(0); ; shift += 7 {
  2392. if shift >= 64 {
  2393. return ErrIntOverflowGenerated
  2394. }
  2395. if iNdEx >= l {
  2396. return io.ErrUnexpectedEOF
  2397. }
  2398. b := dAtA[iNdEx]
  2399. iNdEx++
  2400. msglen |= (int(b) & 0x7F) << shift
  2401. if b < 0x80 {
  2402. break
  2403. }
  2404. }
  2405. if msglen < 0 {
  2406. return ErrInvalidLengthGenerated
  2407. }
  2408. postIndex := iNdEx + msglen
  2409. if postIndex > l {
  2410. return io.ErrUnexpectedEOF
  2411. }
  2412. m.Metrics = append(m.Metrics, MetricSpec{})
  2413. if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2414. return err
  2415. }
  2416. iNdEx = postIndex
  2417. default:
  2418. iNdEx = preIndex
  2419. skippy, err := skipGenerated(dAtA[iNdEx:])
  2420. if err != nil {
  2421. return err
  2422. }
  2423. if skippy < 0 {
  2424. return ErrInvalidLengthGenerated
  2425. }
  2426. if (iNdEx + skippy) > l {
  2427. return io.ErrUnexpectedEOF
  2428. }
  2429. iNdEx += skippy
  2430. }
  2431. }
  2432. if iNdEx > l {
  2433. return io.ErrUnexpectedEOF
  2434. }
  2435. return nil
  2436. }
  2437. func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
  2438. l := len(dAtA)
  2439. iNdEx := 0
  2440. for iNdEx < l {
  2441. preIndex := iNdEx
  2442. var wire uint64
  2443. for shift := uint(0); ; shift += 7 {
  2444. if shift >= 64 {
  2445. return ErrIntOverflowGenerated
  2446. }
  2447. if iNdEx >= l {
  2448. return io.ErrUnexpectedEOF
  2449. }
  2450. b := dAtA[iNdEx]
  2451. iNdEx++
  2452. wire |= (uint64(b) & 0x7F) << shift
  2453. if b < 0x80 {
  2454. break
  2455. }
  2456. }
  2457. fieldNum := int32(wire >> 3)
  2458. wireType := int(wire & 0x7)
  2459. if wireType == 4 {
  2460. return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
  2461. }
  2462. if fieldNum <= 0 {
  2463. return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  2464. }
  2465. switch fieldNum {
  2466. case 1:
  2467. if wireType != 0 {
  2468. return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
  2469. }
  2470. var v int64
  2471. for shift := uint(0); ; shift += 7 {
  2472. if shift >= 64 {
  2473. return ErrIntOverflowGenerated
  2474. }
  2475. if iNdEx >= l {
  2476. return io.ErrUnexpectedEOF
  2477. }
  2478. b := dAtA[iNdEx]
  2479. iNdEx++
  2480. v |= (int64(b) & 0x7F) << shift
  2481. if b < 0x80 {
  2482. break
  2483. }
  2484. }
  2485. m.ObservedGeneration = &v
  2486. case 2:
  2487. if wireType != 2 {
  2488. return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
  2489. }
  2490. var msglen int
  2491. for shift := uint(0); ; shift += 7 {
  2492. if shift >= 64 {
  2493. return ErrIntOverflowGenerated
  2494. }
  2495. if iNdEx >= l {
  2496. return io.ErrUnexpectedEOF
  2497. }
  2498. b := dAtA[iNdEx]
  2499. iNdEx++
  2500. msglen |= (int(b) & 0x7F) << shift
  2501. if b < 0x80 {
  2502. break
  2503. }
  2504. }
  2505. if msglen < 0 {
  2506. return ErrInvalidLengthGenerated
  2507. }
  2508. postIndex := iNdEx + msglen
  2509. if postIndex > l {
  2510. return io.ErrUnexpectedEOF
  2511. }
  2512. if m.LastScaleTime == nil {
  2513. m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
  2514. }
  2515. if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2516. return err
  2517. }
  2518. iNdEx = postIndex
  2519. case 3:
  2520. if wireType != 0 {
  2521. return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
  2522. }
  2523. m.CurrentReplicas = 0
  2524. for shift := uint(0); ; shift += 7 {
  2525. if shift >= 64 {
  2526. return ErrIntOverflowGenerated
  2527. }
  2528. if iNdEx >= l {
  2529. return io.ErrUnexpectedEOF
  2530. }
  2531. b := dAtA[iNdEx]
  2532. iNdEx++
  2533. m.CurrentReplicas |= (int32(b) & 0x7F) << shift
  2534. if b < 0x80 {
  2535. break
  2536. }
  2537. }
  2538. case 4:
  2539. if wireType != 0 {
  2540. return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
  2541. }
  2542. m.DesiredReplicas = 0
  2543. for shift := uint(0); ; shift += 7 {
  2544. if shift >= 64 {
  2545. return ErrIntOverflowGenerated
  2546. }
  2547. if iNdEx >= l {
  2548. return io.ErrUnexpectedEOF
  2549. }
  2550. b := dAtA[iNdEx]
  2551. iNdEx++
  2552. m.DesiredReplicas |= (int32(b) & 0x7F) << shift
  2553. if b < 0x80 {
  2554. break
  2555. }
  2556. }
  2557. case 5:
  2558. if wireType != 2 {
  2559. return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType)
  2560. }
  2561. var msglen int
  2562. for shift := uint(0); ; shift += 7 {
  2563. if shift >= 64 {
  2564. return ErrIntOverflowGenerated
  2565. }
  2566. if iNdEx >= l {
  2567. return io.ErrUnexpectedEOF
  2568. }
  2569. b := dAtA[iNdEx]
  2570. iNdEx++
  2571. msglen |= (int(b) & 0x7F) << shift
  2572. if b < 0x80 {
  2573. break
  2574. }
  2575. }
  2576. if msglen < 0 {
  2577. return ErrInvalidLengthGenerated
  2578. }
  2579. postIndex := iNdEx + msglen
  2580. if postIndex > l {
  2581. return io.ErrUnexpectedEOF
  2582. }
  2583. m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{})
  2584. if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2585. return err
  2586. }
  2587. iNdEx = postIndex
  2588. case 6:
  2589. if wireType != 2 {
  2590. return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
  2591. }
  2592. var msglen int
  2593. for shift := uint(0); ; shift += 7 {
  2594. if shift >= 64 {
  2595. return ErrIntOverflowGenerated
  2596. }
  2597. if iNdEx >= l {
  2598. return io.ErrUnexpectedEOF
  2599. }
  2600. b := dAtA[iNdEx]
  2601. iNdEx++
  2602. msglen |= (int(b) & 0x7F) << shift
  2603. if b < 0x80 {
  2604. break
  2605. }
  2606. }
  2607. if msglen < 0 {
  2608. return ErrInvalidLengthGenerated
  2609. }
  2610. postIndex := iNdEx + msglen
  2611. if postIndex > l {
  2612. return io.ErrUnexpectedEOF
  2613. }
  2614. m.Conditions = append(m.Conditions, HorizontalPodAutoscalerCondition{})
  2615. if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2616. return err
  2617. }
  2618. iNdEx = postIndex
  2619. default:
  2620. iNdEx = preIndex
  2621. skippy, err := skipGenerated(dAtA[iNdEx:])
  2622. if err != nil {
  2623. return err
  2624. }
  2625. if skippy < 0 {
  2626. return ErrInvalidLengthGenerated
  2627. }
  2628. if (iNdEx + skippy) > l {
  2629. return io.ErrUnexpectedEOF
  2630. }
  2631. iNdEx += skippy
  2632. }
  2633. }
  2634. if iNdEx > l {
  2635. return io.ErrUnexpectedEOF
  2636. }
  2637. return nil
  2638. }
  2639. func (m *MetricSpec) Unmarshal(dAtA []byte) error {
  2640. l := len(dAtA)
  2641. iNdEx := 0
  2642. for iNdEx < l {
  2643. preIndex := iNdEx
  2644. var wire uint64
  2645. for shift := uint(0); ; shift += 7 {
  2646. if shift >= 64 {
  2647. return ErrIntOverflowGenerated
  2648. }
  2649. if iNdEx >= l {
  2650. return io.ErrUnexpectedEOF
  2651. }
  2652. b := dAtA[iNdEx]
  2653. iNdEx++
  2654. wire |= (uint64(b) & 0x7F) << shift
  2655. if b < 0x80 {
  2656. break
  2657. }
  2658. }
  2659. fieldNum := int32(wire >> 3)
  2660. wireType := int(wire & 0x7)
  2661. if wireType == 4 {
  2662. return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
  2663. }
  2664. if fieldNum <= 0 {
  2665. return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  2666. }
  2667. switch fieldNum {
  2668. case 1:
  2669. if wireType != 2 {
  2670. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2671. }
  2672. var stringLen uint64
  2673. for shift := uint(0); ; shift += 7 {
  2674. if shift >= 64 {
  2675. return ErrIntOverflowGenerated
  2676. }
  2677. if iNdEx >= l {
  2678. return io.ErrUnexpectedEOF
  2679. }
  2680. b := dAtA[iNdEx]
  2681. iNdEx++
  2682. stringLen |= (uint64(b) & 0x7F) << shift
  2683. if b < 0x80 {
  2684. break
  2685. }
  2686. }
  2687. intStringLen := int(stringLen)
  2688. if intStringLen < 0 {
  2689. return ErrInvalidLengthGenerated
  2690. }
  2691. postIndex := iNdEx + intStringLen
  2692. if postIndex > l {
  2693. return io.ErrUnexpectedEOF
  2694. }
  2695. m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
  2696. iNdEx = postIndex
  2697. case 2:
  2698. if wireType != 2 {
  2699. return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
  2700. }
  2701. var msglen int
  2702. for shift := uint(0); ; shift += 7 {
  2703. if shift >= 64 {
  2704. return ErrIntOverflowGenerated
  2705. }
  2706. if iNdEx >= l {
  2707. return io.ErrUnexpectedEOF
  2708. }
  2709. b := dAtA[iNdEx]
  2710. iNdEx++
  2711. msglen |= (int(b) & 0x7F) << shift
  2712. if b < 0x80 {
  2713. break
  2714. }
  2715. }
  2716. if msglen < 0 {
  2717. return ErrInvalidLengthGenerated
  2718. }
  2719. postIndex := iNdEx + msglen
  2720. if postIndex > l {
  2721. return io.ErrUnexpectedEOF
  2722. }
  2723. if m.Object == nil {
  2724. m.Object = &ObjectMetricSource{}
  2725. }
  2726. if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2727. return err
  2728. }
  2729. iNdEx = postIndex
  2730. case 3:
  2731. if wireType != 2 {
  2732. return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
  2733. }
  2734. var msglen int
  2735. for shift := uint(0); ; shift += 7 {
  2736. if shift >= 64 {
  2737. return ErrIntOverflowGenerated
  2738. }
  2739. if iNdEx >= l {
  2740. return io.ErrUnexpectedEOF
  2741. }
  2742. b := dAtA[iNdEx]
  2743. iNdEx++
  2744. msglen |= (int(b) & 0x7F) << shift
  2745. if b < 0x80 {
  2746. break
  2747. }
  2748. }
  2749. if msglen < 0 {
  2750. return ErrInvalidLengthGenerated
  2751. }
  2752. postIndex := iNdEx + msglen
  2753. if postIndex > l {
  2754. return io.ErrUnexpectedEOF
  2755. }
  2756. if m.Pods == nil {
  2757. m.Pods = &PodsMetricSource{}
  2758. }
  2759. if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2760. return err
  2761. }
  2762. iNdEx = postIndex
  2763. case 4:
  2764. if wireType != 2 {
  2765. return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
  2766. }
  2767. var msglen int
  2768. for shift := uint(0); ; shift += 7 {
  2769. if shift >= 64 {
  2770. return ErrIntOverflowGenerated
  2771. }
  2772. if iNdEx >= l {
  2773. return io.ErrUnexpectedEOF
  2774. }
  2775. b := dAtA[iNdEx]
  2776. iNdEx++
  2777. msglen |= (int(b) & 0x7F) << shift
  2778. if b < 0x80 {
  2779. break
  2780. }
  2781. }
  2782. if msglen < 0 {
  2783. return ErrInvalidLengthGenerated
  2784. }
  2785. postIndex := iNdEx + msglen
  2786. if postIndex > l {
  2787. return io.ErrUnexpectedEOF
  2788. }
  2789. if m.Resource == nil {
  2790. m.Resource = &ResourceMetricSource{}
  2791. }
  2792. if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2793. return err
  2794. }
  2795. iNdEx = postIndex
  2796. case 5:
  2797. if wireType != 2 {
  2798. return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
  2799. }
  2800. var msglen int
  2801. for shift := uint(0); ; shift += 7 {
  2802. if shift >= 64 {
  2803. return ErrIntOverflowGenerated
  2804. }
  2805. if iNdEx >= l {
  2806. return io.ErrUnexpectedEOF
  2807. }
  2808. b := dAtA[iNdEx]
  2809. iNdEx++
  2810. msglen |= (int(b) & 0x7F) << shift
  2811. if b < 0x80 {
  2812. break
  2813. }
  2814. }
  2815. if msglen < 0 {
  2816. return ErrInvalidLengthGenerated
  2817. }
  2818. postIndex := iNdEx + msglen
  2819. if postIndex > l {
  2820. return io.ErrUnexpectedEOF
  2821. }
  2822. if m.External == nil {
  2823. m.External = &ExternalMetricSource{}
  2824. }
  2825. if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2826. return err
  2827. }
  2828. iNdEx = postIndex
  2829. default:
  2830. iNdEx = preIndex
  2831. skippy, err := skipGenerated(dAtA[iNdEx:])
  2832. if err != nil {
  2833. return err
  2834. }
  2835. if skippy < 0 {
  2836. return ErrInvalidLengthGenerated
  2837. }
  2838. if (iNdEx + skippy) > l {
  2839. return io.ErrUnexpectedEOF
  2840. }
  2841. iNdEx += skippy
  2842. }
  2843. }
  2844. if iNdEx > l {
  2845. return io.ErrUnexpectedEOF
  2846. }
  2847. return nil
  2848. }
  2849. func (m *MetricStatus) Unmarshal(dAtA []byte) error {
  2850. l := len(dAtA)
  2851. iNdEx := 0
  2852. for iNdEx < l {
  2853. preIndex := iNdEx
  2854. var wire uint64
  2855. for shift := uint(0); ; shift += 7 {
  2856. if shift >= 64 {
  2857. return ErrIntOverflowGenerated
  2858. }
  2859. if iNdEx >= l {
  2860. return io.ErrUnexpectedEOF
  2861. }
  2862. b := dAtA[iNdEx]
  2863. iNdEx++
  2864. wire |= (uint64(b) & 0x7F) << shift
  2865. if b < 0x80 {
  2866. break
  2867. }
  2868. }
  2869. fieldNum := int32(wire >> 3)
  2870. wireType := int(wire & 0x7)
  2871. if wireType == 4 {
  2872. return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
  2873. }
  2874. if fieldNum <= 0 {
  2875. return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  2876. }
  2877. switch fieldNum {
  2878. case 1:
  2879. if wireType != 2 {
  2880. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2881. }
  2882. var stringLen uint64
  2883. for shift := uint(0); ; shift += 7 {
  2884. if shift >= 64 {
  2885. return ErrIntOverflowGenerated
  2886. }
  2887. if iNdEx >= l {
  2888. return io.ErrUnexpectedEOF
  2889. }
  2890. b := dAtA[iNdEx]
  2891. iNdEx++
  2892. stringLen |= (uint64(b) & 0x7F) << shift
  2893. if b < 0x80 {
  2894. break
  2895. }
  2896. }
  2897. intStringLen := int(stringLen)
  2898. if intStringLen < 0 {
  2899. return ErrInvalidLengthGenerated
  2900. }
  2901. postIndex := iNdEx + intStringLen
  2902. if postIndex > l {
  2903. return io.ErrUnexpectedEOF
  2904. }
  2905. m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
  2906. iNdEx = postIndex
  2907. case 2:
  2908. if wireType != 2 {
  2909. return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
  2910. }
  2911. var msglen int
  2912. for shift := uint(0); ; shift += 7 {
  2913. if shift >= 64 {
  2914. return ErrIntOverflowGenerated
  2915. }
  2916. if iNdEx >= l {
  2917. return io.ErrUnexpectedEOF
  2918. }
  2919. b := dAtA[iNdEx]
  2920. iNdEx++
  2921. msglen |= (int(b) & 0x7F) << shift
  2922. if b < 0x80 {
  2923. break
  2924. }
  2925. }
  2926. if msglen < 0 {
  2927. return ErrInvalidLengthGenerated
  2928. }
  2929. postIndex := iNdEx + msglen
  2930. if postIndex > l {
  2931. return io.ErrUnexpectedEOF
  2932. }
  2933. if m.Object == nil {
  2934. m.Object = &ObjectMetricStatus{}
  2935. }
  2936. if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2937. return err
  2938. }
  2939. iNdEx = postIndex
  2940. case 3:
  2941. if wireType != 2 {
  2942. return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
  2943. }
  2944. var msglen int
  2945. for shift := uint(0); ; shift += 7 {
  2946. if shift >= 64 {
  2947. return ErrIntOverflowGenerated
  2948. }
  2949. if iNdEx >= l {
  2950. return io.ErrUnexpectedEOF
  2951. }
  2952. b := dAtA[iNdEx]
  2953. iNdEx++
  2954. msglen |= (int(b) & 0x7F) << shift
  2955. if b < 0x80 {
  2956. break
  2957. }
  2958. }
  2959. if msglen < 0 {
  2960. return ErrInvalidLengthGenerated
  2961. }
  2962. postIndex := iNdEx + msglen
  2963. if postIndex > l {
  2964. return io.ErrUnexpectedEOF
  2965. }
  2966. if m.Pods == nil {
  2967. m.Pods = &PodsMetricStatus{}
  2968. }
  2969. if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2970. return err
  2971. }
  2972. iNdEx = postIndex
  2973. case 4:
  2974. if wireType != 2 {
  2975. return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
  2976. }
  2977. var msglen int
  2978. for shift := uint(0); ; shift += 7 {
  2979. if shift >= 64 {
  2980. return ErrIntOverflowGenerated
  2981. }
  2982. if iNdEx >= l {
  2983. return io.ErrUnexpectedEOF
  2984. }
  2985. b := dAtA[iNdEx]
  2986. iNdEx++
  2987. msglen |= (int(b) & 0x7F) << shift
  2988. if b < 0x80 {
  2989. break
  2990. }
  2991. }
  2992. if msglen < 0 {
  2993. return ErrInvalidLengthGenerated
  2994. }
  2995. postIndex := iNdEx + msglen
  2996. if postIndex > l {
  2997. return io.ErrUnexpectedEOF
  2998. }
  2999. if m.Resource == nil {
  3000. m.Resource = &ResourceMetricStatus{}
  3001. }
  3002. if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3003. return err
  3004. }
  3005. iNdEx = postIndex
  3006. case 5:
  3007. if wireType != 2 {
  3008. return fmt.Errorf("proto: wrong wireType = %d for field External", wireType)
  3009. }
  3010. var msglen int
  3011. for shift := uint(0); ; shift += 7 {
  3012. if shift >= 64 {
  3013. return ErrIntOverflowGenerated
  3014. }
  3015. if iNdEx >= l {
  3016. return io.ErrUnexpectedEOF
  3017. }
  3018. b := dAtA[iNdEx]
  3019. iNdEx++
  3020. msglen |= (int(b) & 0x7F) << shift
  3021. if b < 0x80 {
  3022. break
  3023. }
  3024. }
  3025. if msglen < 0 {
  3026. return ErrInvalidLengthGenerated
  3027. }
  3028. postIndex := iNdEx + msglen
  3029. if postIndex > l {
  3030. return io.ErrUnexpectedEOF
  3031. }
  3032. if m.External == nil {
  3033. m.External = &ExternalMetricStatus{}
  3034. }
  3035. if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3036. return err
  3037. }
  3038. iNdEx = postIndex
  3039. default:
  3040. iNdEx = preIndex
  3041. skippy, err := skipGenerated(dAtA[iNdEx:])
  3042. if err != nil {
  3043. return err
  3044. }
  3045. if skippy < 0 {
  3046. return ErrInvalidLengthGenerated
  3047. }
  3048. if (iNdEx + skippy) > l {
  3049. return io.ErrUnexpectedEOF
  3050. }
  3051. iNdEx += skippy
  3052. }
  3053. }
  3054. if iNdEx > l {
  3055. return io.ErrUnexpectedEOF
  3056. }
  3057. return nil
  3058. }
  3059. func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
  3060. l := len(dAtA)
  3061. iNdEx := 0
  3062. for iNdEx < l {
  3063. preIndex := iNdEx
  3064. var wire uint64
  3065. for shift := uint(0); ; shift += 7 {
  3066. if shift >= 64 {
  3067. return ErrIntOverflowGenerated
  3068. }
  3069. if iNdEx >= l {
  3070. return io.ErrUnexpectedEOF
  3071. }
  3072. b := dAtA[iNdEx]
  3073. iNdEx++
  3074. wire |= (uint64(b) & 0x7F) << shift
  3075. if b < 0x80 {
  3076. break
  3077. }
  3078. }
  3079. fieldNum := int32(wire >> 3)
  3080. wireType := int(wire & 0x7)
  3081. if wireType == 4 {
  3082. return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
  3083. }
  3084. if fieldNum <= 0 {
  3085. return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  3086. }
  3087. switch fieldNum {
  3088. case 1:
  3089. if wireType != 2 {
  3090. return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  3091. }
  3092. var msglen int
  3093. for shift := uint(0); ; shift += 7 {
  3094. if shift >= 64 {
  3095. return ErrIntOverflowGenerated
  3096. }
  3097. if iNdEx >= l {
  3098. return io.ErrUnexpectedEOF
  3099. }
  3100. b := dAtA[iNdEx]
  3101. iNdEx++
  3102. msglen |= (int(b) & 0x7F) << shift
  3103. if b < 0x80 {
  3104. break
  3105. }
  3106. }
  3107. if msglen < 0 {
  3108. return ErrInvalidLengthGenerated
  3109. }
  3110. postIndex := iNdEx + msglen
  3111. if postIndex > l {
  3112. return io.ErrUnexpectedEOF
  3113. }
  3114. if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3115. return err
  3116. }
  3117. iNdEx = postIndex
  3118. case 2:
  3119. if wireType != 2 {
  3120. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  3121. }
  3122. var stringLen uint64
  3123. for shift := uint(0); ; shift += 7 {
  3124. if shift >= 64 {
  3125. return ErrIntOverflowGenerated
  3126. }
  3127. if iNdEx >= l {
  3128. return io.ErrUnexpectedEOF
  3129. }
  3130. b := dAtA[iNdEx]
  3131. iNdEx++
  3132. stringLen |= (uint64(b) & 0x7F) << shift
  3133. if b < 0x80 {
  3134. break
  3135. }
  3136. }
  3137. intStringLen := int(stringLen)
  3138. if intStringLen < 0 {
  3139. return ErrInvalidLengthGenerated
  3140. }
  3141. postIndex := iNdEx + intStringLen
  3142. if postIndex > l {
  3143. return io.ErrUnexpectedEOF
  3144. }
  3145. m.MetricName = string(dAtA[iNdEx:postIndex])
  3146. iNdEx = postIndex
  3147. case 3:
  3148. if wireType != 2 {
  3149. return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
  3150. }
  3151. var msglen int
  3152. for shift := uint(0); ; shift += 7 {
  3153. if shift >= 64 {
  3154. return ErrIntOverflowGenerated
  3155. }
  3156. if iNdEx >= l {
  3157. return io.ErrUnexpectedEOF
  3158. }
  3159. b := dAtA[iNdEx]
  3160. iNdEx++
  3161. msglen |= (int(b) & 0x7F) << shift
  3162. if b < 0x80 {
  3163. break
  3164. }
  3165. }
  3166. if msglen < 0 {
  3167. return ErrInvalidLengthGenerated
  3168. }
  3169. postIndex := iNdEx + msglen
  3170. if postIndex > l {
  3171. return io.ErrUnexpectedEOF
  3172. }
  3173. if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3174. return err
  3175. }
  3176. iNdEx = postIndex
  3177. case 4:
  3178. if wireType != 2 {
  3179. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  3180. }
  3181. var msglen int
  3182. for shift := uint(0); ; shift += 7 {
  3183. if shift >= 64 {
  3184. return ErrIntOverflowGenerated
  3185. }
  3186. if iNdEx >= l {
  3187. return io.ErrUnexpectedEOF
  3188. }
  3189. b := dAtA[iNdEx]
  3190. iNdEx++
  3191. msglen |= (int(b) & 0x7F) << shift
  3192. if b < 0x80 {
  3193. break
  3194. }
  3195. }
  3196. if msglen < 0 {
  3197. return ErrInvalidLengthGenerated
  3198. }
  3199. postIndex := iNdEx + msglen
  3200. if postIndex > l {
  3201. return io.ErrUnexpectedEOF
  3202. }
  3203. if m.Selector == nil {
  3204. m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
  3205. }
  3206. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3207. return err
  3208. }
  3209. iNdEx = postIndex
  3210. case 5:
  3211. if wireType != 2 {
  3212. return fmt.Errorf("proto: wrong wireType = %d for field AverageValue", wireType)
  3213. }
  3214. var msglen int
  3215. for shift := uint(0); ; shift += 7 {
  3216. if shift >= 64 {
  3217. return ErrIntOverflowGenerated
  3218. }
  3219. if iNdEx >= l {
  3220. return io.ErrUnexpectedEOF
  3221. }
  3222. b := dAtA[iNdEx]
  3223. iNdEx++
  3224. msglen |= (int(b) & 0x7F) << shift
  3225. if b < 0x80 {
  3226. break
  3227. }
  3228. }
  3229. if msglen < 0 {
  3230. return ErrInvalidLengthGenerated
  3231. }
  3232. postIndex := iNdEx + msglen
  3233. if postIndex > l {
  3234. return io.ErrUnexpectedEOF
  3235. }
  3236. if m.AverageValue == nil {
  3237. m.AverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
  3238. }
  3239. if err := m.AverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3240. return err
  3241. }
  3242. iNdEx = postIndex
  3243. default:
  3244. iNdEx = preIndex
  3245. skippy, err := skipGenerated(dAtA[iNdEx:])
  3246. if err != nil {
  3247. return err
  3248. }
  3249. if skippy < 0 {
  3250. return ErrInvalidLengthGenerated
  3251. }
  3252. if (iNdEx + skippy) > l {
  3253. return io.ErrUnexpectedEOF
  3254. }
  3255. iNdEx += skippy
  3256. }
  3257. }
  3258. if iNdEx > l {
  3259. return io.ErrUnexpectedEOF
  3260. }
  3261. return nil
  3262. }
  3263. func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
  3264. l := len(dAtA)
  3265. iNdEx := 0
  3266. for iNdEx < l {
  3267. preIndex := iNdEx
  3268. var wire uint64
  3269. for shift := uint(0); ; shift += 7 {
  3270. if shift >= 64 {
  3271. return ErrIntOverflowGenerated
  3272. }
  3273. if iNdEx >= l {
  3274. return io.ErrUnexpectedEOF
  3275. }
  3276. b := dAtA[iNdEx]
  3277. iNdEx++
  3278. wire |= (uint64(b) & 0x7F) << shift
  3279. if b < 0x80 {
  3280. break
  3281. }
  3282. }
  3283. fieldNum := int32(wire >> 3)
  3284. wireType := int(wire & 0x7)
  3285. if wireType == 4 {
  3286. return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
  3287. }
  3288. if fieldNum <= 0 {
  3289. return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  3290. }
  3291. switch fieldNum {
  3292. case 1:
  3293. if wireType != 2 {
  3294. return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  3295. }
  3296. var msglen int
  3297. for shift := uint(0); ; shift += 7 {
  3298. if shift >= 64 {
  3299. return ErrIntOverflowGenerated
  3300. }
  3301. if iNdEx >= l {
  3302. return io.ErrUnexpectedEOF
  3303. }
  3304. b := dAtA[iNdEx]
  3305. iNdEx++
  3306. msglen |= (int(b) & 0x7F) << shift
  3307. if b < 0x80 {
  3308. break
  3309. }
  3310. }
  3311. if msglen < 0 {
  3312. return ErrInvalidLengthGenerated
  3313. }
  3314. postIndex := iNdEx + msglen
  3315. if postIndex > l {
  3316. return io.ErrUnexpectedEOF
  3317. }
  3318. if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3319. return err
  3320. }
  3321. iNdEx = postIndex
  3322. case 2:
  3323. if wireType != 2 {
  3324. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  3325. }
  3326. var stringLen uint64
  3327. for shift := uint(0); ; shift += 7 {
  3328. if shift >= 64 {
  3329. return ErrIntOverflowGenerated
  3330. }
  3331. if iNdEx >= l {
  3332. return io.ErrUnexpectedEOF
  3333. }
  3334. b := dAtA[iNdEx]
  3335. iNdEx++
  3336. stringLen |= (uint64(b) & 0x7F) << shift
  3337. if b < 0x80 {
  3338. break
  3339. }
  3340. }
  3341. intStringLen := int(stringLen)
  3342. if intStringLen < 0 {
  3343. return ErrInvalidLengthGenerated
  3344. }
  3345. postIndex := iNdEx + intStringLen
  3346. if postIndex > l {
  3347. return io.ErrUnexpectedEOF
  3348. }
  3349. m.MetricName = string(dAtA[iNdEx:postIndex])
  3350. iNdEx = postIndex
  3351. case 3:
  3352. if wireType != 2 {
  3353. return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
  3354. }
  3355. var msglen int
  3356. for shift := uint(0); ; shift += 7 {
  3357. if shift >= 64 {
  3358. return ErrIntOverflowGenerated
  3359. }
  3360. if iNdEx >= l {
  3361. return io.ErrUnexpectedEOF
  3362. }
  3363. b := dAtA[iNdEx]
  3364. iNdEx++
  3365. msglen |= (int(b) & 0x7F) << shift
  3366. if b < 0x80 {
  3367. break
  3368. }
  3369. }
  3370. if msglen < 0 {
  3371. return ErrInvalidLengthGenerated
  3372. }
  3373. postIndex := iNdEx + msglen
  3374. if postIndex > l {
  3375. return io.ErrUnexpectedEOF
  3376. }
  3377. if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3378. return err
  3379. }
  3380. iNdEx = postIndex
  3381. case 4:
  3382. if wireType != 2 {
  3383. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  3384. }
  3385. var msglen int
  3386. for shift := uint(0); ; shift += 7 {
  3387. if shift >= 64 {
  3388. return ErrIntOverflowGenerated
  3389. }
  3390. if iNdEx >= l {
  3391. return io.ErrUnexpectedEOF
  3392. }
  3393. b := dAtA[iNdEx]
  3394. iNdEx++
  3395. msglen |= (int(b) & 0x7F) << shift
  3396. if b < 0x80 {
  3397. break
  3398. }
  3399. }
  3400. if msglen < 0 {
  3401. return ErrInvalidLengthGenerated
  3402. }
  3403. postIndex := iNdEx + msglen
  3404. if postIndex > l {
  3405. return io.ErrUnexpectedEOF
  3406. }
  3407. if m.Selector == nil {
  3408. m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
  3409. }
  3410. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3411. return err
  3412. }
  3413. iNdEx = postIndex
  3414. case 5:
  3415. if wireType != 2 {
  3416. return fmt.Errorf("proto: wrong wireType = %d for field AverageValue", wireType)
  3417. }
  3418. var msglen int
  3419. for shift := uint(0); ; shift += 7 {
  3420. if shift >= 64 {
  3421. return ErrIntOverflowGenerated
  3422. }
  3423. if iNdEx >= l {
  3424. return io.ErrUnexpectedEOF
  3425. }
  3426. b := dAtA[iNdEx]
  3427. iNdEx++
  3428. msglen |= (int(b) & 0x7F) << shift
  3429. if b < 0x80 {
  3430. break
  3431. }
  3432. }
  3433. if msglen < 0 {
  3434. return ErrInvalidLengthGenerated
  3435. }
  3436. postIndex := iNdEx + msglen
  3437. if postIndex > l {
  3438. return io.ErrUnexpectedEOF
  3439. }
  3440. if m.AverageValue == nil {
  3441. m.AverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
  3442. }
  3443. if err := m.AverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3444. return err
  3445. }
  3446. iNdEx = postIndex
  3447. default:
  3448. iNdEx = preIndex
  3449. skippy, err := skipGenerated(dAtA[iNdEx:])
  3450. if err != nil {
  3451. return err
  3452. }
  3453. if skippy < 0 {
  3454. return ErrInvalidLengthGenerated
  3455. }
  3456. if (iNdEx + skippy) > l {
  3457. return io.ErrUnexpectedEOF
  3458. }
  3459. iNdEx += skippy
  3460. }
  3461. }
  3462. if iNdEx > l {
  3463. return io.ErrUnexpectedEOF
  3464. }
  3465. return nil
  3466. }
  3467. func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
  3468. l := len(dAtA)
  3469. iNdEx := 0
  3470. for iNdEx < l {
  3471. preIndex := iNdEx
  3472. var wire uint64
  3473. for shift := uint(0); ; shift += 7 {
  3474. if shift >= 64 {
  3475. return ErrIntOverflowGenerated
  3476. }
  3477. if iNdEx >= l {
  3478. return io.ErrUnexpectedEOF
  3479. }
  3480. b := dAtA[iNdEx]
  3481. iNdEx++
  3482. wire |= (uint64(b) & 0x7F) << shift
  3483. if b < 0x80 {
  3484. break
  3485. }
  3486. }
  3487. fieldNum := int32(wire >> 3)
  3488. wireType := int(wire & 0x7)
  3489. if wireType == 4 {
  3490. return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
  3491. }
  3492. if fieldNum <= 0 {
  3493. return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  3494. }
  3495. switch fieldNum {
  3496. case 1:
  3497. if wireType != 2 {
  3498. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  3499. }
  3500. var stringLen uint64
  3501. for shift := uint(0); ; shift += 7 {
  3502. if shift >= 64 {
  3503. return ErrIntOverflowGenerated
  3504. }
  3505. if iNdEx >= l {
  3506. return io.ErrUnexpectedEOF
  3507. }
  3508. b := dAtA[iNdEx]
  3509. iNdEx++
  3510. stringLen |= (uint64(b) & 0x7F) << shift
  3511. if b < 0x80 {
  3512. break
  3513. }
  3514. }
  3515. intStringLen := int(stringLen)
  3516. if intStringLen < 0 {
  3517. return ErrInvalidLengthGenerated
  3518. }
  3519. postIndex := iNdEx + intStringLen
  3520. if postIndex > l {
  3521. return io.ErrUnexpectedEOF
  3522. }
  3523. m.MetricName = string(dAtA[iNdEx:postIndex])
  3524. iNdEx = postIndex
  3525. case 2:
  3526. if wireType != 2 {
  3527. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  3528. }
  3529. var msglen int
  3530. for shift := uint(0); ; shift += 7 {
  3531. if shift >= 64 {
  3532. return ErrIntOverflowGenerated
  3533. }
  3534. if iNdEx >= l {
  3535. return io.ErrUnexpectedEOF
  3536. }
  3537. b := dAtA[iNdEx]
  3538. iNdEx++
  3539. msglen |= (int(b) & 0x7F) << shift
  3540. if b < 0x80 {
  3541. break
  3542. }
  3543. }
  3544. if msglen < 0 {
  3545. return ErrInvalidLengthGenerated
  3546. }
  3547. postIndex := iNdEx + msglen
  3548. if postIndex > l {
  3549. return io.ErrUnexpectedEOF
  3550. }
  3551. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3552. return err
  3553. }
  3554. iNdEx = postIndex
  3555. case 3:
  3556. if wireType != 2 {
  3557. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  3558. }
  3559. var msglen int
  3560. for shift := uint(0); ; shift += 7 {
  3561. if shift >= 64 {
  3562. return ErrIntOverflowGenerated
  3563. }
  3564. if iNdEx >= l {
  3565. return io.ErrUnexpectedEOF
  3566. }
  3567. b := dAtA[iNdEx]
  3568. iNdEx++
  3569. msglen |= (int(b) & 0x7F) << shift
  3570. if b < 0x80 {
  3571. break
  3572. }
  3573. }
  3574. if msglen < 0 {
  3575. return ErrInvalidLengthGenerated
  3576. }
  3577. postIndex := iNdEx + msglen
  3578. if postIndex > l {
  3579. return io.ErrUnexpectedEOF
  3580. }
  3581. if m.Selector == nil {
  3582. m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
  3583. }
  3584. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3585. return err
  3586. }
  3587. iNdEx = postIndex
  3588. default:
  3589. iNdEx = preIndex
  3590. skippy, err := skipGenerated(dAtA[iNdEx:])
  3591. if err != nil {
  3592. return err
  3593. }
  3594. if skippy < 0 {
  3595. return ErrInvalidLengthGenerated
  3596. }
  3597. if (iNdEx + skippy) > l {
  3598. return io.ErrUnexpectedEOF
  3599. }
  3600. iNdEx += skippy
  3601. }
  3602. }
  3603. if iNdEx > l {
  3604. return io.ErrUnexpectedEOF
  3605. }
  3606. return nil
  3607. }
  3608. func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
  3609. l := len(dAtA)
  3610. iNdEx := 0
  3611. for iNdEx < l {
  3612. preIndex := iNdEx
  3613. var wire uint64
  3614. for shift := uint(0); ; shift += 7 {
  3615. if shift >= 64 {
  3616. return ErrIntOverflowGenerated
  3617. }
  3618. if iNdEx >= l {
  3619. return io.ErrUnexpectedEOF
  3620. }
  3621. b := dAtA[iNdEx]
  3622. iNdEx++
  3623. wire |= (uint64(b) & 0x7F) << shift
  3624. if b < 0x80 {
  3625. break
  3626. }
  3627. }
  3628. fieldNum := int32(wire >> 3)
  3629. wireType := int(wire & 0x7)
  3630. if wireType == 4 {
  3631. return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
  3632. }
  3633. if fieldNum <= 0 {
  3634. return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  3635. }
  3636. switch fieldNum {
  3637. case 1:
  3638. if wireType != 2 {
  3639. return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
  3640. }
  3641. var stringLen uint64
  3642. for shift := uint(0); ; shift += 7 {
  3643. if shift >= 64 {
  3644. return ErrIntOverflowGenerated
  3645. }
  3646. if iNdEx >= l {
  3647. return io.ErrUnexpectedEOF
  3648. }
  3649. b := dAtA[iNdEx]
  3650. iNdEx++
  3651. stringLen |= (uint64(b) & 0x7F) << shift
  3652. if b < 0x80 {
  3653. break
  3654. }
  3655. }
  3656. intStringLen := int(stringLen)
  3657. if intStringLen < 0 {
  3658. return ErrInvalidLengthGenerated
  3659. }
  3660. postIndex := iNdEx + intStringLen
  3661. if postIndex > l {
  3662. return io.ErrUnexpectedEOF
  3663. }
  3664. m.MetricName = string(dAtA[iNdEx:postIndex])
  3665. iNdEx = postIndex
  3666. case 2:
  3667. if wireType != 2 {
  3668. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  3669. }
  3670. var msglen int
  3671. for shift := uint(0); ; shift += 7 {
  3672. if shift >= 64 {
  3673. return ErrIntOverflowGenerated
  3674. }
  3675. if iNdEx >= l {
  3676. return io.ErrUnexpectedEOF
  3677. }
  3678. b := dAtA[iNdEx]
  3679. iNdEx++
  3680. msglen |= (int(b) & 0x7F) << shift
  3681. if b < 0x80 {
  3682. break
  3683. }
  3684. }
  3685. if msglen < 0 {
  3686. return ErrInvalidLengthGenerated
  3687. }
  3688. postIndex := iNdEx + msglen
  3689. if postIndex > l {
  3690. return io.ErrUnexpectedEOF
  3691. }
  3692. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3693. return err
  3694. }
  3695. iNdEx = postIndex
  3696. case 3:
  3697. if wireType != 2 {
  3698. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  3699. }
  3700. var msglen int
  3701. for shift := uint(0); ; shift += 7 {
  3702. if shift >= 64 {
  3703. return ErrIntOverflowGenerated
  3704. }
  3705. if iNdEx >= l {
  3706. return io.ErrUnexpectedEOF
  3707. }
  3708. b := dAtA[iNdEx]
  3709. iNdEx++
  3710. msglen |= (int(b) & 0x7F) << shift
  3711. if b < 0x80 {
  3712. break
  3713. }
  3714. }
  3715. if msglen < 0 {
  3716. return ErrInvalidLengthGenerated
  3717. }
  3718. postIndex := iNdEx + msglen
  3719. if postIndex > l {
  3720. return io.ErrUnexpectedEOF
  3721. }
  3722. if m.Selector == nil {
  3723. m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
  3724. }
  3725. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3726. return err
  3727. }
  3728. iNdEx = postIndex
  3729. default:
  3730. iNdEx = preIndex
  3731. skippy, err := skipGenerated(dAtA[iNdEx:])
  3732. if err != nil {
  3733. return err
  3734. }
  3735. if skippy < 0 {
  3736. return ErrInvalidLengthGenerated
  3737. }
  3738. if (iNdEx + skippy) > l {
  3739. return io.ErrUnexpectedEOF
  3740. }
  3741. iNdEx += skippy
  3742. }
  3743. }
  3744. if iNdEx > l {
  3745. return io.ErrUnexpectedEOF
  3746. }
  3747. return nil
  3748. }
  3749. func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
  3750. l := len(dAtA)
  3751. iNdEx := 0
  3752. for iNdEx < l {
  3753. preIndex := iNdEx
  3754. var wire uint64
  3755. for shift := uint(0); ; shift += 7 {
  3756. if shift >= 64 {
  3757. return ErrIntOverflowGenerated
  3758. }
  3759. if iNdEx >= l {
  3760. return io.ErrUnexpectedEOF
  3761. }
  3762. b := dAtA[iNdEx]
  3763. iNdEx++
  3764. wire |= (uint64(b) & 0x7F) << shift
  3765. if b < 0x80 {
  3766. break
  3767. }
  3768. }
  3769. fieldNum := int32(wire >> 3)
  3770. wireType := int(wire & 0x7)
  3771. if wireType == 4 {
  3772. return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
  3773. }
  3774. if fieldNum <= 0 {
  3775. return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
  3776. }
  3777. switch fieldNum {
  3778. case 1:
  3779. if wireType != 2 {
  3780. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3781. }
  3782. var stringLen uint64
  3783. for shift := uint(0); ; shift += 7 {
  3784. if shift >= 64 {
  3785. return ErrIntOverflowGenerated
  3786. }
  3787. if iNdEx >= l {
  3788. return io.ErrUnexpectedEOF
  3789. }
  3790. b := dAtA[iNdEx]
  3791. iNdEx++
  3792. stringLen |= (uint64(b) & 0x7F) << shift
  3793. if b < 0x80 {
  3794. break
  3795. }
  3796. }
  3797. intStringLen := int(stringLen)
  3798. if intStringLen < 0 {
  3799. return ErrInvalidLengthGenerated
  3800. }
  3801. postIndex := iNdEx + intStringLen
  3802. if postIndex > l {
  3803. return io.ErrUnexpectedEOF
  3804. }
  3805. m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
  3806. iNdEx = postIndex
  3807. case 2:
  3808. if wireType != 0 {
  3809. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
  3810. }
  3811. var v int32
  3812. for shift := uint(0); ; shift += 7 {
  3813. if shift >= 64 {
  3814. return ErrIntOverflowGenerated
  3815. }
  3816. if iNdEx >= l {
  3817. return io.ErrUnexpectedEOF
  3818. }
  3819. b := dAtA[iNdEx]
  3820. iNdEx++
  3821. v |= (int32(b) & 0x7F) << shift
  3822. if b < 0x80 {
  3823. break
  3824. }
  3825. }
  3826. m.TargetAverageUtilization = &v
  3827. case 3:
  3828. if wireType != 2 {
  3829. return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
  3830. }
  3831. var msglen int
  3832. for shift := uint(0); ; shift += 7 {
  3833. if shift >= 64 {
  3834. return ErrIntOverflowGenerated
  3835. }
  3836. if iNdEx >= l {
  3837. return io.ErrUnexpectedEOF
  3838. }
  3839. b := dAtA[iNdEx]
  3840. iNdEx++
  3841. msglen |= (int(b) & 0x7F) << shift
  3842. if b < 0x80 {
  3843. break
  3844. }
  3845. }
  3846. if msglen < 0 {
  3847. return ErrInvalidLengthGenerated
  3848. }
  3849. postIndex := iNdEx + msglen
  3850. if postIndex > l {
  3851. return io.ErrUnexpectedEOF
  3852. }
  3853. if m.TargetAverageValue == nil {
  3854. m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
  3855. }
  3856. if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3857. return err
  3858. }
  3859. iNdEx = postIndex
  3860. default:
  3861. iNdEx = preIndex
  3862. skippy, err := skipGenerated(dAtA[iNdEx:])
  3863. if err != nil {
  3864. return err
  3865. }
  3866. if skippy < 0 {
  3867. return ErrInvalidLengthGenerated
  3868. }
  3869. if (iNdEx + skippy) > l {
  3870. return io.ErrUnexpectedEOF
  3871. }
  3872. iNdEx += skippy
  3873. }
  3874. }
  3875. if iNdEx > l {
  3876. return io.ErrUnexpectedEOF
  3877. }
  3878. return nil
  3879. }
  3880. func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
  3881. l := len(dAtA)
  3882. iNdEx := 0
  3883. for iNdEx < l {
  3884. preIndex := iNdEx
  3885. var wire uint64
  3886. for shift := uint(0); ; shift += 7 {
  3887. if shift >= 64 {
  3888. return ErrIntOverflowGenerated
  3889. }
  3890. if iNdEx >= l {
  3891. return io.ErrUnexpectedEOF
  3892. }
  3893. b := dAtA[iNdEx]
  3894. iNdEx++
  3895. wire |= (uint64(b) & 0x7F) << shift
  3896. if b < 0x80 {
  3897. break
  3898. }
  3899. }
  3900. fieldNum := int32(wire >> 3)
  3901. wireType := int(wire & 0x7)
  3902. if wireType == 4 {
  3903. return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
  3904. }
  3905. if fieldNum <= 0 {
  3906. return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  3907. }
  3908. switch fieldNum {
  3909. case 1:
  3910. if wireType != 2 {
  3911. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3912. }
  3913. var stringLen uint64
  3914. for shift := uint(0); ; shift += 7 {
  3915. if shift >= 64 {
  3916. return ErrIntOverflowGenerated
  3917. }
  3918. if iNdEx >= l {
  3919. return io.ErrUnexpectedEOF
  3920. }
  3921. b := dAtA[iNdEx]
  3922. iNdEx++
  3923. stringLen |= (uint64(b) & 0x7F) << shift
  3924. if b < 0x80 {
  3925. break
  3926. }
  3927. }
  3928. intStringLen := int(stringLen)
  3929. if intStringLen < 0 {
  3930. return ErrInvalidLengthGenerated
  3931. }
  3932. postIndex := iNdEx + intStringLen
  3933. if postIndex > l {
  3934. return io.ErrUnexpectedEOF
  3935. }
  3936. m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
  3937. iNdEx = postIndex
  3938. case 2:
  3939. if wireType != 0 {
  3940. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
  3941. }
  3942. var v int32
  3943. for shift := uint(0); ; shift += 7 {
  3944. if shift >= 64 {
  3945. return ErrIntOverflowGenerated
  3946. }
  3947. if iNdEx >= l {
  3948. return io.ErrUnexpectedEOF
  3949. }
  3950. b := dAtA[iNdEx]
  3951. iNdEx++
  3952. v |= (int32(b) & 0x7F) << shift
  3953. if b < 0x80 {
  3954. break
  3955. }
  3956. }
  3957. m.CurrentAverageUtilization = &v
  3958. case 3:
  3959. if wireType != 2 {
  3960. return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
  3961. }
  3962. var msglen int
  3963. for shift := uint(0); ; shift += 7 {
  3964. if shift >= 64 {
  3965. return ErrIntOverflowGenerated
  3966. }
  3967. if iNdEx >= l {
  3968. return io.ErrUnexpectedEOF
  3969. }
  3970. b := dAtA[iNdEx]
  3971. iNdEx++
  3972. msglen |= (int(b) & 0x7F) << shift
  3973. if b < 0x80 {
  3974. break
  3975. }
  3976. }
  3977. if msglen < 0 {
  3978. return ErrInvalidLengthGenerated
  3979. }
  3980. postIndex := iNdEx + msglen
  3981. if postIndex > l {
  3982. return io.ErrUnexpectedEOF
  3983. }
  3984. if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3985. return err
  3986. }
  3987. iNdEx = postIndex
  3988. default:
  3989. iNdEx = preIndex
  3990. skippy, err := skipGenerated(dAtA[iNdEx:])
  3991. if err != nil {
  3992. return err
  3993. }
  3994. if skippy < 0 {
  3995. return ErrInvalidLengthGenerated
  3996. }
  3997. if (iNdEx + skippy) > l {
  3998. return io.ErrUnexpectedEOF
  3999. }
  4000. iNdEx += skippy
  4001. }
  4002. }
  4003. if iNdEx > l {
  4004. return io.ErrUnexpectedEOF
  4005. }
  4006. return nil
  4007. }
  4008. func skipGenerated(dAtA []byte) (n int, err error) {
  4009. l := len(dAtA)
  4010. iNdEx := 0
  4011. for iNdEx < l {
  4012. var wire uint64
  4013. for shift := uint(0); ; shift += 7 {
  4014. if shift >= 64 {
  4015. return 0, ErrIntOverflowGenerated
  4016. }
  4017. if iNdEx >= l {
  4018. return 0, io.ErrUnexpectedEOF
  4019. }
  4020. b := dAtA[iNdEx]
  4021. iNdEx++
  4022. wire |= (uint64(b) & 0x7F) << shift
  4023. if b < 0x80 {
  4024. break
  4025. }
  4026. }
  4027. wireType := int(wire & 0x7)
  4028. switch wireType {
  4029. case 0:
  4030. for shift := uint(0); ; shift += 7 {
  4031. if shift >= 64 {
  4032. return 0, ErrIntOverflowGenerated
  4033. }
  4034. if iNdEx >= l {
  4035. return 0, io.ErrUnexpectedEOF
  4036. }
  4037. iNdEx++
  4038. if dAtA[iNdEx-1] < 0x80 {
  4039. break
  4040. }
  4041. }
  4042. return iNdEx, nil
  4043. case 1:
  4044. iNdEx += 8
  4045. return iNdEx, nil
  4046. case 2:
  4047. var length int
  4048. for shift := uint(0); ; shift += 7 {
  4049. if shift >= 64 {
  4050. return 0, ErrIntOverflowGenerated
  4051. }
  4052. if iNdEx >= l {
  4053. return 0, io.ErrUnexpectedEOF
  4054. }
  4055. b := dAtA[iNdEx]
  4056. iNdEx++
  4057. length |= (int(b) & 0x7F) << shift
  4058. if b < 0x80 {
  4059. break
  4060. }
  4061. }
  4062. iNdEx += length
  4063. if length < 0 {
  4064. return 0, ErrInvalidLengthGenerated
  4065. }
  4066. return iNdEx, nil
  4067. case 3:
  4068. for {
  4069. var innerWire uint64
  4070. var start int = iNdEx
  4071. for shift := uint(0); ; shift += 7 {
  4072. if shift >= 64 {
  4073. return 0, ErrIntOverflowGenerated
  4074. }
  4075. if iNdEx >= l {
  4076. return 0, io.ErrUnexpectedEOF
  4077. }
  4078. b := dAtA[iNdEx]
  4079. iNdEx++
  4080. innerWire |= (uint64(b) & 0x7F) << shift
  4081. if b < 0x80 {
  4082. break
  4083. }
  4084. }
  4085. innerWireType := int(innerWire & 0x7)
  4086. if innerWireType == 4 {
  4087. break
  4088. }
  4089. next, err := skipGenerated(dAtA[start:])
  4090. if err != nil {
  4091. return 0, err
  4092. }
  4093. iNdEx = start + next
  4094. }
  4095. return iNdEx, nil
  4096. case 4:
  4097. return iNdEx, nil
  4098. case 5:
  4099. iNdEx += 4
  4100. return iNdEx, nil
  4101. default:
  4102. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4103. }
  4104. }
  4105. panic("unreachable")
  4106. }
  4107. var (
  4108. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  4109. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  4110. )
  4111. func init() {
  4112. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptorGenerated)
  4113. }
  4114. var fileDescriptorGenerated = []byte{
  4115. // 1475 bytes of a gzipped FileDescriptorProto
  4116. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcb, 0x8f, 0x1b, 0x45,
  4117. 0x13, 0x5f, 0x3f, 0x76, 0xb3, 0x69, 0x6f, 0x76, 0xf7, 0xeb, 0x44, 0x89, 0xb3, 0xf9, 0x62, 0xaf,
  4118. 0x2c, 0x84, 0x42, 0x44, 0x66, 0x12, 0xb3, 0x3c, 0x24, 0x84, 0xc4, 0xda, 0x40, 0x12, 0xb1, 0x4e,
  4119. 0x42, 0xef, 0x26, 0x42, 0x90, 0x20, 0xda, 0x33, 0x1d, 0x6f, 0xb3, 0x9e, 0x19, 0x6b, 0xba, 0x6d,
  4120. 0x65, 0x83, 0x90, 0xb8, 0x70, 0xe7, 0x02, 0x67, 0x90, 0x38, 0x21, 0xb8, 0xc2, 0x99, 0x5b, 0x8e,
  4121. 0x39, 0x26, 0x02, 0x59, 0x64, 0xf8, 0x2f, 0x72, 0x42, 0xfd, 0x98, 0xf1, 0x8c, 0x1f, 0x6b, 0xc7,
  4122. 0x38, 0xe1, 0x71, 0x9b, 0xee, 0xaa, 0xfa, 0x55, 0x4f, 0xfd, 0xaa, 0xab, 0xbb, 0x1a, 0x5c, 0xdc,
  4123. 0x7b, 0x8d, 0x19, 0xd4, 0x33, 0xf7, 0xda, 0x75, 0xe2, 0xbb, 0x84, 0x13, 0x66, 0x76, 0x88, 0x6b,
  4124. 0x7b, 0xbe, 0xa9, 0x05, 0xb8, 0x45, 0x4d, 0xdc, 0xe6, 0x1e, 0xb3, 0x70, 0x93, 0xba, 0x0d, 0xb3,
  4125. 0x53, 0xae, 0x13, 0x8e, 0x2f, 0x98, 0x0d, 0xe2, 0x12, 0x1f, 0x73, 0x62, 0x1b, 0x2d, 0xdf, 0xe3,
  4126. 0x1e, 0x2c, 0x28, 0x7d, 0x03, 0xb7, 0xa8, 0x11, 0xd3, 0x37, 0xb4, 0xfe, 0xda, 0xb9, 0x06, 0xe5,
  4127. 0xbb, 0xed, 0xba, 0x61, 0x79, 0x8e, 0xd9, 0xf0, 0x1a, 0x9e, 0x29, 0xcd, 0xea, 0xed, 0xdb, 0x72,
  4128. 0x24, 0x07, 0xf2, 0x4b, 0xc1, 0xad, 0x95, 0x62, 0xee, 0x2d, 0xcf, 0x27, 0x66, 0x67, 0xc0, 0xe5,
  4129. 0xda, 0x46, 0x4f, 0xc7, 0xc1, 0xd6, 0x2e, 0x75, 0x89, 0xbf, 0x6f, 0xb6, 0xf6, 0x1a, 0xd2, 0xc8,
  4130. 0x27, 0xcc, 0x6b, 0xfb, 0x16, 0x79, 0x22, 0x2b, 0x66, 0x3a, 0x84, 0xe3, 0x61, 0xbe, 0xcc, 0x51,
  4131. 0x56, 0x7e, 0xdb, 0xe5, 0xd4, 0x19, 0x74, 0xf3, 0xca, 0x38, 0x03, 0x66, 0xed, 0x12, 0x07, 0xf7,
  4132. 0xdb, 0x95, 0xbe, 0x4a, 0x81, 0x53, 0x55, 0xdf, 0x63, 0xec, 0x06, 0xf1, 0x19, 0xf5, 0xdc, 0xab,
  4133. 0xf5, 0x4f, 0x88, 0xc5, 0x11, 0xb9, 0x4d, 0x7c, 0xe2, 0x5a, 0x04, 0xae, 0x83, 0xec, 0x1e, 0x75,
  4134. 0xed, 0x7c, 0x6a, 0x3d, 0x75, 0xe6, 0x70, 0x65, 0xe9, 0x5e, 0xb7, 0x38, 0x17, 0x74, 0x8b, 0xd9,
  4135. 0x77, 0xa9, 0x6b, 0x23, 0x29, 0x11, 0x1a, 0x2e, 0x76, 0x48, 0x3e, 0x9d, 0xd4, 0xb8, 0x82, 0x1d,
  4136. 0x82, 0xa4, 0x04, 0x96, 0x01, 0xc0, 0x2d, 0xaa, 0x1d, 0xe4, 0x33, 0x52, 0x0f, 0x6a, 0x3d, 0xb0,
  4137. 0x79, 0xed, 0xb2, 0x96, 0xa0, 0x98, 0x56, 0xe9, 0xeb, 0x0c, 0x38, 0xf6, 0xf6, 0x1d, 0x4e, 0x7c,
  4138. 0x17, 0x37, 0x6b, 0x84, 0xfb, 0xd4, 0xda, 0x96, 0xf1, 0x15, 0x60, 0x8e, 0x1c, 0x0b, 0x07, 0x7a,
  4139. 0x59, 0x11, 0x58, 0x2d, 0x92, 0xa0, 0x98, 0x16, 0xf4, 0xc0, 0xb2, 0x1a, 0x6d, 0x93, 0x26, 0xb1,
  4140. 0xb8, 0xe7, 0xcb, 0xc5, 0xe6, 0xca, 0x2f, 0x19, 0xbd, 0x2c, 0x8a, 0xa2, 0x66, 0xb4, 0xf6, 0x1a,
  4141. 0x62, 0x82, 0x19, 0x82, 0x1c, 0xa3, 0x73, 0xc1, 0xd8, 0xc2, 0x75, 0xd2, 0x0c, 0x4d, 0x2b, 0x30,
  4142. 0xe8, 0x16, 0x97, 0x6b, 0x09, 0x38, 0xd4, 0x07, 0x0f, 0x31, 0xc8, 0x71, 0xec, 0x37, 0x08, 0xbf,
  4143. 0x81, 0x9b, 0x6d, 0x22, 0x7f, 0x39, 0x57, 0x36, 0x0e, 0xf2, 0x66, 0x84, 0x09, 0x64, 0xbc, 0xd7,
  4144. 0xc6, 0x2e, 0xa7, 0x7c, 0xbf, 0xb2, 0x12, 0x74, 0x8b, 0xb9, 0x9d, 0x1e, 0x0c, 0x8a, 0x63, 0xc2,
  4145. 0x0e, 0x80, 0x6a, 0xb8, 0xd9, 0x21, 0x3e, 0x6e, 0x10, 0xe5, 0x29, 0x3b, 0x95, 0xa7, 0xe3, 0x41,
  4146. 0xb7, 0x08, 0x77, 0x06, 0xd0, 0xd0, 0x10, 0x0f, 0xa5, 0x6f, 0x06, 0x89, 0xe1, 0x98, 0xb7, 0xd9,
  4147. 0xbf, 0x83, 0x98, 0x5d, 0xb0, 0x64, 0xb5, 0x7d, 0x9f, 0xb8, 0x7f, 0x89, 0x99, 0x63, 0xfa, 0xb7,
  4148. 0x96, 0xaa, 0x31, 0x2c, 0x94, 0x40, 0x86, 0xfb, 0xe0, 0xa8, 0x1e, 0xcf, 0x80, 0xa0, 0x13, 0x41,
  4149. 0xb7, 0x78, 0xb4, 0x3a, 0x08, 0x87, 0x86, 0xf9, 0x28, 0xfd, 0x92, 0x06, 0x27, 0x2e, 0x79, 0x3e,
  4150. 0xbd, 0xeb, 0xb9, 0x1c, 0x37, 0xaf, 0x79, 0xf6, 0xa6, 0x2e, 0x90, 0xc4, 0x87, 0x1f, 0x83, 0x45,
  4151. 0x11, 0x3d, 0x1b, 0x73, 0x2c, 0x39, 0xca, 0x95, 0xcf, 0x4f, 0x16, 0x6b, 0x55, 0x18, 0x6a, 0x84,
  4152. 0xe3, 0x1e, 0xab, 0xbd, 0x39, 0x14, 0xa1, 0xc2, 0x5b, 0x20, 0xcb, 0x5a, 0xc4, 0xd2, 0x4c, 0xbe,
  4153. 0x6e, 0x1c, 0x5c, 0xa8, 0x8d, 0x11, 0x0b, 0xdd, 0x6e, 0x11, 0xab, 0x57, 0x4c, 0xc4, 0x08, 0x49,
  4154. 0x58, 0x48, 0xc0, 0x02, 0x93, 0x09, 0xa7, 0xb9, 0x7b, 0x63, 0x5a, 0x07, 0x12, 0xa4, 0xb2, 0xac,
  4155. 0x5d, 0x2c, 0xa8, 0x31, 0xd2, 0xe0, 0xa5, 0x2f, 0x32, 0x60, 0x7d, 0x84, 0x65, 0xd5, 0x73, 0x6d,
  4156. 0xca, 0xa9, 0xe7, 0xc2, 0x4b, 0x20, 0xcb, 0xf7, 0x5b, 0x61, 0xb2, 0x6f, 0x84, 0xab, 0xdd, 0xd9,
  4157. 0x6f, 0x91, 0xc7, 0xdd, 0xe2, 0x73, 0xe3, 0xec, 0x85, 0x1e, 0x92, 0x08, 0x70, 0x2b, 0xfa, 0xab,
  4158. 0x74, 0x02, 0x4b, 0x2f, 0xeb, 0x71, 0xb7, 0x38, 0xe4, 0x84, 0x32, 0x22, 0xa4, 0xe4, 0xe2, 0x45,
  4159. 0x6d, 0x68, 0x62, 0xc6, 0x77, 0x7c, 0xec, 0x32, 0xe5, 0x89, 0x3a, 0x61, 0xae, 0x9f, 0x9d, 0x8c,
  4160. 0x6e, 0x61, 0x51, 0x59, 0xd3, 0xab, 0x80, 0x5b, 0x03, 0x68, 0x68, 0x88, 0x07, 0xf8, 0x3c, 0x58,
  4161. 0xf0, 0x09, 0x66, 0x9e, 0x2b, 0xd3, 0xfc, 0x70, 0x2f, 0xb8, 0x48, 0xce, 0x22, 0x2d, 0x85, 0x2f,
  4162. 0x80, 0x43, 0x0e, 0x61, 0x0c, 0x37, 0x48, 0x7e, 0x5e, 0x2a, 0xae, 0x68, 0xc5, 0x43, 0x35, 0x35,
  4163. 0x8d, 0x42, 0x79, 0xe9, 0x61, 0x0a, 0x9c, 0x1a, 0x11, 0xc7, 0x2d, 0xca, 0x38, 0xbc, 0x39, 0x90,
  4164. 0xcf, 0xc6, 0x84, 0xb5, 0x83, 0x32, 0x95, 0xcd, 0xab, 0xda, 0xf7, 0x62, 0x38, 0x13, 0xcb, 0xe5,
  4165. 0x9b, 0x60, 0x9e, 0x72, 0xe2, 0x08, 0x56, 0x32, 0x67, 0x72, 0xe5, 0x57, 0xa7, 0xcc, 0xb5, 0xca,
  4166. 0x11, 0xed, 0x63, 0xfe, 0xb2, 0x40, 0x43, 0x0a, 0xb4, 0xf4, 0x6b, 0x7a, 0xe4, 0xbf, 0x89, 0x84,
  4167. 0x87, 0x9f, 0x82, 0x65, 0x39, 0x52, 0x95, 0x19, 0x91, 0xdb, 0xfa, 0x0f, 0xc7, 0xee, 0xa9, 0x03,
  4168. 0x0e, 0xf4, 0xca, 0x71, 0xbd, 0x94, 0xe5, 0xed, 0x04, 0x34, 0xea, 0x73, 0x05, 0x2f, 0x80, 0x9c,
  4169. 0x43, 0x5d, 0x44, 0x5a, 0x4d, 0x6a, 0x61, 0x95, 0x96, 0xf3, 0xea, 0x48, 0xaa, 0xf5, 0xa6, 0x51,
  4170. 0x5c, 0x07, 0xbe, 0x0c, 0x72, 0x0e, 0xbe, 0x13, 0x99, 0x64, 0xa4, 0xc9, 0x51, 0xed, 0x2f, 0x57,
  4171. 0xeb, 0x89, 0x50, 0x5c, 0x0f, 0x5e, 0x17, 0xd9, 0x20, 0xaa, 0x34, 0xcb, 0x67, 0x65, 0x98, 0xcf,
  4172. 0x8e, 0xfb, 0x3f, 0x5d, 0xe4, 0x45, 0x89, 0x88, 0x65, 0x8e, 0x84, 0x40, 0x21, 0x56, 0xe9, 0xa7,
  4173. 0x2c, 0x38, 0x7d, 0xe0, 0xde, 0x87, 0xef, 0x00, 0xe8, 0xd5, 0x19, 0xf1, 0x3b, 0xc4, 0xbe, 0xa8,
  4174. 0xae, 0x45, 0xe2, 0x7e, 0x22, 0x62, 0x9c, 0x51, 0x47, 0xe2, 0xd5, 0x01, 0x29, 0x1a, 0x62, 0x01,
  4175. 0x2d, 0x70, 0x44, 0x6c, 0x06, 0x15, 0x50, 0xaa, 0xaf, 0x42, 0x4f, 0xb6, 0xd3, 0xfe, 0x17, 0x74,
  4176. 0x8b, 0x47, 0xb6, 0xe2, 0x20, 0x28, 0x89, 0x09, 0x37, 0xc1, 0x8a, 0xae, 0xf5, 0x7d, 0x01, 0x3e,
  4177. 0xa1, 0x23, 0xb0, 0x52, 0x4d, 0x8a, 0x51, 0xbf, 0xbe, 0x80, 0xb0, 0x09, 0xa3, 0x3e, 0xb1, 0x23,
  4178. 0x88, 0x6c, 0x12, 0xe2, 0xad, 0xa4, 0x18, 0xf5, 0xeb, 0xc3, 0x26, 0x58, 0xd6, 0xa8, 0x3a, 0xde,
  4179. 0xf9, 0x79, 0x49, 0xd9, 0x8b, 0x13, 0x52, 0xa6, 0x8a, 0x6e, 0x94, 0x83, 0xd5, 0x04, 0x16, 0xea,
  4180. 0xc3, 0x86, 0x1c, 0x00, 0x2b, 0x2c, 0x71, 0x2c, 0xbf, 0x20, 0x3d, 0xbd, 0x39, 0xe5, 0x1e, 0x8c,
  4181. 0x6a, 0x65, 0xef, 0xf8, 0x8a, 0xa6, 0x18, 0x8a, 0xf9, 0x29, 0x7d, 0x9f, 0x01, 0xa0, 0x97, 0x61,
  4182. 0x70, 0x23, 0x51, 0xe4, 0xd7, 0xfb, 0x8a, 0xfc, 0x6a, 0xfc, 0x72, 0x1a, 0x2b, 0xe8, 0x37, 0xc0,
  4183. 0x82, 0x27, 0x77, 0x9e, 0x4e, 0x86, 0xf2, 0xb8, 0x65, 0x47, 0x67, 0x69, 0x84, 0x56, 0x01, 0xa2,
  4184. 0x74, 0xea, 0xfd, 0xab, 0xd1, 0xe0, 0x15, 0x90, 0x6d, 0x79, 0x76, 0x78, 0xf8, 0x9d, 0x1f, 0x87,
  4185. 0x7a, 0xcd, 0xb3, 0x59, 0x02, 0x73, 0x51, 0xac, 0x5d, 0xcc, 0x22, 0x89, 0x03, 0x3f, 0x02, 0x8b,
  4186. 0xe1, 0x75, 0x43, 0xdf, 0x4d, 0x36, 0xc6, 0x61, 0x22, 0xad, 0x9f, 0xc0, 0x5d, 0x12, 0x15, 0x34,
  4187. 0x94, 0xa0, 0x08, 0x53, 0xe0, 0x13, 0x7d, 0x5b, 0x94, 0xb5, 0x7e, 0x02, 0xfc, 0x61, 0xd7, 0x7e,
  4188. 0x85, 0x1f, 0x4a, 0x50, 0x84, 0x59, 0xfa, 0x21, 0x03, 0x96, 0x12, 0xd7, 0xd0, 0xbf, 0x83, 0x2e,
  4189. 0x95, 0xd5, 0xb3, 0xa5, 0x4b, 0x61, 0xce, 0x9e, 0x2e, 0x85, 0xfb, 0xf4, 0xe8, 0x8a, 0xe1, 0x0f,
  4190. 0xa1, 0xeb, 0x61, 0x06, 0xc0, 0xc1, 0x4c, 0x87, 0x16, 0x58, 0x50, 0xad, 0xc6, 0x2c, 0x4e, 0xb8,
  4191. 0xe8, 0xd6, 0xa1, 0x0f, 0x33, 0x0d, 0xdd, 0xd7, 0xa0, 0xa4, 0x27, 0x6a, 0x50, 0xc8, 0x2c, 0x1a,
  4192. 0xb9, 0xe8, 0x08, 0x1c, 0xd9, 0xcc, 0xdd, 0x02, 0x8b, 0x2c, 0xec, 0x80, 0xb2, 0xd3, 0x77, 0x40,
  4193. 0x32, 0xea, 0x51, 0xef, 0x13, 0x41, 0x42, 0x1b, 0x2c, 0xe1, 0x78, 0x13, 0x32, 0x3f, 0xd5, 0x6f,
  4194. 0xac, 0x8a, 0x8e, 0x27, 0xd1, 0x7d, 0x24, 0x50, 0x4b, 0xbf, 0xf5, 0x73, 0xab, 0x36, 0xe4, 0x3f,
  4195. 0x96, 0xdb, 0x67, 0xd7, 0x0b, 0xfe, 0x27, 0xe8, 0xfd, 0x36, 0x0d, 0x56, 0xfb, 0x8f, 0x93, 0xa9,
  4196. 0x9a, 0xfe, 0xbb, 0x43, 0x5f, 0x2e, 0xd2, 0x53, 0x2d, 0x3a, 0xea, 0x50, 0x26, 0x7b, 0xbd, 0x48,
  4197. 0x30, 0x91, 0x99, 0x39, 0x13, 0xa5, 0xef, 0x92, 0x31, 0x9a, 0xfe, 0x61, 0xe4, 0xb3, 0xe1, 0xaf,
  4198. 0x07, 0xd3, 0x05, 0xe9, 0x94, 0x76, 0x36, 0xf1, 0x0b, 0xc2, 0xd3, 0x0e, 0xd3, 0x8f, 0x69, 0x70,
  4199. 0x6c, 0xd8, 0x2d, 0x02, 0x56, 0xf5, 0x5b, 0xa2, 0x0a, 0x92, 0x19, 0x7f, 0x4b, 0x7c, 0xdc, 0x2d,
  4200. 0x16, 0x87, 0xb4, 0xc0, 0x21, 0x4c, 0xec, 0xb9, 0xf1, 0x7d, 0x90, 0x4f, 0x30, 0x7f, 0x9d, 0xd3,
  4201. 0x26, 0xbd, 0xab, 0x2e, 0xf7, 0xaa, 0x8d, 0xf9, 0x7f, 0xd0, 0x2d, 0xe6, 0x77, 0x46, 0xe8, 0xa0,
  4202. 0x91, 0xd6, 0x23, 0xde, 0xdc, 0x32, 0x4f, 0xfd, 0xcd, 0xed, 0xe7, 0xc1, 0x78, 0xa9, 0xd4, 0x9a,
  4203. 0x49, 0xbc, 0x3e, 0x04, 0x27, 0x93, 0x39, 0x30, 0x18, 0xb0, 0xd3, 0x41, 0xb7, 0x78, 0xb2, 0x3a,
  4204. 0x4a, 0x09, 0x8d, 0xb6, 0x1f, 0x95, 0xc8, 0x99, 0x67, 0x93, 0xc8, 0x95, 0x73, 0xf7, 0x1e, 0x15,
  4205. 0xe6, 0xee, 0x3f, 0x2a, 0xcc, 0x3d, 0x78, 0x54, 0x98, 0xfb, 0x3c, 0x28, 0xa4, 0xee, 0x05, 0x85,
  4206. 0xd4, 0xfd, 0xa0, 0x90, 0x7a, 0x10, 0x14, 0x52, 0xbf, 0x07, 0x85, 0xd4, 0x97, 0x7f, 0x14, 0xe6,
  4207. 0x3e, 0x38, 0xa4, 0x8f, 0x9e, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x05, 0x26, 0x31, 0x5d, 0x9f,
  4208. 0x18, 0x00, 0x00,
  4209. }