generated.pb.go 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267
  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/rbac/v1alpha1/generated.proto
  15. package v1alpha1
  16. import (
  17. fmt "fmt"
  18. io "io"
  19. proto "github.com/gogo/protobuf/proto"
  20. v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  21. math "math"
  22. math_bits "math/bits"
  23. reflect "reflect"
  24. strings "strings"
  25. )
  26. // Reference imports to suppress errors if they are not otherwise used.
  27. var _ = proto.Marshal
  28. var _ = fmt.Errorf
  29. var _ = math.Inf
  30. // This is a compile-time assertion to ensure that this generated file
  31. // is compatible with the proto package it is being compiled against.
  32. // A compilation error at this line likely means your copy of the
  33. // proto package needs to be updated.
  34. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  35. func (m *AggregationRule) Reset() { *m = AggregationRule{} }
  36. func (*AggregationRule) ProtoMessage() {}
  37. func (*AggregationRule) Descriptor() ([]byte, []int) {
  38. return fileDescriptor_b59b0bd5e7cb9590, []int{0}
  39. }
  40. func (m *AggregationRule) XXX_Unmarshal(b []byte) error {
  41. return m.Unmarshal(b)
  42. }
  43. func (m *AggregationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  44. b = b[:cap(b)]
  45. n, err := m.MarshalToSizedBuffer(b)
  46. if err != nil {
  47. return nil, err
  48. }
  49. return b[:n], nil
  50. }
  51. func (m *AggregationRule) XXX_Merge(src proto.Message) {
  52. xxx_messageInfo_AggregationRule.Merge(m, src)
  53. }
  54. func (m *AggregationRule) XXX_Size() int {
  55. return m.Size()
  56. }
  57. func (m *AggregationRule) XXX_DiscardUnknown() {
  58. xxx_messageInfo_AggregationRule.DiscardUnknown(m)
  59. }
  60. var xxx_messageInfo_AggregationRule proto.InternalMessageInfo
  61. func (m *ClusterRole) Reset() { *m = ClusterRole{} }
  62. func (*ClusterRole) ProtoMessage() {}
  63. func (*ClusterRole) Descriptor() ([]byte, []int) {
  64. return fileDescriptor_b59b0bd5e7cb9590, []int{1}
  65. }
  66. func (m *ClusterRole) XXX_Unmarshal(b []byte) error {
  67. return m.Unmarshal(b)
  68. }
  69. func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  70. b = b[:cap(b)]
  71. n, err := m.MarshalToSizedBuffer(b)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return b[:n], nil
  76. }
  77. func (m *ClusterRole) XXX_Merge(src proto.Message) {
  78. xxx_messageInfo_ClusterRole.Merge(m, src)
  79. }
  80. func (m *ClusterRole) XXX_Size() int {
  81. return m.Size()
  82. }
  83. func (m *ClusterRole) XXX_DiscardUnknown() {
  84. xxx_messageInfo_ClusterRole.DiscardUnknown(m)
  85. }
  86. var xxx_messageInfo_ClusterRole proto.InternalMessageInfo
  87. func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
  88. func (*ClusterRoleBinding) ProtoMessage() {}
  89. func (*ClusterRoleBinding) Descriptor() ([]byte, []int) {
  90. return fileDescriptor_b59b0bd5e7cb9590, []int{2}
  91. }
  92. func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error {
  93. return m.Unmarshal(b)
  94. }
  95. func (m *ClusterRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  96. b = b[:cap(b)]
  97. n, err := m.MarshalToSizedBuffer(b)
  98. if err != nil {
  99. return nil, err
  100. }
  101. return b[:n], nil
  102. }
  103. func (m *ClusterRoleBinding) XXX_Merge(src proto.Message) {
  104. xxx_messageInfo_ClusterRoleBinding.Merge(m, src)
  105. }
  106. func (m *ClusterRoleBinding) XXX_Size() int {
  107. return m.Size()
  108. }
  109. func (m *ClusterRoleBinding) XXX_DiscardUnknown() {
  110. xxx_messageInfo_ClusterRoleBinding.DiscardUnknown(m)
  111. }
  112. var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo
  113. func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
  114. func (*ClusterRoleBindingList) ProtoMessage() {}
  115. func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) {
  116. return fileDescriptor_b59b0bd5e7cb9590, []int{3}
  117. }
  118. func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error {
  119. return m.Unmarshal(b)
  120. }
  121. func (m *ClusterRoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  122. b = b[:cap(b)]
  123. n, err := m.MarshalToSizedBuffer(b)
  124. if err != nil {
  125. return nil, err
  126. }
  127. return b[:n], nil
  128. }
  129. func (m *ClusterRoleBindingList) XXX_Merge(src proto.Message) {
  130. xxx_messageInfo_ClusterRoleBindingList.Merge(m, src)
  131. }
  132. func (m *ClusterRoleBindingList) XXX_Size() int {
  133. return m.Size()
  134. }
  135. func (m *ClusterRoleBindingList) XXX_DiscardUnknown() {
  136. xxx_messageInfo_ClusterRoleBindingList.DiscardUnknown(m)
  137. }
  138. var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo
  139. func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
  140. func (*ClusterRoleList) ProtoMessage() {}
  141. func (*ClusterRoleList) Descriptor() ([]byte, []int) {
  142. return fileDescriptor_b59b0bd5e7cb9590, []int{4}
  143. }
  144. func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error {
  145. return m.Unmarshal(b)
  146. }
  147. func (m *ClusterRoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  148. b = b[:cap(b)]
  149. n, err := m.MarshalToSizedBuffer(b)
  150. if err != nil {
  151. return nil, err
  152. }
  153. return b[:n], nil
  154. }
  155. func (m *ClusterRoleList) XXX_Merge(src proto.Message) {
  156. xxx_messageInfo_ClusterRoleList.Merge(m, src)
  157. }
  158. func (m *ClusterRoleList) XXX_Size() int {
  159. return m.Size()
  160. }
  161. func (m *ClusterRoleList) XXX_DiscardUnknown() {
  162. xxx_messageInfo_ClusterRoleList.DiscardUnknown(m)
  163. }
  164. var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo
  165. func (m *PolicyRule) Reset() { *m = PolicyRule{} }
  166. func (*PolicyRule) ProtoMessage() {}
  167. func (*PolicyRule) Descriptor() ([]byte, []int) {
  168. return fileDescriptor_b59b0bd5e7cb9590, []int{5}
  169. }
  170. func (m *PolicyRule) XXX_Unmarshal(b []byte) error {
  171. return m.Unmarshal(b)
  172. }
  173. func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  174. b = b[:cap(b)]
  175. n, err := m.MarshalToSizedBuffer(b)
  176. if err != nil {
  177. return nil, err
  178. }
  179. return b[:n], nil
  180. }
  181. func (m *PolicyRule) XXX_Merge(src proto.Message) {
  182. xxx_messageInfo_PolicyRule.Merge(m, src)
  183. }
  184. func (m *PolicyRule) XXX_Size() int {
  185. return m.Size()
  186. }
  187. func (m *PolicyRule) XXX_DiscardUnknown() {
  188. xxx_messageInfo_PolicyRule.DiscardUnknown(m)
  189. }
  190. var xxx_messageInfo_PolicyRule proto.InternalMessageInfo
  191. func (m *Role) Reset() { *m = Role{} }
  192. func (*Role) ProtoMessage() {}
  193. func (*Role) Descriptor() ([]byte, []int) {
  194. return fileDescriptor_b59b0bd5e7cb9590, []int{6}
  195. }
  196. func (m *Role) XXX_Unmarshal(b []byte) error {
  197. return m.Unmarshal(b)
  198. }
  199. func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  200. b = b[:cap(b)]
  201. n, err := m.MarshalToSizedBuffer(b)
  202. if err != nil {
  203. return nil, err
  204. }
  205. return b[:n], nil
  206. }
  207. func (m *Role) XXX_Merge(src proto.Message) {
  208. xxx_messageInfo_Role.Merge(m, src)
  209. }
  210. func (m *Role) XXX_Size() int {
  211. return m.Size()
  212. }
  213. func (m *Role) XXX_DiscardUnknown() {
  214. xxx_messageInfo_Role.DiscardUnknown(m)
  215. }
  216. var xxx_messageInfo_Role proto.InternalMessageInfo
  217. func (m *RoleBinding) Reset() { *m = RoleBinding{} }
  218. func (*RoleBinding) ProtoMessage() {}
  219. func (*RoleBinding) Descriptor() ([]byte, []int) {
  220. return fileDescriptor_b59b0bd5e7cb9590, []int{7}
  221. }
  222. func (m *RoleBinding) XXX_Unmarshal(b []byte) error {
  223. return m.Unmarshal(b)
  224. }
  225. func (m *RoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  226. b = b[:cap(b)]
  227. n, err := m.MarshalToSizedBuffer(b)
  228. if err != nil {
  229. return nil, err
  230. }
  231. return b[:n], nil
  232. }
  233. func (m *RoleBinding) XXX_Merge(src proto.Message) {
  234. xxx_messageInfo_RoleBinding.Merge(m, src)
  235. }
  236. func (m *RoleBinding) XXX_Size() int {
  237. return m.Size()
  238. }
  239. func (m *RoleBinding) XXX_DiscardUnknown() {
  240. xxx_messageInfo_RoleBinding.DiscardUnknown(m)
  241. }
  242. var xxx_messageInfo_RoleBinding proto.InternalMessageInfo
  243. func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
  244. func (*RoleBindingList) ProtoMessage() {}
  245. func (*RoleBindingList) Descriptor() ([]byte, []int) {
  246. return fileDescriptor_b59b0bd5e7cb9590, []int{8}
  247. }
  248. func (m *RoleBindingList) XXX_Unmarshal(b []byte) error {
  249. return m.Unmarshal(b)
  250. }
  251. func (m *RoleBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  252. b = b[:cap(b)]
  253. n, err := m.MarshalToSizedBuffer(b)
  254. if err != nil {
  255. return nil, err
  256. }
  257. return b[:n], nil
  258. }
  259. func (m *RoleBindingList) XXX_Merge(src proto.Message) {
  260. xxx_messageInfo_RoleBindingList.Merge(m, src)
  261. }
  262. func (m *RoleBindingList) XXX_Size() int {
  263. return m.Size()
  264. }
  265. func (m *RoleBindingList) XXX_DiscardUnknown() {
  266. xxx_messageInfo_RoleBindingList.DiscardUnknown(m)
  267. }
  268. var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo
  269. func (m *RoleList) Reset() { *m = RoleList{} }
  270. func (*RoleList) ProtoMessage() {}
  271. func (*RoleList) Descriptor() ([]byte, []int) {
  272. return fileDescriptor_b59b0bd5e7cb9590, []int{9}
  273. }
  274. func (m *RoleList) XXX_Unmarshal(b []byte) error {
  275. return m.Unmarshal(b)
  276. }
  277. func (m *RoleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  278. b = b[:cap(b)]
  279. n, err := m.MarshalToSizedBuffer(b)
  280. if err != nil {
  281. return nil, err
  282. }
  283. return b[:n], nil
  284. }
  285. func (m *RoleList) XXX_Merge(src proto.Message) {
  286. xxx_messageInfo_RoleList.Merge(m, src)
  287. }
  288. func (m *RoleList) XXX_Size() int {
  289. return m.Size()
  290. }
  291. func (m *RoleList) XXX_DiscardUnknown() {
  292. xxx_messageInfo_RoleList.DiscardUnknown(m)
  293. }
  294. var xxx_messageInfo_RoleList proto.InternalMessageInfo
  295. func (m *RoleRef) Reset() { *m = RoleRef{} }
  296. func (*RoleRef) ProtoMessage() {}
  297. func (*RoleRef) Descriptor() ([]byte, []int) {
  298. return fileDescriptor_b59b0bd5e7cb9590, []int{10}
  299. }
  300. func (m *RoleRef) XXX_Unmarshal(b []byte) error {
  301. return m.Unmarshal(b)
  302. }
  303. func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  304. b = b[:cap(b)]
  305. n, err := m.MarshalToSizedBuffer(b)
  306. if err != nil {
  307. return nil, err
  308. }
  309. return b[:n], nil
  310. }
  311. func (m *RoleRef) XXX_Merge(src proto.Message) {
  312. xxx_messageInfo_RoleRef.Merge(m, src)
  313. }
  314. func (m *RoleRef) XXX_Size() int {
  315. return m.Size()
  316. }
  317. func (m *RoleRef) XXX_DiscardUnknown() {
  318. xxx_messageInfo_RoleRef.DiscardUnknown(m)
  319. }
  320. var xxx_messageInfo_RoleRef proto.InternalMessageInfo
  321. func (m *Subject) Reset() { *m = Subject{} }
  322. func (*Subject) ProtoMessage() {}
  323. func (*Subject) Descriptor() ([]byte, []int) {
  324. return fileDescriptor_b59b0bd5e7cb9590, []int{11}
  325. }
  326. func (m *Subject) XXX_Unmarshal(b []byte) error {
  327. return m.Unmarshal(b)
  328. }
  329. func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  330. b = b[:cap(b)]
  331. n, err := m.MarshalToSizedBuffer(b)
  332. if err != nil {
  333. return nil, err
  334. }
  335. return b[:n], nil
  336. }
  337. func (m *Subject) XXX_Merge(src proto.Message) {
  338. xxx_messageInfo_Subject.Merge(m, src)
  339. }
  340. func (m *Subject) XXX_Size() int {
  341. return m.Size()
  342. }
  343. func (m *Subject) XXX_DiscardUnknown() {
  344. xxx_messageInfo_Subject.DiscardUnknown(m)
  345. }
  346. var xxx_messageInfo_Subject proto.InternalMessageInfo
  347. func init() {
  348. proto.RegisterType((*AggregationRule)(nil), "k8s.io.api.rbac.v1alpha1.AggregationRule")
  349. proto.RegisterType((*ClusterRole)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRole")
  350. proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleBinding")
  351. proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleBindingList")
  352. proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.api.rbac.v1alpha1.ClusterRoleList")
  353. proto.RegisterType((*PolicyRule)(nil), "k8s.io.api.rbac.v1alpha1.PolicyRule")
  354. proto.RegisterType((*Role)(nil), "k8s.io.api.rbac.v1alpha1.Role")
  355. proto.RegisterType((*RoleBinding)(nil), "k8s.io.api.rbac.v1alpha1.RoleBinding")
  356. proto.RegisterType((*RoleBindingList)(nil), "k8s.io.api.rbac.v1alpha1.RoleBindingList")
  357. proto.RegisterType((*RoleList)(nil), "k8s.io.api.rbac.v1alpha1.RoleList")
  358. proto.RegisterType((*RoleRef)(nil), "k8s.io.api.rbac.v1alpha1.RoleRef")
  359. proto.RegisterType((*Subject)(nil), "k8s.io.api.rbac.v1alpha1.Subject")
  360. }
  361. func init() {
  362. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptor_b59b0bd5e7cb9590)
  363. }
  364. var fileDescriptor_b59b0bd5e7cb9590 = []byte{
  365. // 830 bytes of a gzipped FileDescriptorProto
  366. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x8f, 0xe3, 0x44,
  367. 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x25, 0x0a, 0x37, 0x9c, 0x90, 0xb5, 0x42, 0xce, 0x62, 0x81,
  368. 0x74, 0x88, 0xc3, 0x66, 0x17, 0x04, 0x34, 0x14, 0xf1, 0x15, 0x28, 0x10, 0xf6, 0x96, 0x39, 0x71,
  369. 0x05, 0xa2, 0x60, 0xe2, 0xcc, 0x39, 0x43, 0x6c, 0x8f, 0x35, 0x63, 0x47, 0x3a, 0xd1, 0xd0, 0xd0,
  370. 0x22, 0x1a, 0x0a, 0x7a, 0x5a, 0x1a, 0x28, 0xf9, 0x07, 0x96, 0xee, 0xca, 0xad, 0x22, 0xd6, 0xfc,
  371. 0x21, 0x20, 0x8f, 0xed, 0xd8, 0xf9, 0x45, 0x52, 0x45, 0x42, 0xba, 0x2a, 0x99, 0xf7, 0xbe, 0xf7,
  372. 0xbd, 0xf7, 0xbe, 0x99, 0xf7, 0x0c, 0xfb, 0xd3, 0x0f, 0xa5, 0xc9, 0xb8, 0x35, 0x8d, 0x47, 0x54,
  373. 0x04, 0x34, 0xa2, 0xd2, 0x9a, 0xd1, 0x60, 0xcc, 0x85, 0x95, 0x3b, 0x48, 0xc8, 0x2c, 0x31, 0x22,
  374. 0x8e, 0x35, 0x3b, 0x27, 0x5e, 0x38, 0x21, 0xe7, 0x96, 0x4b, 0x03, 0x2a, 0x48, 0x44, 0xc7, 0x66,
  375. 0x28, 0x78, 0xc4, 0x91, 0x96, 0x21, 0x4d, 0x12, 0x32, 0x33, 0x45, 0x9a, 0x05, 0xf2, 0xf4, 0x6d,
  376. 0x97, 0x45, 0x93, 0x78, 0x64, 0x3a, 0xdc, 0xb7, 0x5c, 0xee, 0x72, 0x4b, 0x05, 0x8c, 0xe2, 0x27,
  377. 0xea, 0xa4, 0x0e, 0xea, 0x5f, 0x46, 0x74, 0xfa, 0x5e, 0x99, 0xd2, 0x27, 0xce, 0x84, 0x05, 0x54,
  378. 0x3c, 0xb5, 0xc2, 0xa9, 0x9b, 0x1a, 0xa4, 0xe5, 0xd3, 0x88, 0x58, 0xb3, 0xb5, 0xf4, 0xa7, 0xd6,
  379. 0xb6, 0x28, 0x11, 0x07, 0x11, 0xf3, 0xe9, 0x5a, 0xc0, 0xfb, 0xbb, 0x02, 0xa4, 0x33, 0xa1, 0x3e,
  380. 0x59, 0x8d, 0x33, 0x7e, 0x06, 0xb0, 0xdb, 0x77, 0x5d, 0x41, 0x5d, 0x12, 0x31, 0x1e, 0xe0, 0xd8,
  381. 0xa3, 0xe8, 0x7b, 0x00, 0xef, 0x3a, 0x5e, 0x2c, 0x23, 0x2a, 0x30, 0xf7, 0xe8, 0x23, 0xea, 0x51,
  382. 0x27, 0xe2, 0x42, 0x6a, 0xe0, 0xec, 0xe8, 0xde, 0xc9, 0xc5, 0xbb, 0x66, 0xa9, 0xcd, 0x22, 0x97,
  383. 0x19, 0x4e, 0xdd, 0xd4, 0x20, 0xcd, 0xb4, 0x25, 0x73, 0x76, 0x6e, 0x0e, 0xc9, 0x88, 0x7a, 0x45,
  384. 0xac, 0xfd, 0xea, 0xf5, 0xbc, 0x57, 0x4b, 0xe6, 0xbd, 0xbb, 0x0f, 0x36, 0x10, 0xe3, 0x8d, 0xe9,
  385. 0x8c, 0x5f, 0xea, 0xf0, 0xa4, 0x02, 0x47, 0x5f, 0xc3, 0x56, 0x4a, 0x3e, 0x26, 0x11, 0xd1, 0xc0,
  386. 0x19, 0xb8, 0x77, 0x72, 0xf1, 0xce, 0x7e, 0xa5, 0x3c, 0x1c, 0x7d, 0x43, 0x9d, 0xe8, 0x33, 0x1a,
  387. 0x11, 0x1b, 0xe5, 0x75, 0xc0, 0xd2, 0x86, 0x17, 0xac, 0x68, 0x00, 0x9b, 0x22, 0xf6, 0xa8, 0xd4,
  388. 0xea, 0xaa, 0xd3, 0xd7, 0xcd, 0x6d, 0xaf, 0xc0, 0xbc, 0xe2, 0x1e, 0x73, 0x9e, 0xa6, 0x72, 0xd9,
  389. 0x9d, 0x9c, 0xb2, 0x99, 0x9e, 0x24, 0xce, 0x18, 0xd0, 0x04, 0x76, 0xc9, 0xb2, 0xae, 0xda, 0x91,
  390. 0xaa, 0xf9, 0xcd, 0xed, 0xa4, 0x2b, 0x17, 0x61, 0xbf, 0x9c, 0xcc, 0x7b, 0xab, 0xb7, 0x83, 0x57,
  391. 0x69, 0x8d, 0x9f, 0xea, 0x10, 0x55, 0x64, 0xb2, 0x59, 0x30, 0x66, 0x81, 0x7b, 0x00, 0xb5, 0x1e,
  392. 0xc2, 0x96, 0x8c, 0x95, 0xa3, 0x10, 0xec, 0xb5, 0xed, 0xbd, 0x3d, 0xca, 0x90, 0xf6, 0x4b, 0x39,
  393. 0x65, 0x2b, 0x37, 0x48, 0xbc, 0x20, 0x41, 0x43, 0x78, 0x2c, 0xb8, 0x47, 0x31, 0x7d, 0x92, 0x6b,
  394. 0xf5, 0x1f, 0x7c, 0x38, 0x03, 0xda, 0xdd, 0x9c, 0xef, 0x38, 0x37, 0xe0, 0x82, 0xc2, 0xf8, 0x13,
  395. 0xc0, 0x57, 0xd6, 0x75, 0x19, 0x32, 0x19, 0xa1, 0xaf, 0xd6, 0xb4, 0x31, 0xf7, 0x7c, 0xd4, 0x4c,
  396. 0x66, 0xca, 0x2c, 0xda, 0x28, 0x2c, 0x15, 0x5d, 0x3e, 0x87, 0x4d, 0x16, 0x51, 0xbf, 0x10, 0xe5,
  397. 0xfe, 0xf6, 0x26, 0xd6, 0xcb, 0x2b, 0x5f, 0xd3, 0x20, 0xa5, 0xc0, 0x19, 0x93, 0xf1, 0x07, 0x80,
  398. 0xdd, 0x0a, 0xf8, 0x00, 0x4d, 0x7c, 0xb2, 0xdc, 0xc4, 0x1b, 0xfb, 0x35, 0xb1, 0xb9, 0xfa, 0x7f,
  399. 0x00, 0x84, 0xe5, 0xc0, 0xa0, 0x1e, 0x6c, 0xce, 0xa8, 0x18, 0x65, 0xfb, 0xa4, 0x6d, 0xb7, 0x53,
  400. 0xfc, 0xe3, 0xd4, 0x80, 0x33, 0x3b, 0x7a, 0x0b, 0xb6, 0x49, 0xc8, 0x3e, 0x16, 0x3c, 0x0e, 0xa5,
  401. 0x76, 0xa4, 0x40, 0x9d, 0x64, 0xde, 0x6b, 0xf7, 0xaf, 0x06, 0x99, 0x11, 0x97, 0xfe, 0x14, 0x2c,
  402. 0xa8, 0xe4, 0xb1, 0x70, 0xa8, 0xd4, 0x1a, 0x25, 0x18, 0x17, 0x46, 0x5c, 0xfa, 0xd1, 0x07, 0xb0,
  403. 0x53, 0x1c, 0x2e, 0x89, 0x4f, 0xa5, 0xd6, 0x54, 0x01, 0x77, 0x92, 0x79, 0xaf, 0x83, 0xab, 0x0e,
  404. 0xbc, 0x8c, 0x43, 0x1f, 0xc1, 0x6e, 0xc0, 0x83, 0x02, 0xf2, 0x05, 0x1e, 0x4a, 0xed, 0x05, 0x15,
  405. 0xaa, 0x66, 0xf4, 0x72, 0xd9, 0x85, 0x57, 0xb1, 0xc6, 0xef, 0x00, 0x36, 0xfe, 0x77, 0x3b, 0xcc,
  406. 0xf8, 0xa1, 0x0e, 0x4f, 0x9e, 0xaf, 0x94, 0xca, 0x4a, 0x49, 0xc7, 0xf0, 0xb0, 0xbb, 0x64, 0xff,
  407. 0x31, 0xdc, 0xbd, 0x44, 0x7e, 0x05, 0xb0, 0x75, 0xa0, 0xed, 0xf1, 0x60, 0xb9, 0x6c, 0x7d, 0x47,
  408. 0xd9, 0x9b, 0xeb, 0xfd, 0x16, 0x16, 0x37, 0x80, 0xee, 0xc3, 0x56, 0x31, 0xf1, 0xaa, 0xda, 0x76,
  409. 0x99, 0xbd, 0x58, 0x0a, 0x78, 0x81, 0x40, 0x67, 0xb0, 0x31, 0x65, 0xc1, 0x58, 0xab, 0x2b, 0xe4,
  410. 0x8b, 0x39, 0xb2, 0xf1, 0x29, 0x0b, 0xc6, 0x58, 0x79, 0x52, 0x44, 0x40, 0xfc, 0xec, 0x93, 0x5c,
  411. 0x41, 0xa4, 0xb3, 0x8e, 0x95, 0xc7, 0xf8, 0x0d, 0xc0, 0xe3, 0xfc, 0x3d, 0x2d, 0xf8, 0xc0, 0x56,
  412. 0xbe, 0x0b, 0x08, 0x49, 0xc8, 0x1e, 0x53, 0x21, 0x19, 0x0f, 0xf2, 0xbc, 0x8b, 0x97, 0xde, 0xbf,
  413. 0x1a, 0xe4, 0x1e, 0x5c, 0x41, 0xed, 0xae, 0x01, 0x59, 0xb0, 0x9d, 0xfe, 0xca, 0x90, 0x38, 0x54,
  414. 0x6b, 0x28, 0xd8, 0x9d, 0x1c, 0xd6, 0xbe, 0x2c, 0x1c, 0xb8, 0xc4, 0xd8, 0xe6, 0xf5, 0xad, 0x5e,
  415. 0x7b, 0x76, 0xab, 0xd7, 0x6e, 0x6e, 0xf5, 0xda, 0x77, 0x89, 0x0e, 0xae, 0x13, 0x1d, 0x3c, 0x4b,
  416. 0x74, 0x70, 0x93, 0xe8, 0xe0, 0xaf, 0x44, 0x07, 0x3f, 0xfe, 0xad, 0xd7, 0xbe, 0x6c, 0x15, 0xe2,
  417. 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x73, 0x15, 0x10, 0x29, 0x0b, 0x00, 0x00,
  418. }
  419. func (m *AggregationRule) Marshal() (dAtA []byte, err error) {
  420. size := m.Size()
  421. dAtA = make([]byte, size)
  422. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  423. if err != nil {
  424. return nil, err
  425. }
  426. return dAtA[:n], nil
  427. }
  428. func (m *AggregationRule) MarshalTo(dAtA []byte) (int, error) {
  429. size := m.Size()
  430. return m.MarshalToSizedBuffer(dAtA[:size])
  431. }
  432. func (m *AggregationRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  433. i := len(dAtA)
  434. _ = i
  435. var l int
  436. _ = l
  437. if len(m.ClusterRoleSelectors) > 0 {
  438. for iNdEx := len(m.ClusterRoleSelectors) - 1; iNdEx >= 0; iNdEx-- {
  439. {
  440. size, err := m.ClusterRoleSelectors[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  441. if err != nil {
  442. return 0, err
  443. }
  444. i -= size
  445. i = encodeVarintGenerated(dAtA, i, uint64(size))
  446. }
  447. i--
  448. dAtA[i] = 0xa
  449. }
  450. }
  451. return len(dAtA) - i, nil
  452. }
  453. func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
  454. size := m.Size()
  455. dAtA = make([]byte, size)
  456. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  457. if err != nil {
  458. return nil, err
  459. }
  460. return dAtA[:n], nil
  461. }
  462. func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
  463. size := m.Size()
  464. return m.MarshalToSizedBuffer(dAtA[:size])
  465. }
  466. func (m *ClusterRole) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  467. i := len(dAtA)
  468. _ = i
  469. var l int
  470. _ = l
  471. if m.AggregationRule != nil {
  472. {
  473. size, err := m.AggregationRule.MarshalToSizedBuffer(dAtA[:i])
  474. if err != nil {
  475. return 0, err
  476. }
  477. i -= size
  478. i = encodeVarintGenerated(dAtA, i, uint64(size))
  479. }
  480. i--
  481. dAtA[i] = 0x1a
  482. }
  483. if len(m.Rules) > 0 {
  484. for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
  485. {
  486. size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  487. if err != nil {
  488. return 0, err
  489. }
  490. i -= size
  491. i = encodeVarintGenerated(dAtA, i, uint64(size))
  492. }
  493. i--
  494. dAtA[i] = 0x12
  495. }
  496. }
  497. {
  498. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  499. if err != nil {
  500. return 0, err
  501. }
  502. i -= size
  503. i = encodeVarintGenerated(dAtA, i, uint64(size))
  504. }
  505. i--
  506. dAtA[i] = 0xa
  507. return len(dAtA) - i, nil
  508. }
  509. func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
  510. size := m.Size()
  511. dAtA = make([]byte, size)
  512. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  513. if err != nil {
  514. return nil, err
  515. }
  516. return dAtA[:n], nil
  517. }
  518. func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
  519. size := m.Size()
  520. return m.MarshalToSizedBuffer(dAtA[:size])
  521. }
  522. func (m *ClusterRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  523. i := len(dAtA)
  524. _ = i
  525. var l int
  526. _ = l
  527. {
  528. size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i])
  529. if err != nil {
  530. return 0, err
  531. }
  532. i -= size
  533. i = encodeVarintGenerated(dAtA, i, uint64(size))
  534. }
  535. i--
  536. dAtA[i] = 0x1a
  537. if len(m.Subjects) > 0 {
  538. for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- {
  539. {
  540. size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  541. if err != nil {
  542. return 0, err
  543. }
  544. i -= size
  545. i = encodeVarintGenerated(dAtA, i, uint64(size))
  546. }
  547. i--
  548. dAtA[i] = 0x12
  549. }
  550. }
  551. {
  552. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  553. if err != nil {
  554. return 0, err
  555. }
  556. i -= size
  557. i = encodeVarintGenerated(dAtA, i, uint64(size))
  558. }
  559. i--
  560. dAtA[i] = 0xa
  561. return len(dAtA) - i, nil
  562. }
  563. func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
  564. size := m.Size()
  565. dAtA = make([]byte, size)
  566. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  567. if err != nil {
  568. return nil, err
  569. }
  570. return dAtA[:n], nil
  571. }
  572. func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
  573. size := m.Size()
  574. return m.MarshalToSizedBuffer(dAtA[:size])
  575. }
  576. func (m *ClusterRoleBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  577. i := len(dAtA)
  578. _ = i
  579. var l int
  580. _ = l
  581. if len(m.Items) > 0 {
  582. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  583. {
  584. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  585. if err != nil {
  586. return 0, err
  587. }
  588. i -= size
  589. i = encodeVarintGenerated(dAtA, i, uint64(size))
  590. }
  591. i--
  592. dAtA[i] = 0x12
  593. }
  594. }
  595. {
  596. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  597. if err != nil {
  598. return 0, err
  599. }
  600. i -= size
  601. i = encodeVarintGenerated(dAtA, i, uint64(size))
  602. }
  603. i--
  604. dAtA[i] = 0xa
  605. return len(dAtA) - i, nil
  606. }
  607. func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
  608. size := m.Size()
  609. dAtA = make([]byte, size)
  610. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  611. if err != nil {
  612. return nil, err
  613. }
  614. return dAtA[:n], nil
  615. }
  616. func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
  617. size := m.Size()
  618. return m.MarshalToSizedBuffer(dAtA[:size])
  619. }
  620. func (m *ClusterRoleList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  621. i := len(dAtA)
  622. _ = i
  623. var l int
  624. _ = l
  625. if len(m.Items) > 0 {
  626. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  627. {
  628. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  629. if err != nil {
  630. return 0, err
  631. }
  632. i -= size
  633. i = encodeVarintGenerated(dAtA, i, uint64(size))
  634. }
  635. i--
  636. dAtA[i] = 0x12
  637. }
  638. }
  639. {
  640. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  641. if err != nil {
  642. return 0, err
  643. }
  644. i -= size
  645. i = encodeVarintGenerated(dAtA, i, uint64(size))
  646. }
  647. i--
  648. dAtA[i] = 0xa
  649. return len(dAtA) - i, nil
  650. }
  651. func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
  652. size := m.Size()
  653. dAtA = make([]byte, size)
  654. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  655. if err != nil {
  656. return nil, err
  657. }
  658. return dAtA[:n], nil
  659. }
  660. func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
  661. size := m.Size()
  662. return m.MarshalToSizedBuffer(dAtA[:size])
  663. }
  664. func (m *PolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  665. i := len(dAtA)
  666. _ = i
  667. var l int
  668. _ = l
  669. if len(m.NonResourceURLs) > 0 {
  670. for iNdEx := len(m.NonResourceURLs) - 1; iNdEx >= 0; iNdEx-- {
  671. i -= len(m.NonResourceURLs[iNdEx])
  672. copy(dAtA[i:], m.NonResourceURLs[iNdEx])
  673. i = encodeVarintGenerated(dAtA, i, uint64(len(m.NonResourceURLs[iNdEx])))
  674. i--
  675. dAtA[i] = 0x32
  676. }
  677. }
  678. if len(m.ResourceNames) > 0 {
  679. for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- {
  680. i -= len(m.ResourceNames[iNdEx])
  681. copy(dAtA[i:], m.ResourceNames[iNdEx])
  682. i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx])))
  683. i--
  684. dAtA[i] = 0x2a
  685. }
  686. }
  687. if len(m.Resources) > 0 {
  688. for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- {
  689. i -= len(m.Resources[iNdEx])
  690. copy(dAtA[i:], m.Resources[iNdEx])
  691. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resources[iNdEx])))
  692. i--
  693. dAtA[i] = 0x22
  694. }
  695. }
  696. if len(m.APIGroups) > 0 {
  697. for iNdEx := len(m.APIGroups) - 1; iNdEx >= 0; iNdEx-- {
  698. i -= len(m.APIGroups[iNdEx])
  699. copy(dAtA[i:], m.APIGroups[iNdEx])
  700. i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroups[iNdEx])))
  701. i--
  702. dAtA[i] = 0x1a
  703. }
  704. }
  705. if len(m.Verbs) > 0 {
  706. for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- {
  707. i -= len(m.Verbs[iNdEx])
  708. copy(dAtA[i:], m.Verbs[iNdEx])
  709. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx])))
  710. i--
  711. dAtA[i] = 0xa
  712. }
  713. }
  714. return len(dAtA) - i, nil
  715. }
  716. func (m *Role) Marshal() (dAtA []byte, err error) {
  717. size := m.Size()
  718. dAtA = make([]byte, size)
  719. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  720. if err != nil {
  721. return nil, err
  722. }
  723. return dAtA[:n], nil
  724. }
  725. func (m *Role) MarshalTo(dAtA []byte) (int, error) {
  726. size := m.Size()
  727. return m.MarshalToSizedBuffer(dAtA[:size])
  728. }
  729. func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  730. i := len(dAtA)
  731. _ = i
  732. var l int
  733. _ = l
  734. if len(m.Rules) > 0 {
  735. for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
  736. {
  737. size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  738. if err != nil {
  739. return 0, err
  740. }
  741. i -= size
  742. i = encodeVarintGenerated(dAtA, i, uint64(size))
  743. }
  744. i--
  745. dAtA[i] = 0x12
  746. }
  747. }
  748. {
  749. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  750. if err != nil {
  751. return 0, err
  752. }
  753. i -= size
  754. i = encodeVarintGenerated(dAtA, i, uint64(size))
  755. }
  756. i--
  757. dAtA[i] = 0xa
  758. return len(dAtA) - i, nil
  759. }
  760. func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
  761. size := m.Size()
  762. dAtA = make([]byte, size)
  763. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  764. if err != nil {
  765. return nil, err
  766. }
  767. return dAtA[:n], nil
  768. }
  769. func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
  770. size := m.Size()
  771. return m.MarshalToSizedBuffer(dAtA[:size])
  772. }
  773. func (m *RoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  774. i := len(dAtA)
  775. _ = i
  776. var l int
  777. _ = l
  778. {
  779. size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i])
  780. if err != nil {
  781. return 0, err
  782. }
  783. i -= size
  784. i = encodeVarintGenerated(dAtA, i, uint64(size))
  785. }
  786. i--
  787. dAtA[i] = 0x1a
  788. if len(m.Subjects) > 0 {
  789. for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- {
  790. {
  791. size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  792. if err != nil {
  793. return 0, err
  794. }
  795. i -= size
  796. i = encodeVarintGenerated(dAtA, i, uint64(size))
  797. }
  798. i--
  799. dAtA[i] = 0x12
  800. }
  801. }
  802. {
  803. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  804. if err != nil {
  805. return 0, err
  806. }
  807. i -= size
  808. i = encodeVarintGenerated(dAtA, i, uint64(size))
  809. }
  810. i--
  811. dAtA[i] = 0xa
  812. return len(dAtA) - i, nil
  813. }
  814. func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
  815. size := m.Size()
  816. dAtA = make([]byte, size)
  817. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  818. if err != nil {
  819. return nil, err
  820. }
  821. return dAtA[:n], nil
  822. }
  823. func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
  824. size := m.Size()
  825. return m.MarshalToSizedBuffer(dAtA[:size])
  826. }
  827. func (m *RoleBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  828. i := len(dAtA)
  829. _ = i
  830. var l int
  831. _ = l
  832. if len(m.Items) > 0 {
  833. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  834. {
  835. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  836. if err != nil {
  837. return 0, err
  838. }
  839. i -= size
  840. i = encodeVarintGenerated(dAtA, i, uint64(size))
  841. }
  842. i--
  843. dAtA[i] = 0x12
  844. }
  845. }
  846. {
  847. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  848. if err != nil {
  849. return 0, err
  850. }
  851. i -= size
  852. i = encodeVarintGenerated(dAtA, i, uint64(size))
  853. }
  854. i--
  855. dAtA[i] = 0xa
  856. return len(dAtA) - i, nil
  857. }
  858. func (m *RoleList) Marshal() (dAtA []byte, err error) {
  859. size := m.Size()
  860. dAtA = make([]byte, size)
  861. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  862. if err != nil {
  863. return nil, err
  864. }
  865. return dAtA[:n], nil
  866. }
  867. func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
  868. size := m.Size()
  869. return m.MarshalToSizedBuffer(dAtA[:size])
  870. }
  871. func (m *RoleList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  872. i := len(dAtA)
  873. _ = i
  874. var l int
  875. _ = l
  876. if len(m.Items) > 0 {
  877. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  878. {
  879. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  880. if err != nil {
  881. return 0, err
  882. }
  883. i -= size
  884. i = encodeVarintGenerated(dAtA, i, uint64(size))
  885. }
  886. i--
  887. dAtA[i] = 0x12
  888. }
  889. }
  890. {
  891. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  892. if err != nil {
  893. return 0, err
  894. }
  895. i -= size
  896. i = encodeVarintGenerated(dAtA, i, uint64(size))
  897. }
  898. i--
  899. dAtA[i] = 0xa
  900. return len(dAtA) - i, nil
  901. }
  902. func (m *RoleRef) Marshal() (dAtA []byte, err error) {
  903. size := m.Size()
  904. dAtA = make([]byte, size)
  905. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  906. if err != nil {
  907. return nil, err
  908. }
  909. return dAtA[:n], nil
  910. }
  911. func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
  912. size := m.Size()
  913. return m.MarshalToSizedBuffer(dAtA[:size])
  914. }
  915. func (m *RoleRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  916. i := len(dAtA)
  917. _ = i
  918. var l int
  919. _ = l
  920. i -= len(m.Name)
  921. copy(dAtA[i:], m.Name)
  922. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  923. i--
  924. dAtA[i] = 0x1a
  925. i -= len(m.Kind)
  926. copy(dAtA[i:], m.Kind)
  927. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
  928. i--
  929. dAtA[i] = 0x12
  930. i -= len(m.APIGroup)
  931. copy(dAtA[i:], m.APIGroup)
  932. i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
  933. i--
  934. dAtA[i] = 0xa
  935. return len(dAtA) - i, nil
  936. }
  937. func (m *Subject) Marshal() (dAtA []byte, err error) {
  938. size := m.Size()
  939. dAtA = make([]byte, size)
  940. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  941. if err != nil {
  942. return nil, err
  943. }
  944. return dAtA[:n], nil
  945. }
  946. func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
  947. size := m.Size()
  948. return m.MarshalToSizedBuffer(dAtA[:size])
  949. }
  950. func (m *Subject) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  951. i := len(dAtA)
  952. _ = i
  953. var l int
  954. _ = l
  955. i -= len(m.Namespace)
  956. copy(dAtA[i:], m.Namespace)
  957. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
  958. i--
  959. dAtA[i] = 0x22
  960. i -= len(m.Name)
  961. copy(dAtA[i:], m.Name)
  962. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
  963. i--
  964. dAtA[i] = 0x1a
  965. i -= len(m.APIVersion)
  966. copy(dAtA[i:], m.APIVersion)
  967. i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
  968. i--
  969. dAtA[i] = 0x12
  970. i -= len(m.Kind)
  971. copy(dAtA[i:], m.Kind)
  972. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
  973. i--
  974. dAtA[i] = 0xa
  975. return len(dAtA) - i, nil
  976. }
  977. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  978. offset -= sovGenerated(v)
  979. base := offset
  980. for v >= 1<<7 {
  981. dAtA[offset] = uint8(v&0x7f | 0x80)
  982. v >>= 7
  983. offset++
  984. }
  985. dAtA[offset] = uint8(v)
  986. return base
  987. }
  988. func (m *AggregationRule) Size() (n int) {
  989. if m == nil {
  990. return 0
  991. }
  992. var l int
  993. _ = l
  994. if len(m.ClusterRoleSelectors) > 0 {
  995. for _, e := range m.ClusterRoleSelectors {
  996. l = e.Size()
  997. n += 1 + l + sovGenerated(uint64(l))
  998. }
  999. }
  1000. return n
  1001. }
  1002. func (m *ClusterRole) Size() (n int) {
  1003. if m == nil {
  1004. return 0
  1005. }
  1006. var l int
  1007. _ = l
  1008. l = m.ObjectMeta.Size()
  1009. n += 1 + l + sovGenerated(uint64(l))
  1010. if len(m.Rules) > 0 {
  1011. for _, e := range m.Rules {
  1012. l = e.Size()
  1013. n += 1 + l + sovGenerated(uint64(l))
  1014. }
  1015. }
  1016. if m.AggregationRule != nil {
  1017. l = m.AggregationRule.Size()
  1018. n += 1 + l + sovGenerated(uint64(l))
  1019. }
  1020. return n
  1021. }
  1022. func (m *ClusterRoleBinding) Size() (n int) {
  1023. if m == nil {
  1024. return 0
  1025. }
  1026. var l int
  1027. _ = l
  1028. l = m.ObjectMeta.Size()
  1029. n += 1 + l + sovGenerated(uint64(l))
  1030. if len(m.Subjects) > 0 {
  1031. for _, e := range m.Subjects {
  1032. l = e.Size()
  1033. n += 1 + l + sovGenerated(uint64(l))
  1034. }
  1035. }
  1036. l = m.RoleRef.Size()
  1037. n += 1 + l + sovGenerated(uint64(l))
  1038. return n
  1039. }
  1040. func (m *ClusterRoleBindingList) Size() (n int) {
  1041. if m == nil {
  1042. return 0
  1043. }
  1044. var l int
  1045. _ = l
  1046. l = m.ListMeta.Size()
  1047. n += 1 + l + sovGenerated(uint64(l))
  1048. if len(m.Items) > 0 {
  1049. for _, e := range m.Items {
  1050. l = e.Size()
  1051. n += 1 + l + sovGenerated(uint64(l))
  1052. }
  1053. }
  1054. return n
  1055. }
  1056. func (m *ClusterRoleList) Size() (n int) {
  1057. if m == nil {
  1058. return 0
  1059. }
  1060. var l int
  1061. _ = l
  1062. l = m.ListMeta.Size()
  1063. n += 1 + l + sovGenerated(uint64(l))
  1064. if len(m.Items) > 0 {
  1065. for _, e := range m.Items {
  1066. l = e.Size()
  1067. n += 1 + l + sovGenerated(uint64(l))
  1068. }
  1069. }
  1070. return n
  1071. }
  1072. func (m *PolicyRule) Size() (n int) {
  1073. if m == nil {
  1074. return 0
  1075. }
  1076. var l int
  1077. _ = l
  1078. if len(m.Verbs) > 0 {
  1079. for _, s := range m.Verbs {
  1080. l = len(s)
  1081. n += 1 + l + sovGenerated(uint64(l))
  1082. }
  1083. }
  1084. if len(m.APIGroups) > 0 {
  1085. for _, s := range m.APIGroups {
  1086. l = len(s)
  1087. n += 1 + l + sovGenerated(uint64(l))
  1088. }
  1089. }
  1090. if len(m.Resources) > 0 {
  1091. for _, s := range m.Resources {
  1092. l = len(s)
  1093. n += 1 + l + sovGenerated(uint64(l))
  1094. }
  1095. }
  1096. if len(m.ResourceNames) > 0 {
  1097. for _, s := range m.ResourceNames {
  1098. l = len(s)
  1099. n += 1 + l + sovGenerated(uint64(l))
  1100. }
  1101. }
  1102. if len(m.NonResourceURLs) > 0 {
  1103. for _, s := range m.NonResourceURLs {
  1104. l = len(s)
  1105. n += 1 + l + sovGenerated(uint64(l))
  1106. }
  1107. }
  1108. return n
  1109. }
  1110. func (m *Role) Size() (n int) {
  1111. if m == nil {
  1112. return 0
  1113. }
  1114. var l int
  1115. _ = l
  1116. l = m.ObjectMeta.Size()
  1117. n += 1 + l + sovGenerated(uint64(l))
  1118. if len(m.Rules) > 0 {
  1119. for _, e := range m.Rules {
  1120. l = e.Size()
  1121. n += 1 + l + sovGenerated(uint64(l))
  1122. }
  1123. }
  1124. return n
  1125. }
  1126. func (m *RoleBinding) Size() (n int) {
  1127. if m == nil {
  1128. return 0
  1129. }
  1130. var l int
  1131. _ = l
  1132. l = m.ObjectMeta.Size()
  1133. n += 1 + l + sovGenerated(uint64(l))
  1134. if len(m.Subjects) > 0 {
  1135. for _, e := range m.Subjects {
  1136. l = e.Size()
  1137. n += 1 + l + sovGenerated(uint64(l))
  1138. }
  1139. }
  1140. l = m.RoleRef.Size()
  1141. n += 1 + l + sovGenerated(uint64(l))
  1142. return n
  1143. }
  1144. func (m *RoleBindingList) Size() (n int) {
  1145. if m == nil {
  1146. return 0
  1147. }
  1148. var l int
  1149. _ = l
  1150. l = m.ListMeta.Size()
  1151. n += 1 + l + sovGenerated(uint64(l))
  1152. if len(m.Items) > 0 {
  1153. for _, e := range m.Items {
  1154. l = e.Size()
  1155. n += 1 + l + sovGenerated(uint64(l))
  1156. }
  1157. }
  1158. return n
  1159. }
  1160. func (m *RoleList) Size() (n int) {
  1161. if m == nil {
  1162. return 0
  1163. }
  1164. var l int
  1165. _ = l
  1166. l = m.ListMeta.Size()
  1167. n += 1 + l + sovGenerated(uint64(l))
  1168. if len(m.Items) > 0 {
  1169. for _, e := range m.Items {
  1170. l = e.Size()
  1171. n += 1 + l + sovGenerated(uint64(l))
  1172. }
  1173. }
  1174. return n
  1175. }
  1176. func (m *RoleRef) Size() (n int) {
  1177. if m == nil {
  1178. return 0
  1179. }
  1180. var l int
  1181. _ = l
  1182. l = len(m.APIGroup)
  1183. n += 1 + l + sovGenerated(uint64(l))
  1184. l = len(m.Kind)
  1185. n += 1 + l + sovGenerated(uint64(l))
  1186. l = len(m.Name)
  1187. n += 1 + l + sovGenerated(uint64(l))
  1188. return n
  1189. }
  1190. func (m *Subject) Size() (n int) {
  1191. if m == nil {
  1192. return 0
  1193. }
  1194. var l int
  1195. _ = l
  1196. l = len(m.Kind)
  1197. n += 1 + l + sovGenerated(uint64(l))
  1198. l = len(m.APIVersion)
  1199. n += 1 + l + sovGenerated(uint64(l))
  1200. l = len(m.Name)
  1201. n += 1 + l + sovGenerated(uint64(l))
  1202. l = len(m.Namespace)
  1203. n += 1 + l + sovGenerated(uint64(l))
  1204. return n
  1205. }
  1206. func sovGenerated(x uint64) (n int) {
  1207. return (math_bits.Len64(x|1) + 6) / 7
  1208. }
  1209. func sozGenerated(x uint64) (n int) {
  1210. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1211. }
  1212. func (this *AggregationRule) String() string {
  1213. if this == nil {
  1214. return "nil"
  1215. }
  1216. repeatedStringForClusterRoleSelectors := "[]LabelSelector{"
  1217. for _, f := range this.ClusterRoleSelectors {
  1218. repeatedStringForClusterRoleSelectors += fmt.Sprintf("%v", f) + ","
  1219. }
  1220. repeatedStringForClusterRoleSelectors += "}"
  1221. s := strings.Join([]string{`&AggregationRule{`,
  1222. `ClusterRoleSelectors:` + repeatedStringForClusterRoleSelectors + `,`,
  1223. `}`,
  1224. }, "")
  1225. return s
  1226. }
  1227. func (this *ClusterRole) String() string {
  1228. if this == nil {
  1229. return "nil"
  1230. }
  1231. repeatedStringForRules := "[]PolicyRule{"
  1232. for _, f := range this.Rules {
  1233. repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + ","
  1234. }
  1235. repeatedStringForRules += "}"
  1236. s := strings.Join([]string{`&ClusterRole{`,
  1237. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  1238. `Rules:` + repeatedStringForRules + `,`,
  1239. `AggregationRule:` + strings.Replace(this.AggregationRule.String(), "AggregationRule", "AggregationRule", 1) + `,`,
  1240. `}`,
  1241. }, "")
  1242. return s
  1243. }
  1244. func (this *ClusterRoleBinding) String() string {
  1245. if this == nil {
  1246. return "nil"
  1247. }
  1248. repeatedStringForSubjects := "[]Subject{"
  1249. for _, f := range this.Subjects {
  1250. repeatedStringForSubjects += strings.Replace(strings.Replace(f.String(), "Subject", "Subject", 1), `&`, ``, 1) + ","
  1251. }
  1252. repeatedStringForSubjects += "}"
  1253. s := strings.Join([]string{`&ClusterRoleBinding{`,
  1254. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  1255. `Subjects:` + repeatedStringForSubjects + `,`,
  1256. `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
  1257. `}`,
  1258. }, "")
  1259. return s
  1260. }
  1261. func (this *ClusterRoleBindingList) String() string {
  1262. if this == nil {
  1263. return "nil"
  1264. }
  1265. repeatedStringForItems := "[]ClusterRoleBinding{"
  1266. for _, f := range this.Items {
  1267. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + ","
  1268. }
  1269. repeatedStringForItems += "}"
  1270. s := strings.Join([]string{`&ClusterRoleBindingList{`,
  1271. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  1272. `Items:` + repeatedStringForItems + `,`,
  1273. `}`,
  1274. }, "")
  1275. return s
  1276. }
  1277. func (this *ClusterRoleList) String() string {
  1278. if this == nil {
  1279. return "nil"
  1280. }
  1281. repeatedStringForItems := "[]ClusterRole{"
  1282. for _, f := range this.Items {
  1283. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + ","
  1284. }
  1285. repeatedStringForItems += "}"
  1286. s := strings.Join([]string{`&ClusterRoleList{`,
  1287. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  1288. `Items:` + repeatedStringForItems + `,`,
  1289. `}`,
  1290. }, "")
  1291. return s
  1292. }
  1293. func (this *PolicyRule) String() string {
  1294. if this == nil {
  1295. return "nil"
  1296. }
  1297. s := strings.Join([]string{`&PolicyRule{`,
  1298. `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
  1299. `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
  1300. `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
  1301. `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
  1302. `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
  1303. `}`,
  1304. }, "")
  1305. return s
  1306. }
  1307. func (this *Role) String() string {
  1308. if this == nil {
  1309. return "nil"
  1310. }
  1311. repeatedStringForRules := "[]PolicyRule{"
  1312. for _, f := range this.Rules {
  1313. repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + ","
  1314. }
  1315. repeatedStringForRules += "}"
  1316. s := strings.Join([]string{`&Role{`,
  1317. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  1318. `Rules:` + repeatedStringForRules + `,`,
  1319. `}`,
  1320. }, "")
  1321. return s
  1322. }
  1323. func (this *RoleBinding) String() string {
  1324. if this == nil {
  1325. return "nil"
  1326. }
  1327. repeatedStringForSubjects := "[]Subject{"
  1328. for _, f := range this.Subjects {
  1329. repeatedStringForSubjects += strings.Replace(strings.Replace(f.String(), "Subject", "Subject", 1), `&`, ``, 1) + ","
  1330. }
  1331. repeatedStringForSubjects += "}"
  1332. s := strings.Join([]string{`&RoleBinding{`,
  1333. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  1334. `Subjects:` + repeatedStringForSubjects + `,`,
  1335. `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
  1336. `}`,
  1337. }, "")
  1338. return s
  1339. }
  1340. func (this *RoleBindingList) String() string {
  1341. if this == nil {
  1342. return "nil"
  1343. }
  1344. repeatedStringForItems := "[]RoleBinding{"
  1345. for _, f := range this.Items {
  1346. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + ","
  1347. }
  1348. repeatedStringForItems += "}"
  1349. s := strings.Join([]string{`&RoleBindingList{`,
  1350. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  1351. `Items:` + repeatedStringForItems + `,`,
  1352. `}`,
  1353. }, "")
  1354. return s
  1355. }
  1356. func (this *RoleList) String() string {
  1357. if this == nil {
  1358. return "nil"
  1359. }
  1360. repeatedStringForItems := "[]Role{"
  1361. for _, f := range this.Items {
  1362. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Role", "Role", 1), `&`, ``, 1) + ","
  1363. }
  1364. repeatedStringForItems += "}"
  1365. s := strings.Join([]string{`&RoleList{`,
  1366. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  1367. `Items:` + repeatedStringForItems + `,`,
  1368. `}`,
  1369. }, "")
  1370. return s
  1371. }
  1372. func (this *RoleRef) String() string {
  1373. if this == nil {
  1374. return "nil"
  1375. }
  1376. s := strings.Join([]string{`&RoleRef{`,
  1377. `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
  1378. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  1379. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  1380. `}`,
  1381. }, "")
  1382. return s
  1383. }
  1384. func (this *Subject) String() string {
  1385. if this == nil {
  1386. return "nil"
  1387. }
  1388. s := strings.Join([]string{`&Subject{`,
  1389. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  1390. `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
  1391. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  1392. `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
  1393. `}`,
  1394. }, "")
  1395. return s
  1396. }
  1397. func valueToStringGenerated(v interface{}) string {
  1398. rv := reflect.ValueOf(v)
  1399. if rv.IsNil() {
  1400. return "nil"
  1401. }
  1402. pv := reflect.Indirect(rv).Interface()
  1403. return fmt.Sprintf("*%v", pv)
  1404. }
  1405. func (m *AggregationRule) Unmarshal(dAtA []byte) error {
  1406. l := len(dAtA)
  1407. iNdEx := 0
  1408. for iNdEx < l {
  1409. preIndex := iNdEx
  1410. var wire uint64
  1411. for shift := uint(0); ; shift += 7 {
  1412. if shift >= 64 {
  1413. return ErrIntOverflowGenerated
  1414. }
  1415. if iNdEx >= l {
  1416. return io.ErrUnexpectedEOF
  1417. }
  1418. b := dAtA[iNdEx]
  1419. iNdEx++
  1420. wire |= uint64(b&0x7F) << shift
  1421. if b < 0x80 {
  1422. break
  1423. }
  1424. }
  1425. fieldNum := int32(wire >> 3)
  1426. wireType := int(wire & 0x7)
  1427. if wireType == 4 {
  1428. return fmt.Errorf("proto: AggregationRule: wiretype end group for non-group")
  1429. }
  1430. if fieldNum <= 0 {
  1431. return fmt.Errorf("proto: AggregationRule: illegal tag %d (wire type %d)", fieldNum, wire)
  1432. }
  1433. switch fieldNum {
  1434. case 1:
  1435. if wireType != 2 {
  1436. return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleSelectors", wireType)
  1437. }
  1438. var msglen int
  1439. for shift := uint(0); ; shift += 7 {
  1440. if shift >= 64 {
  1441. return ErrIntOverflowGenerated
  1442. }
  1443. if iNdEx >= l {
  1444. return io.ErrUnexpectedEOF
  1445. }
  1446. b := dAtA[iNdEx]
  1447. iNdEx++
  1448. msglen |= int(b&0x7F) << shift
  1449. if b < 0x80 {
  1450. break
  1451. }
  1452. }
  1453. if msglen < 0 {
  1454. return ErrInvalidLengthGenerated
  1455. }
  1456. postIndex := iNdEx + msglen
  1457. if postIndex < 0 {
  1458. return ErrInvalidLengthGenerated
  1459. }
  1460. if postIndex > l {
  1461. return io.ErrUnexpectedEOF
  1462. }
  1463. m.ClusterRoleSelectors = append(m.ClusterRoleSelectors, v1.LabelSelector{})
  1464. if err := m.ClusterRoleSelectors[len(m.ClusterRoleSelectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1465. return err
  1466. }
  1467. iNdEx = postIndex
  1468. default:
  1469. iNdEx = preIndex
  1470. skippy, err := skipGenerated(dAtA[iNdEx:])
  1471. if err != nil {
  1472. return err
  1473. }
  1474. if skippy < 0 {
  1475. return ErrInvalidLengthGenerated
  1476. }
  1477. if (iNdEx + skippy) < 0 {
  1478. return ErrInvalidLengthGenerated
  1479. }
  1480. if (iNdEx + skippy) > l {
  1481. return io.ErrUnexpectedEOF
  1482. }
  1483. iNdEx += skippy
  1484. }
  1485. }
  1486. if iNdEx > l {
  1487. return io.ErrUnexpectedEOF
  1488. }
  1489. return nil
  1490. }
  1491. func (m *ClusterRole) Unmarshal(dAtA []byte) error {
  1492. l := len(dAtA)
  1493. iNdEx := 0
  1494. for iNdEx < l {
  1495. preIndex := iNdEx
  1496. var wire uint64
  1497. for shift := uint(0); ; shift += 7 {
  1498. if shift >= 64 {
  1499. return ErrIntOverflowGenerated
  1500. }
  1501. if iNdEx >= l {
  1502. return io.ErrUnexpectedEOF
  1503. }
  1504. b := dAtA[iNdEx]
  1505. iNdEx++
  1506. wire |= uint64(b&0x7F) << shift
  1507. if b < 0x80 {
  1508. break
  1509. }
  1510. }
  1511. fieldNum := int32(wire >> 3)
  1512. wireType := int(wire & 0x7)
  1513. if wireType == 4 {
  1514. return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
  1515. }
  1516. if fieldNum <= 0 {
  1517. return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
  1518. }
  1519. switch fieldNum {
  1520. case 1:
  1521. if wireType != 2 {
  1522. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  1523. }
  1524. var msglen int
  1525. for shift := uint(0); ; shift += 7 {
  1526. if shift >= 64 {
  1527. return ErrIntOverflowGenerated
  1528. }
  1529. if iNdEx >= l {
  1530. return io.ErrUnexpectedEOF
  1531. }
  1532. b := dAtA[iNdEx]
  1533. iNdEx++
  1534. msglen |= int(b&0x7F) << shift
  1535. if b < 0x80 {
  1536. break
  1537. }
  1538. }
  1539. if msglen < 0 {
  1540. return ErrInvalidLengthGenerated
  1541. }
  1542. postIndex := iNdEx + msglen
  1543. if postIndex < 0 {
  1544. return ErrInvalidLengthGenerated
  1545. }
  1546. if postIndex > l {
  1547. return io.ErrUnexpectedEOF
  1548. }
  1549. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1550. return err
  1551. }
  1552. iNdEx = postIndex
  1553. case 2:
  1554. if wireType != 2 {
  1555. return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
  1556. }
  1557. var msglen int
  1558. for shift := uint(0); ; shift += 7 {
  1559. if shift >= 64 {
  1560. return ErrIntOverflowGenerated
  1561. }
  1562. if iNdEx >= l {
  1563. return io.ErrUnexpectedEOF
  1564. }
  1565. b := dAtA[iNdEx]
  1566. iNdEx++
  1567. msglen |= int(b&0x7F) << shift
  1568. if b < 0x80 {
  1569. break
  1570. }
  1571. }
  1572. if msglen < 0 {
  1573. return ErrInvalidLengthGenerated
  1574. }
  1575. postIndex := iNdEx + msglen
  1576. if postIndex < 0 {
  1577. return ErrInvalidLengthGenerated
  1578. }
  1579. if postIndex > l {
  1580. return io.ErrUnexpectedEOF
  1581. }
  1582. m.Rules = append(m.Rules, PolicyRule{})
  1583. if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1584. return err
  1585. }
  1586. iNdEx = postIndex
  1587. case 3:
  1588. if wireType != 2 {
  1589. return fmt.Errorf("proto: wrong wireType = %d for field AggregationRule", wireType)
  1590. }
  1591. var msglen int
  1592. for shift := uint(0); ; shift += 7 {
  1593. if shift >= 64 {
  1594. return ErrIntOverflowGenerated
  1595. }
  1596. if iNdEx >= l {
  1597. return io.ErrUnexpectedEOF
  1598. }
  1599. b := dAtA[iNdEx]
  1600. iNdEx++
  1601. msglen |= int(b&0x7F) << shift
  1602. if b < 0x80 {
  1603. break
  1604. }
  1605. }
  1606. if msglen < 0 {
  1607. return ErrInvalidLengthGenerated
  1608. }
  1609. postIndex := iNdEx + msglen
  1610. if postIndex < 0 {
  1611. return ErrInvalidLengthGenerated
  1612. }
  1613. if postIndex > l {
  1614. return io.ErrUnexpectedEOF
  1615. }
  1616. if m.AggregationRule == nil {
  1617. m.AggregationRule = &AggregationRule{}
  1618. }
  1619. if err := m.AggregationRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1620. return err
  1621. }
  1622. iNdEx = postIndex
  1623. default:
  1624. iNdEx = preIndex
  1625. skippy, err := skipGenerated(dAtA[iNdEx:])
  1626. if err != nil {
  1627. return err
  1628. }
  1629. if skippy < 0 {
  1630. return ErrInvalidLengthGenerated
  1631. }
  1632. if (iNdEx + skippy) < 0 {
  1633. return ErrInvalidLengthGenerated
  1634. }
  1635. if (iNdEx + skippy) > l {
  1636. return io.ErrUnexpectedEOF
  1637. }
  1638. iNdEx += skippy
  1639. }
  1640. }
  1641. if iNdEx > l {
  1642. return io.ErrUnexpectedEOF
  1643. }
  1644. return nil
  1645. }
  1646. func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
  1647. l := len(dAtA)
  1648. iNdEx := 0
  1649. for iNdEx < l {
  1650. preIndex := iNdEx
  1651. var wire uint64
  1652. for shift := uint(0); ; shift += 7 {
  1653. if shift >= 64 {
  1654. return ErrIntOverflowGenerated
  1655. }
  1656. if iNdEx >= l {
  1657. return io.ErrUnexpectedEOF
  1658. }
  1659. b := dAtA[iNdEx]
  1660. iNdEx++
  1661. wire |= uint64(b&0x7F) << shift
  1662. if b < 0x80 {
  1663. break
  1664. }
  1665. }
  1666. fieldNum := int32(wire >> 3)
  1667. wireType := int(wire & 0x7)
  1668. if wireType == 4 {
  1669. return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
  1670. }
  1671. if fieldNum <= 0 {
  1672. return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
  1673. }
  1674. switch fieldNum {
  1675. case 1:
  1676. if wireType != 2 {
  1677. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  1678. }
  1679. var msglen int
  1680. for shift := uint(0); ; shift += 7 {
  1681. if shift >= 64 {
  1682. return ErrIntOverflowGenerated
  1683. }
  1684. if iNdEx >= l {
  1685. return io.ErrUnexpectedEOF
  1686. }
  1687. b := dAtA[iNdEx]
  1688. iNdEx++
  1689. msglen |= int(b&0x7F) << shift
  1690. if b < 0x80 {
  1691. break
  1692. }
  1693. }
  1694. if msglen < 0 {
  1695. return ErrInvalidLengthGenerated
  1696. }
  1697. postIndex := iNdEx + msglen
  1698. if postIndex < 0 {
  1699. return ErrInvalidLengthGenerated
  1700. }
  1701. if postIndex > l {
  1702. return io.ErrUnexpectedEOF
  1703. }
  1704. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1705. return err
  1706. }
  1707. iNdEx = postIndex
  1708. case 2:
  1709. if wireType != 2 {
  1710. return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
  1711. }
  1712. var msglen int
  1713. for shift := uint(0); ; shift += 7 {
  1714. if shift >= 64 {
  1715. return ErrIntOverflowGenerated
  1716. }
  1717. if iNdEx >= l {
  1718. return io.ErrUnexpectedEOF
  1719. }
  1720. b := dAtA[iNdEx]
  1721. iNdEx++
  1722. msglen |= int(b&0x7F) << shift
  1723. if b < 0x80 {
  1724. break
  1725. }
  1726. }
  1727. if msglen < 0 {
  1728. return ErrInvalidLengthGenerated
  1729. }
  1730. postIndex := iNdEx + msglen
  1731. if postIndex < 0 {
  1732. return ErrInvalidLengthGenerated
  1733. }
  1734. if postIndex > l {
  1735. return io.ErrUnexpectedEOF
  1736. }
  1737. m.Subjects = append(m.Subjects, Subject{})
  1738. if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1739. return err
  1740. }
  1741. iNdEx = postIndex
  1742. case 3:
  1743. if wireType != 2 {
  1744. return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
  1745. }
  1746. var msglen int
  1747. for shift := uint(0); ; shift += 7 {
  1748. if shift >= 64 {
  1749. return ErrIntOverflowGenerated
  1750. }
  1751. if iNdEx >= l {
  1752. return io.ErrUnexpectedEOF
  1753. }
  1754. b := dAtA[iNdEx]
  1755. iNdEx++
  1756. msglen |= int(b&0x7F) << shift
  1757. if b < 0x80 {
  1758. break
  1759. }
  1760. }
  1761. if msglen < 0 {
  1762. return ErrInvalidLengthGenerated
  1763. }
  1764. postIndex := iNdEx + msglen
  1765. if postIndex < 0 {
  1766. return ErrInvalidLengthGenerated
  1767. }
  1768. if postIndex > l {
  1769. return io.ErrUnexpectedEOF
  1770. }
  1771. if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1772. return err
  1773. }
  1774. iNdEx = postIndex
  1775. default:
  1776. iNdEx = preIndex
  1777. skippy, err := skipGenerated(dAtA[iNdEx:])
  1778. if err != nil {
  1779. return err
  1780. }
  1781. if skippy < 0 {
  1782. return ErrInvalidLengthGenerated
  1783. }
  1784. if (iNdEx + skippy) < 0 {
  1785. return ErrInvalidLengthGenerated
  1786. }
  1787. if (iNdEx + skippy) > l {
  1788. return io.ErrUnexpectedEOF
  1789. }
  1790. iNdEx += skippy
  1791. }
  1792. }
  1793. if iNdEx > l {
  1794. return io.ErrUnexpectedEOF
  1795. }
  1796. return nil
  1797. }
  1798. func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
  1799. l := len(dAtA)
  1800. iNdEx := 0
  1801. for iNdEx < l {
  1802. preIndex := iNdEx
  1803. var wire uint64
  1804. for shift := uint(0); ; shift += 7 {
  1805. if shift >= 64 {
  1806. return ErrIntOverflowGenerated
  1807. }
  1808. if iNdEx >= l {
  1809. return io.ErrUnexpectedEOF
  1810. }
  1811. b := dAtA[iNdEx]
  1812. iNdEx++
  1813. wire |= uint64(b&0x7F) << shift
  1814. if b < 0x80 {
  1815. break
  1816. }
  1817. }
  1818. fieldNum := int32(wire >> 3)
  1819. wireType := int(wire & 0x7)
  1820. if wireType == 4 {
  1821. return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
  1822. }
  1823. if fieldNum <= 0 {
  1824. return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
  1825. }
  1826. switch fieldNum {
  1827. case 1:
  1828. if wireType != 2 {
  1829. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  1830. }
  1831. var msglen int
  1832. for shift := uint(0); ; shift += 7 {
  1833. if shift >= 64 {
  1834. return ErrIntOverflowGenerated
  1835. }
  1836. if iNdEx >= l {
  1837. return io.ErrUnexpectedEOF
  1838. }
  1839. b := dAtA[iNdEx]
  1840. iNdEx++
  1841. msglen |= int(b&0x7F) << shift
  1842. if b < 0x80 {
  1843. break
  1844. }
  1845. }
  1846. if msglen < 0 {
  1847. return ErrInvalidLengthGenerated
  1848. }
  1849. postIndex := iNdEx + msglen
  1850. if postIndex < 0 {
  1851. return ErrInvalidLengthGenerated
  1852. }
  1853. if postIndex > l {
  1854. return io.ErrUnexpectedEOF
  1855. }
  1856. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1857. return err
  1858. }
  1859. iNdEx = postIndex
  1860. case 2:
  1861. if wireType != 2 {
  1862. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  1863. }
  1864. var msglen int
  1865. for shift := uint(0); ; shift += 7 {
  1866. if shift >= 64 {
  1867. return ErrIntOverflowGenerated
  1868. }
  1869. if iNdEx >= l {
  1870. return io.ErrUnexpectedEOF
  1871. }
  1872. b := dAtA[iNdEx]
  1873. iNdEx++
  1874. msglen |= int(b&0x7F) << shift
  1875. if b < 0x80 {
  1876. break
  1877. }
  1878. }
  1879. if msglen < 0 {
  1880. return ErrInvalidLengthGenerated
  1881. }
  1882. postIndex := iNdEx + msglen
  1883. if postIndex < 0 {
  1884. return ErrInvalidLengthGenerated
  1885. }
  1886. if postIndex > l {
  1887. return io.ErrUnexpectedEOF
  1888. }
  1889. m.Items = append(m.Items, ClusterRoleBinding{})
  1890. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1891. return err
  1892. }
  1893. iNdEx = postIndex
  1894. default:
  1895. iNdEx = preIndex
  1896. skippy, err := skipGenerated(dAtA[iNdEx:])
  1897. if err != nil {
  1898. return err
  1899. }
  1900. if skippy < 0 {
  1901. return ErrInvalidLengthGenerated
  1902. }
  1903. if (iNdEx + skippy) < 0 {
  1904. return ErrInvalidLengthGenerated
  1905. }
  1906. if (iNdEx + skippy) > l {
  1907. return io.ErrUnexpectedEOF
  1908. }
  1909. iNdEx += skippy
  1910. }
  1911. }
  1912. if iNdEx > l {
  1913. return io.ErrUnexpectedEOF
  1914. }
  1915. return nil
  1916. }
  1917. func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
  1918. l := len(dAtA)
  1919. iNdEx := 0
  1920. for iNdEx < l {
  1921. preIndex := iNdEx
  1922. var wire uint64
  1923. for shift := uint(0); ; shift += 7 {
  1924. if shift >= 64 {
  1925. return ErrIntOverflowGenerated
  1926. }
  1927. if iNdEx >= l {
  1928. return io.ErrUnexpectedEOF
  1929. }
  1930. b := dAtA[iNdEx]
  1931. iNdEx++
  1932. wire |= uint64(b&0x7F) << shift
  1933. if b < 0x80 {
  1934. break
  1935. }
  1936. }
  1937. fieldNum := int32(wire >> 3)
  1938. wireType := int(wire & 0x7)
  1939. if wireType == 4 {
  1940. return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
  1941. }
  1942. if fieldNum <= 0 {
  1943. return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
  1944. }
  1945. switch fieldNum {
  1946. case 1:
  1947. if wireType != 2 {
  1948. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  1949. }
  1950. var msglen int
  1951. for shift := uint(0); ; shift += 7 {
  1952. if shift >= 64 {
  1953. return ErrIntOverflowGenerated
  1954. }
  1955. if iNdEx >= l {
  1956. return io.ErrUnexpectedEOF
  1957. }
  1958. b := dAtA[iNdEx]
  1959. iNdEx++
  1960. msglen |= int(b&0x7F) << shift
  1961. if b < 0x80 {
  1962. break
  1963. }
  1964. }
  1965. if msglen < 0 {
  1966. return ErrInvalidLengthGenerated
  1967. }
  1968. postIndex := iNdEx + msglen
  1969. if postIndex < 0 {
  1970. return ErrInvalidLengthGenerated
  1971. }
  1972. if postIndex > l {
  1973. return io.ErrUnexpectedEOF
  1974. }
  1975. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1976. return err
  1977. }
  1978. iNdEx = postIndex
  1979. case 2:
  1980. if wireType != 2 {
  1981. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  1982. }
  1983. var msglen int
  1984. for shift := uint(0); ; shift += 7 {
  1985. if shift >= 64 {
  1986. return ErrIntOverflowGenerated
  1987. }
  1988. if iNdEx >= l {
  1989. return io.ErrUnexpectedEOF
  1990. }
  1991. b := dAtA[iNdEx]
  1992. iNdEx++
  1993. msglen |= int(b&0x7F) << shift
  1994. if b < 0x80 {
  1995. break
  1996. }
  1997. }
  1998. if msglen < 0 {
  1999. return ErrInvalidLengthGenerated
  2000. }
  2001. postIndex := iNdEx + msglen
  2002. if postIndex < 0 {
  2003. return ErrInvalidLengthGenerated
  2004. }
  2005. if postIndex > l {
  2006. return io.ErrUnexpectedEOF
  2007. }
  2008. m.Items = append(m.Items, ClusterRole{})
  2009. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2010. return err
  2011. }
  2012. iNdEx = postIndex
  2013. default:
  2014. iNdEx = preIndex
  2015. skippy, err := skipGenerated(dAtA[iNdEx:])
  2016. if err != nil {
  2017. return err
  2018. }
  2019. if skippy < 0 {
  2020. return ErrInvalidLengthGenerated
  2021. }
  2022. if (iNdEx + skippy) < 0 {
  2023. return ErrInvalidLengthGenerated
  2024. }
  2025. if (iNdEx + skippy) > l {
  2026. return io.ErrUnexpectedEOF
  2027. }
  2028. iNdEx += skippy
  2029. }
  2030. }
  2031. if iNdEx > l {
  2032. return io.ErrUnexpectedEOF
  2033. }
  2034. return nil
  2035. }
  2036. func (m *PolicyRule) Unmarshal(dAtA []byte) error {
  2037. l := len(dAtA)
  2038. iNdEx := 0
  2039. for iNdEx < l {
  2040. preIndex := iNdEx
  2041. var wire uint64
  2042. for shift := uint(0); ; shift += 7 {
  2043. if shift >= 64 {
  2044. return ErrIntOverflowGenerated
  2045. }
  2046. if iNdEx >= l {
  2047. return io.ErrUnexpectedEOF
  2048. }
  2049. b := dAtA[iNdEx]
  2050. iNdEx++
  2051. wire |= uint64(b&0x7F) << shift
  2052. if b < 0x80 {
  2053. break
  2054. }
  2055. }
  2056. fieldNum := int32(wire >> 3)
  2057. wireType := int(wire & 0x7)
  2058. if wireType == 4 {
  2059. return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
  2060. }
  2061. if fieldNum <= 0 {
  2062. return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
  2063. }
  2064. switch fieldNum {
  2065. case 1:
  2066. if wireType != 2 {
  2067. return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
  2068. }
  2069. var stringLen uint64
  2070. for shift := uint(0); ; shift += 7 {
  2071. if shift >= 64 {
  2072. return ErrIntOverflowGenerated
  2073. }
  2074. if iNdEx >= l {
  2075. return io.ErrUnexpectedEOF
  2076. }
  2077. b := dAtA[iNdEx]
  2078. iNdEx++
  2079. stringLen |= uint64(b&0x7F) << shift
  2080. if b < 0x80 {
  2081. break
  2082. }
  2083. }
  2084. intStringLen := int(stringLen)
  2085. if intStringLen < 0 {
  2086. return ErrInvalidLengthGenerated
  2087. }
  2088. postIndex := iNdEx + intStringLen
  2089. if postIndex < 0 {
  2090. return ErrInvalidLengthGenerated
  2091. }
  2092. if postIndex > l {
  2093. return io.ErrUnexpectedEOF
  2094. }
  2095. m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
  2096. iNdEx = postIndex
  2097. case 3:
  2098. if wireType != 2 {
  2099. return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
  2100. }
  2101. var stringLen uint64
  2102. for shift := uint(0); ; shift += 7 {
  2103. if shift >= 64 {
  2104. return ErrIntOverflowGenerated
  2105. }
  2106. if iNdEx >= l {
  2107. return io.ErrUnexpectedEOF
  2108. }
  2109. b := dAtA[iNdEx]
  2110. iNdEx++
  2111. stringLen |= uint64(b&0x7F) << shift
  2112. if b < 0x80 {
  2113. break
  2114. }
  2115. }
  2116. intStringLen := int(stringLen)
  2117. if intStringLen < 0 {
  2118. return ErrInvalidLengthGenerated
  2119. }
  2120. postIndex := iNdEx + intStringLen
  2121. if postIndex < 0 {
  2122. return ErrInvalidLengthGenerated
  2123. }
  2124. if postIndex > l {
  2125. return io.ErrUnexpectedEOF
  2126. }
  2127. m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
  2128. iNdEx = postIndex
  2129. case 4:
  2130. if wireType != 2 {
  2131. return fmt.Errorf("proto: wrong wireType = %d for field Resources", 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 < 0 {
  2154. return ErrInvalidLengthGenerated
  2155. }
  2156. if postIndex > l {
  2157. return io.ErrUnexpectedEOF
  2158. }
  2159. m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
  2160. iNdEx = postIndex
  2161. case 5:
  2162. if wireType != 2 {
  2163. return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
  2164. }
  2165. var stringLen uint64
  2166. for shift := uint(0); ; shift += 7 {
  2167. if shift >= 64 {
  2168. return ErrIntOverflowGenerated
  2169. }
  2170. if iNdEx >= l {
  2171. return io.ErrUnexpectedEOF
  2172. }
  2173. b := dAtA[iNdEx]
  2174. iNdEx++
  2175. stringLen |= uint64(b&0x7F) << shift
  2176. if b < 0x80 {
  2177. break
  2178. }
  2179. }
  2180. intStringLen := int(stringLen)
  2181. if intStringLen < 0 {
  2182. return ErrInvalidLengthGenerated
  2183. }
  2184. postIndex := iNdEx + intStringLen
  2185. if postIndex < 0 {
  2186. return ErrInvalidLengthGenerated
  2187. }
  2188. if postIndex > l {
  2189. return io.ErrUnexpectedEOF
  2190. }
  2191. m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
  2192. iNdEx = postIndex
  2193. case 6:
  2194. if wireType != 2 {
  2195. return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
  2196. }
  2197. var stringLen uint64
  2198. for shift := uint(0); ; shift += 7 {
  2199. if shift >= 64 {
  2200. return ErrIntOverflowGenerated
  2201. }
  2202. if iNdEx >= l {
  2203. return io.ErrUnexpectedEOF
  2204. }
  2205. b := dAtA[iNdEx]
  2206. iNdEx++
  2207. stringLen |= uint64(b&0x7F) << shift
  2208. if b < 0x80 {
  2209. break
  2210. }
  2211. }
  2212. intStringLen := int(stringLen)
  2213. if intStringLen < 0 {
  2214. return ErrInvalidLengthGenerated
  2215. }
  2216. postIndex := iNdEx + intStringLen
  2217. if postIndex < 0 {
  2218. return ErrInvalidLengthGenerated
  2219. }
  2220. if postIndex > l {
  2221. return io.ErrUnexpectedEOF
  2222. }
  2223. m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
  2224. iNdEx = postIndex
  2225. default:
  2226. iNdEx = preIndex
  2227. skippy, err := skipGenerated(dAtA[iNdEx:])
  2228. if err != nil {
  2229. return err
  2230. }
  2231. if skippy < 0 {
  2232. return ErrInvalidLengthGenerated
  2233. }
  2234. if (iNdEx + skippy) < 0 {
  2235. return ErrInvalidLengthGenerated
  2236. }
  2237. if (iNdEx + skippy) > l {
  2238. return io.ErrUnexpectedEOF
  2239. }
  2240. iNdEx += skippy
  2241. }
  2242. }
  2243. if iNdEx > l {
  2244. return io.ErrUnexpectedEOF
  2245. }
  2246. return nil
  2247. }
  2248. func (m *Role) Unmarshal(dAtA []byte) error {
  2249. l := len(dAtA)
  2250. iNdEx := 0
  2251. for iNdEx < l {
  2252. preIndex := iNdEx
  2253. var wire uint64
  2254. for shift := uint(0); ; shift += 7 {
  2255. if shift >= 64 {
  2256. return ErrIntOverflowGenerated
  2257. }
  2258. if iNdEx >= l {
  2259. return io.ErrUnexpectedEOF
  2260. }
  2261. b := dAtA[iNdEx]
  2262. iNdEx++
  2263. wire |= uint64(b&0x7F) << shift
  2264. if b < 0x80 {
  2265. break
  2266. }
  2267. }
  2268. fieldNum := int32(wire >> 3)
  2269. wireType := int(wire & 0x7)
  2270. if wireType == 4 {
  2271. return fmt.Errorf("proto: Role: wiretype end group for non-group")
  2272. }
  2273. if fieldNum <= 0 {
  2274. return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
  2275. }
  2276. switch fieldNum {
  2277. case 1:
  2278. if wireType != 2 {
  2279. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  2280. }
  2281. var msglen int
  2282. for shift := uint(0); ; shift += 7 {
  2283. if shift >= 64 {
  2284. return ErrIntOverflowGenerated
  2285. }
  2286. if iNdEx >= l {
  2287. return io.ErrUnexpectedEOF
  2288. }
  2289. b := dAtA[iNdEx]
  2290. iNdEx++
  2291. msglen |= int(b&0x7F) << shift
  2292. if b < 0x80 {
  2293. break
  2294. }
  2295. }
  2296. if msglen < 0 {
  2297. return ErrInvalidLengthGenerated
  2298. }
  2299. postIndex := iNdEx + msglen
  2300. if postIndex < 0 {
  2301. return ErrInvalidLengthGenerated
  2302. }
  2303. if postIndex > l {
  2304. return io.ErrUnexpectedEOF
  2305. }
  2306. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2307. return err
  2308. }
  2309. iNdEx = postIndex
  2310. case 2:
  2311. if wireType != 2 {
  2312. return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
  2313. }
  2314. var msglen int
  2315. for shift := uint(0); ; shift += 7 {
  2316. if shift >= 64 {
  2317. return ErrIntOverflowGenerated
  2318. }
  2319. if iNdEx >= l {
  2320. return io.ErrUnexpectedEOF
  2321. }
  2322. b := dAtA[iNdEx]
  2323. iNdEx++
  2324. msglen |= int(b&0x7F) << shift
  2325. if b < 0x80 {
  2326. break
  2327. }
  2328. }
  2329. if msglen < 0 {
  2330. return ErrInvalidLengthGenerated
  2331. }
  2332. postIndex := iNdEx + msglen
  2333. if postIndex < 0 {
  2334. return ErrInvalidLengthGenerated
  2335. }
  2336. if postIndex > l {
  2337. return io.ErrUnexpectedEOF
  2338. }
  2339. m.Rules = append(m.Rules, PolicyRule{})
  2340. if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2341. return err
  2342. }
  2343. iNdEx = postIndex
  2344. default:
  2345. iNdEx = preIndex
  2346. skippy, err := skipGenerated(dAtA[iNdEx:])
  2347. if err != nil {
  2348. return err
  2349. }
  2350. if skippy < 0 {
  2351. return ErrInvalidLengthGenerated
  2352. }
  2353. if (iNdEx + skippy) < 0 {
  2354. return ErrInvalidLengthGenerated
  2355. }
  2356. if (iNdEx + skippy) > l {
  2357. return io.ErrUnexpectedEOF
  2358. }
  2359. iNdEx += skippy
  2360. }
  2361. }
  2362. if iNdEx > l {
  2363. return io.ErrUnexpectedEOF
  2364. }
  2365. return nil
  2366. }
  2367. func (m *RoleBinding) Unmarshal(dAtA []byte) error {
  2368. l := len(dAtA)
  2369. iNdEx := 0
  2370. for iNdEx < l {
  2371. preIndex := iNdEx
  2372. var wire uint64
  2373. for shift := uint(0); ; shift += 7 {
  2374. if shift >= 64 {
  2375. return ErrIntOverflowGenerated
  2376. }
  2377. if iNdEx >= l {
  2378. return io.ErrUnexpectedEOF
  2379. }
  2380. b := dAtA[iNdEx]
  2381. iNdEx++
  2382. wire |= uint64(b&0x7F) << shift
  2383. if b < 0x80 {
  2384. break
  2385. }
  2386. }
  2387. fieldNum := int32(wire >> 3)
  2388. wireType := int(wire & 0x7)
  2389. if wireType == 4 {
  2390. return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
  2391. }
  2392. if fieldNum <= 0 {
  2393. return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
  2394. }
  2395. switch fieldNum {
  2396. case 1:
  2397. if wireType != 2 {
  2398. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  2399. }
  2400. var msglen int
  2401. for shift := uint(0); ; shift += 7 {
  2402. if shift >= 64 {
  2403. return ErrIntOverflowGenerated
  2404. }
  2405. if iNdEx >= l {
  2406. return io.ErrUnexpectedEOF
  2407. }
  2408. b := dAtA[iNdEx]
  2409. iNdEx++
  2410. msglen |= int(b&0x7F) << shift
  2411. if b < 0x80 {
  2412. break
  2413. }
  2414. }
  2415. if msglen < 0 {
  2416. return ErrInvalidLengthGenerated
  2417. }
  2418. postIndex := iNdEx + msglen
  2419. if postIndex < 0 {
  2420. return ErrInvalidLengthGenerated
  2421. }
  2422. if postIndex > l {
  2423. return io.ErrUnexpectedEOF
  2424. }
  2425. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2426. return err
  2427. }
  2428. iNdEx = postIndex
  2429. case 2:
  2430. if wireType != 2 {
  2431. return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
  2432. }
  2433. var msglen int
  2434. for shift := uint(0); ; shift += 7 {
  2435. if shift >= 64 {
  2436. return ErrIntOverflowGenerated
  2437. }
  2438. if iNdEx >= l {
  2439. return io.ErrUnexpectedEOF
  2440. }
  2441. b := dAtA[iNdEx]
  2442. iNdEx++
  2443. msglen |= int(b&0x7F) << shift
  2444. if b < 0x80 {
  2445. break
  2446. }
  2447. }
  2448. if msglen < 0 {
  2449. return ErrInvalidLengthGenerated
  2450. }
  2451. postIndex := iNdEx + msglen
  2452. if postIndex < 0 {
  2453. return ErrInvalidLengthGenerated
  2454. }
  2455. if postIndex > l {
  2456. return io.ErrUnexpectedEOF
  2457. }
  2458. m.Subjects = append(m.Subjects, Subject{})
  2459. if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2460. return err
  2461. }
  2462. iNdEx = postIndex
  2463. case 3:
  2464. if wireType != 2 {
  2465. return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
  2466. }
  2467. var msglen int
  2468. for shift := uint(0); ; shift += 7 {
  2469. if shift >= 64 {
  2470. return ErrIntOverflowGenerated
  2471. }
  2472. if iNdEx >= l {
  2473. return io.ErrUnexpectedEOF
  2474. }
  2475. b := dAtA[iNdEx]
  2476. iNdEx++
  2477. msglen |= int(b&0x7F) << shift
  2478. if b < 0x80 {
  2479. break
  2480. }
  2481. }
  2482. if msglen < 0 {
  2483. return ErrInvalidLengthGenerated
  2484. }
  2485. postIndex := iNdEx + msglen
  2486. if postIndex < 0 {
  2487. return ErrInvalidLengthGenerated
  2488. }
  2489. if postIndex > l {
  2490. return io.ErrUnexpectedEOF
  2491. }
  2492. if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2493. return err
  2494. }
  2495. iNdEx = postIndex
  2496. default:
  2497. iNdEx = preIndex
  2498. skippy, err := skipGenerated(dAtA[iNdEx:])
  2499. if err != nil {
  2500. return err
  2501. }
  2502. if skippy < 0 {
  2503. return ErrInvalidLengthGenerated
  2504. }
  2505. if (iNdEx + skippy) < 0 {
  2506. return ErrInvalidLengthGenerated
  2507. }
  2508. if (iNdEx + skippy) > l {
  2509. return io.ErrUnexpectedEOF
  2510. }
  2511. iNdEx += skippy
  2512. }
  2513. }
  2514. if iNdEx > l {
  2515. return io.ErrUnexpectedEOF
  2516. }
  2517. return nil
  2518. }
  2519. func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
  2520. l := len(dAtA)
  2521. iNdEx := 0
  2522. for iNdEx < l {
  2523. preIndex := iNdEx
  2524. var wire uint64
  2525. for shift := uint(0); ; shift += 7 {
  2526. if shift >= 64 {
  2527. return ErrIntOverflowGenerated
  2528. }
  2529. if iNdEx >= l {
  2530. return io.ErrUnexpectedEOF
  2531. }
  2532. b := dAtA[iNdEx]
  2533. iNdEx++
  2534. wire |= uint64(b&0x7F) << shift
  2535. if b < 0x80 {
  2536. break
  2537. }
  2538. }
  2539. fieldNum := int32(wire >> 3)
  2540. wireType := int(wire & 0x7)
  2541. if wireType == 4 {
  2542. return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
  2543. }
  2544. if fieldNum <= 0 {
  2545. return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
  2546. }
  2547. switch fieldNum {
  2548. case 1:
  2549. if wireType != 2 {
  2550. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  2551. }
  2552. var msglen int
  2553. for shift := uint(0); ; shift += 7 {
  2554. if shift >= 64 {
  2555. return ErrIntOverflowGenerated
  2556. }
  2557. if iNdEx >= l {
  2558. return io.ErrUnexpectedEOF
  2559. }
  2560. b := dAtA[iNdEx]
  2561. iNdEx++
  2562. msglen |= int(b&0x7F) << shift
  2563. if b < 0x80 {
  2564. break
  2565. }
  2566. }
  2567. if msglen < 0 {
  2568. return ErrInvalidLengthGenerated
  2569. }
  2570. postIndex := iNdEx + msglen
  2571. if postIndex < 0 {
  2572. return ErrInvalidLengthGenerated
  2573. }
  2574. if postIndex > l {
  2575. return io.ErrUnexpectedEOF
  2576. }
  2577. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2578. return err
  2579. }
  2580. iNdEx = postIndex
  2581. case 2:
  2582. if wireType != 2 {
  2583. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  2584. }
  2585. var msglen int
  2586. for shift := uint(0); ; shift += 7 {
  2587. if shift >= 64 {
  2588. return ErrIntOverflowGenerated
  2589. }
  2590. if iNdEx >= l {
  2591. return io.ErrUnexpectedEOF
  2592. }
  2593. b := dAtA[iNdEx]
  2594. iNdEx++
  2595. msglen |= int(b&0x7F) << shift
  2596. if b < 0x80 {
  2597. break
  2598. }
  2599. }
  2600. if msglen < 0 {
  2601. return ErrInvalidLengthGenerated
  2602. }
  2603. postIndex := iNdEx + msglen
  2604. if postIndex < 0 {
  2605. return ErrInvalidLengthGenerated
  2606. }
  2607. if postIndex > l {
  2608. return io.ErrUnexpectedEOF
  2609. }
  2610. m.Items = append(m.Items, RoleBinding{})
  2611. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2612. return err
  2613. }
  2614. iNdEx = postIndex
  2615. default:
  2616. iNdEx = preIndex
  2617. skippy, err := skipGenerated(dAtA[iNdEx:])
  2618. if err != nil {
  2619. return err
  2620. }
  2621. if skippy < 0 {
  2622. return ErrInvalidLengthGenerated
  2623. }
  2624. if (iNdEx + skippy) < 0 {
  2625. return ErrInvalidLengthGenerated
  2626. }
  2627. if (iNdEx + skippy) > l {
  2628. return io.ErrUnexpectedEOF
  2629. }
  2630. iNdEx += skippy
  2631. }
  2632. }
  2633. if iNdEx > l {
  2634. return io.ErrUnexpectedEOF
  2635. }
  2636. return nil
  2637. }
  2638. func (m *RoleList) Unmarshal(dAtA []byte) error {
  2639. l := len(dAtA)
  2640. iNdEx := 0
  2641. for iNdEx < l {
  2642. preIndex := iNdEx
  2643. var wire uint64
  2644. for shift := uint(0); ; shift += 7 {
  2645. if shift >= 64 {
  2646. return ErrIntOverflowGenerated
  2647. }
  2648. if iNdEx >= l {
  2649. return io.ErrUnexpectedEOF
  2650. }
  2651. b := dAtA[iNdEx]
  2652. iNdEx++
  2653. wire |= uint64(b&0x7F) << shift
  2654. if b < 0x80 {
  2655. break
  2656. }
  2657. }
  2658. fieldNum := int32(wire >> 3)
  2659. wireType := int(wire & 0x7)
  2660. if wireType == 4 {
  2661. return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
  2662. }
  2663. if fieldNum <= 0 {
  2664. return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
  2665. }
  2666. switch fieldNum {
  2667. case 1:
  2668. if wireType != 2 {
  2669. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  2670. }
  2671. var msglen int
  2672. for shift := uint(0); ; shift += 7 {
  2673. if shift >= 64 {
  2674. return ErrIntOverflowGenerated
  2675. }
  2676. if iNdEx >= l {
  2677. return io.ErrUnexpectedEOF
  2678. }
  2679. b := dAtA[iNdEx]
  2680. iNdEx++
  2681. msglen |= int(b&0x7F) << shift
  2682. if b < 0x80 {
  2683. break
  2684. }
  2685. }
  2686. if msglen < 0 {
  2687. return ErrInvalidLengthGenerated
  2688. }
  2689. postIndex := iNdEx + msglen
  2690. if postIndex < 0 {
  2691. return ErrInvalidLengthGenerated
  2692. }
  2693. if postIndex > l {
  2694. return io.ErrUnexpectedEOF
  2695. }
  2696. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2697. return err
  2698. }
  2699. iNdEx = postIndex
  2700. case 2:
  2701. if wireType != 2 {
  2702. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  2703. }
  2704. var msglen int
  2705. for shift := uint(0); ; shift += 7 {
  2706. if shift >= 64 {
  2707. return ErrIntOverflowGenerated
  2708. }
  2709. if iNdEx >= l {
  2710. return io.ErrUnexpectedEOF
  2711. }
  2712. b := dAtA[iNdEx]
  2713. iNdEx++
  2714. msglen |= int(b&0x7F) << shift
  2715. if b < 0x80 {
  2716. break
  2717. }
  2718. }
  2719. if msglen < 0 {
  2720. return ErrInvalidLengthGenerated
  2721. }
  2722. postIndex := iNdEx + msglen
  2723. if postIndex < 0 {
  2724. return ErrInvalidLengthGenerated
  2725. }
  2726. if postIndex > l {
  2727. return io.ErrUnexpectedEOF
  2728. }
  2729. m.Items = append(m.Items, Role{})
  2730. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2731. return err
  2732. }
  2733. iNdEx = postIndex
  2734. default:
  2735. iNdEx = preIndex
  2736. skippy, err := skipGenerated(dAtA[iNdEx:])
  2737. if err != nil {
  2738. return err
  2739. }
  2740. if skippy < 0 {
  2741. return ErrInvalidLengthGenerated
  2742. }
  2743. if (iNdEx + skippy) < 0 {
  2744. return ErrInvalidLengthGenerated
  2745. }
  2746. if (iNdEx + skippy) > l {
  2747. return io.ErrUnexpectedEOF
  2748. }
  2749. iNdEx += skippy
  2750. }
  2751. }
  2752. if iNdEx > l {
  2753. return io.ErrUnexpectedEOF
  2754. }
  2755. return nil
  2756. }
  2757. func (m *RoleRef) Unmarshal(dAtA []byte) error {
  2758. l := len(dAtA)
  2759. iNdEx := 0
  2760. for iNdEx < l {
  2761. preIndex := iNdEx
  2762. var wire uint64
  2763. for shift := uint(0); ; shift += 7 {
  2764. if shift >= 64 {
  2765. return ErrIntOverflowGenerated
  2766. }
  2767. if iNdEx >= l {
  2768. return io.ErrUnexpectedEOF
  2769. }
  2770. b := dAtA[iNdEx]
  2771. iNdEx++
  2772. wire |= uint64(b&0x7F) << shift
  2773. if b < 0x80 {
  2774. break
  2775. }
  2776. }
  2777. fieldNum := int32(wire >> 3)
  2778. wireType := int(wire & 0x7)
  2779. if wireType == 4 {
  2780. return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
  2781. }
  2782. if fieldNum <= 0 {
  2783. return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
  2784. }
  2785. switch fieldNum {
  2786. case 1:
  2787. if wireType != 2 {
  2788. return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
  2789. }
  2790. var stringLen uint64
  2791. for shift := uint(0); ; shift += 7 {
  2792. if shift >= 64 {
  2793. return ErrIntOverflowGenerated
  2794. }
  2795. if iNdEx >= l {
  2796. return io.ErrUnexpectedEOF
  2797. }
  2798. b := dAtA[iNdEx]
  2799. iNdEx++
  2800. stringLen |= uint64(b&0x7F) << shift
  2801. if b < 0x80 {
  2802. break
  2803. }
  2804. }
  2805. intStringLen := int(stringLen)
  2806. if intStringLen < 0 {
  2807. return ErrInvalidLengthGenerated
  2808. }
  2809. postIndex := iNdEx + intStringLen
  2810. if postIndex < 0 {
  2811. return ErrInvalidLengthGenerated
  2812. }
  2813. if postIndex > l {
  2814. return io.ErrUnexpectedEOF
  2815. }
  2816. m.APIGroup = string(dAtA[iNdEx:postIndex])
  2817. iNdEx = postIndex
  2818. case 2:
  2819. if wireType != 2 {
  2820. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  2821. }
  2822. var stringLen uint64
  2823. for shift := uint(0); ; shift += 7 {
  2824. if shift >= 64 {
  2825. return ErrIntOverflowGenerated
  2826. }
  2827. if iNdEx >= l {
  2828. return io.ErrUnexpectedEOF
  2829. }
  2830. b := dAtA[iNdEx]
  2831. iNdEx++
  2832. stringLen |= uint64(b&0x7F) << shift
  2833. if b < 0x80 {
  2834. break
  2835. }
  2836. }
  2837. intStringLen := int(stringLen)
  2838. if intStringLen < 0 {
  2839. return ErrInvalidLengthGenerated
  2840. }
  2841. postIndex := iNdEx + intStringLen
  2842. if postIndex < 0 {
  2843. return ErrInvalidLengthGenerated
  2844. }
  2845. if postIndex > l {
  2846. return io.ErrUnexpectedEOF
  2847. }
  2848. m.Kind = string(dAtA[iNdEx:postIndex])
  2849. iNdEx = postIndex
  2850. case 3:
  2851. if wireType != 2 {
  2852. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2853. }
  2854. var stringLen 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. stringLen |= uint64(b&0x7F) << shift
  2865. if b < 0x80 {
  2866. break
  2867. }
  2868. }
  2869. intStringLen := int(stringLen)
  2870. if intStringLen < 0 {
  2871. return ErrInvalidLengthGenerated
  2872. }
  2873. postIndex := iNdEx + intStringLen
  2874. if postIndex < 0 {
  2875. return ErrInvalidLengthGenerated
  2876. }
  2877. if postIndex > l {
  2878. return io.ErrUnexpectedEOF
  2879. }
  2880. m.Name = string(dAtA[iNdEx:postIndex])
  2881. iNdEx = postIndex
  2882. default:
  2883. iNdEx = preIndex
  2884. skippy, err := skipGenerated(dAtA[iNdEx:])
  2885. if err != nil {
  2886. return err
  2887. }
  2888. if skippy < 0 {
  2889. return ErrInvalidLengthGenerated
  2890. }
  2891. if (iNdEx + skippy) < 0 {
  2892. return ErrInvalidLengthGenerated
  2893. }
  2894. if (iNdEx + skippy) > l {
  2895. return io.ErrUnexpectedEOF
  2896. }
  2897. iNdEx += skippy
  2898. }
  2899. }
  2900. if iNdEx > l {
  2901. return io.ErrUnexpectedEOF
  2902. }
  2903. return nil
  2904. }
  2905. func (m *Subject) Unmarshal(dAtA []byte) error {
  2906. l := len(dAtA)
  2907. iNdEx := 0
  2908. for iNdEx < l {
  2909. preIndex := iNdEx
  2910. var wire uint64
  2911. for shift := uint(0); ; shift += 7 {
  2912. if shift >= 64 {
  2913. return ErrIntOverflowGenerated
  2914. }
  2915. if iNdEx >= l {
  2916. return io.ErrUnexpectedEOF
  2917. }
  2918. b := dAtA[iNdEx]
  2919. iNdEx++
  2920. wire |= uint64(b&0x7F) << shift
  2921. if b < 0x80 {
  2922. break
  2923. }
  2924. }
  2925. fieldNum := int32(wire >> 3)
  2926. wireType := int(wire & 0x7)
  2927. if wireType == 4 {
  2928. return fmt.Errorf("proto: Subject: wiretype end group for non-group")
  2929. }
  2930. if fieldNum <= 0 {
  2931. return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
  2932. }
  2933. switch fieldNum {
  2934. case 1:
  2935. if wireType != 2 {
  2936. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  2937. }
  2938. var stringLen uint64
  2939. for shift := uint(0); ; shift += 7 {
  2940. if shift >= 64 {
  2941. return ErrIntOverflowGenerated
  2942. }
  2943. if iNdEx >= l {
  2944. return io.ErrUnexpectedEOF
  2945. }
  2946. b := dAtA[iNdEx]
  2947. iNdEx++
  2948. stringLen |= uint64(b&0x7F) << shift
  2949. if b < 0x80 {
  2950. break
  2951. }
  2952. }
  2953. intStringLen := int(stringLen)
  2954. if intStringLen < 0 {
  2955. return ErrInvalidLengthGenerated
  2956. }
  2957. postIndex := iNdEx + intStringLen
  2958. if postIndex < 0 {
  2959. return ErrInvalidLengthGenerated
  2960. }
  2961. if postIndex > l {
  2962. return io.ErrUnexpectedEOF
  2963. }
  2964. m.Kind = string(dAtA[iNdEx:postIndex])
  2965. iNdEx = postIndex
  2966. case 2:
  2967. if wireType != 2 {
  2968. return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
  2969. }
  2970. var stringLen uint64
  2971. for shift := uint(0); ; shift += 7 {
  2972. if shift >= 64 {
  2973. return ErrIntOverflowGenerated
  2974. }
  2975. if iNdEx >= l {
  2976. return io.ErrUnexpectedEOF
  2977. }
  2978. b := dAtA[iNdEx]
  2979. iNdEx++
  2980. stringLen |= uint64(b&0x7F) << shift
  2981. if b < 0x80 {
  2982. break
  2983. }
  2984. }
  2985. intStringLen := int(stringLen)
  2986. if intStringLen < 0 {
  2987. return ErrInvalidLengthGenerated
  2988. }
  2989. postIndex := iNdEx + intStringLen
  2990. if postIndex < 0 {
  2991. return ErrInvalidLengthGenerated
  2992. }
  2993. if postIndex > l {
  2994. return io.ErrUnexpectedEOF
  2995. }
  2996. m.APIVersion = string(dAtA[iNdEx:postIndex])
  2997. iNdEx = postIndex
  2998. case 3:
  2999. if wireType != 2 {
  3000. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3001. }
  3002. var stringLen uint64
  3003. for shift := uint(0); ; shift += 7 {
  3004. if shift >= 64 {
  3005. return ErrIntOverflowGenerated
  3006. }
  3007. if iNdEx >= l {
  3008. return io.ErrUnexpectedEOF
  3009. }
  3010. b := dAtA[iNdEx]
  3011. iNdEx++
  3012. stringLen |= uint64(b&0x7F) << shift
  3013. if b < 0x80 {
  3014. break
  3015. }
  3016. }
  3017. intStringLen := int(stringLen)
  3018. if intStringLen < 0 {
  3019. return ErrInvalidLengthGenerated
  3020. }
  3021. postIndex := iNdEx + intStringLen
  3022. if postIndex < 0 {
  3023. return ErrInvalidLengthGenerated
  3024. }
  3025. if postIndex > l {
  3026. return io.ErrUnexpectedEOF
  3027. }
  3028. m.Name = string(dAtA[iNdEx:postIndex])
  3029. iNdEx = postIndex
  3030. case 4:
  3031. if wireType != 2 {
  3032. return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
  3033. }
  3034. var stringLen uint64
  3035. for shift := uint(0); ; shift += 7 {
  3036. if shift >= 64 {
  3037. return ErrIntOverflowGenerated
  3038. }
  3039. if iNdEx >= l {
  3040. return io.ErrUnexpectedEOF
  3041. }
  3042. b := dAtA[iNdEx]
  3043. iNdEx++
  3044. stringLen |= uint64(b&0x7F) << shift
  3045. if b < 0x80 {
  3046. break
  3047. }
  3048. }
  3049. intStringLen := int(stringLen)
  3050. if intStringLen < 0 {
  3051. return ErrInvalidLengthGenerated
  3052. }
  3053. postIndex := iNdEx + intStringLen
  3054. if postIndex < 0 {
  3055. return ErrInvalidLengthGenerated
  3056. }
  3057. if postIndex > l {
  3058. return io.ErrUnexpectedEOF
  3059. }
  3060. m.Namespace = string(dAtA[iNdEx:postIndex])
  3061. iNdEx = postIndex
  3062. default:
  3063. iNdEx = preIndex
  3064. skippy, err := skipGenerated(dAtA[iNdEx:])
  3065. if err != nil {
  3066. return err
  3067. }
  3068. if skippy < 0 {
  3069. return ErrInvalidLengthGenerated
  3070. }
  3071. if (iNdEx + skippy) < 0 {
  3072. return ErrInvalidLengthGenerated
  3073. }
  3074. if (iNdEx + skippy) > l {
  3075. return io.ErrUnexpectedEOF
  3076. }
  3077. iNdEx += skippy
  3078. }
  3079. }
  3080. if iNdEx > l {
  3081. return io.ErrUnexpectedEOF
  3082. }
  3083. return nil
  3084. }
  3085. func skipGenerated(dAtA []byte) (n int, err error) {
  3086. l := len(dAtA)
  3087. iNdEx := 0
  3088. depth := 0
  3089. for iNdEx < l {
  3090. var wire uint64
  3091. for shift := uint(0); ; shift += 7 {
  3092. if shift >= 64 {
  3093. return 0, ErrIntOverflowGenerated
  3094. }
  3095. if iNdEx >= l {
  3096. return 0, io.ErrUnexpectedEOF
  3097. }
  3098. b := dAtA[iNdEx]
  3099. iNdEx++
  3100. wire |= (uint64(b) & 0x7F) << shift
  3101. if b < 0x80 {
  3102. break
  3103. }
  3104. }
  3105. wireType := int(wire & 0x7)
  3106. switch wireType {
  3107. case 0:
  3108. for shift := uint(0); ; shift += 7 {
  3109. if shift >= 64 {
  3110. return 0, ErrIntOverflowGenerated
  3111. }
  3112. if iNdEx >= l {
  3113. return 0, io.ErrUnexpectedEOF
  3114. }
  3115. iNdEx++
  3116. if dAtA[iNdEx-1] < 0x80 {
  3117. break
  3118. }
  3119. }
  3120. case 1:
  3121. iNdEx += 8
  3122. case 2:
  3123. var length int
  3124. for shift := uint(0); ; shift += 7 {
  3125. if shift >= 64 {
  3126. return 0, ErrIntOverflowGenerated
  3127. }
  3128. if iNdEx >= l {
  3129. return 0, io.ErrUnexpectedEOF
  3130. }
  3131. b := dAtA[iNdEx]
  3132. iNdEx++
  3133. length |= (int(b) & 0x7F) << shift
  3134. if b < 0x80 {
  3135. break
  3136. }
  3137. }
  3138. if length < 0 {
  3139. return 0, ErrInvalidLengthGenerated
  3140. }
  3141. iNdEx += length
  3142. case 3:
  3143. depth++
  3144. case 4:
  3145. if depth == 0 {
  3146. return 0, ErrUnexpectedEndOfGroupGenerated
  3147. }
  3148. depth--
  3149. case 5:
  3150. iNdEx += 4
  3151. default:
  3152. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3153. }
  3154. if iNdEx < 0 {
  3155. return 0, ErrInvalidLengthGenerated
  3156. }
  3157. if depth == 0 {
  3158. return iNdEx, nil
  3159. }
  3160. }
  3161. return 0, io.ErrUnexpectedEOF
  3162. }
  3163. var (
  3164. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  3165. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  3166. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  3167. )