generated.pb.go 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231
  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) || (iNdEx+skippy) < 0 {
  1475. return ErrInvalidLengthGenerated
  1476. }
  1477. if (iNdEx + skippy) > l {
  1478. return io.ErrUnexpectedEOF
  1479. }
  1480. iNdEx += skippy
  1481. }
  1482. }
  1483. if iNdEx > l {
  1484. return io.ErrUnexpectedEOF
  1485. }
  1486. return nil
  1487. }
  1488. func (m *ClusterRole) Unmarshal(dAtA []byte) error {
  1489. l := len(dAtA)
  1490. iNdEx := 0
  1491. for iNdEx < l {
  1492. preIndex := iNdEx
  1493. var wire uint64
  1494. for shift := uint(0); ; shift += 7 {
  1495. if shift >= 64 {
  1496. return ErrIntOverflowGenerated
  1497. }
  1498. if iNdEx >= l {
  1499. return io.ErrUnexpectedEOF
  1500. }
  1501. b := dAtA[iNdEx]
  1502. iNdEx++
  1503. wire |= uint64(b&0x7F) << shift
  1504. if b < 0x80 {
  1505. break
  1506. }
  1507. }
  1508. fieldNum := int32(wire >> 3)
  1509. wireType := int(wire & 0x7)
  1510. if wireType == 4 {
  1511. return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
  1512. }
  1513. if fieldNum <= 0 {
  1514. return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
  1515. }
  1516. switch fieldNum {
  1517. case 1:
  1518. if wireType != 2 {
  1519. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  1520. }
  1521. var msglen int
  1522. for shift := uint(0); ; shift += 7 {
  1523. if shift >= 64 {
  1524. return ErrIntOverflowGenerated
  1525. }
  1526. if iNdEx >= l {
  1527. return io.ErrUnexpectedEOF
  1528. }
  1529. b := dAtA[iNdEx]
  1530. iNdEx++
  1531. msglen |= int(b&0x7F) << shift
  1532. if b < 0x80 {
  1533. break
  1534. }
  1535. }
  1536. if msglen < 0 {
  1537. return ErrInvalidLengthGenerated
  1538. }
  1539. postIndex := iNdEx + msglen
  1540. if postIndex < 0 {
  1541. return ErrInvalidLengthGenerated
  1542. }
  1543. if postIndex > l {
  1544. return io.ErrUnexpectedEOF
  1545. }
  1546. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1547. return err
  1548. }
  1549. iNdEx = postIndex
  1550. case 2:
  1551. if wireType != 2 {
  1552. return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
  1553. }
  1554. var msglen int
  1555. for shift := uint(0); ; shift += 7 {
  1556. if shift >= 64 {
  1557. return ErrIntOverflowGenerated
  1558. }
  1559. if iNdEx >= l {
  1560. return io.ErrUnexpectedEOF
  1561. }
  1562. b := dAtA[iNdEx]
  1563. iNdEx++
  1564. msglen |= int(b&0x7F) << shift
  1565. if b < 0x80 {
  1566. break
  1567. }
  1568. }
  1569. if msglen < 0 {
  1570. return ErrInvalidLengthGenerated
  1571. }
  1572. postIndex := iNdEx + msglen
  1573. if postIndex < 0 {
  1574. return ErrInvalidLengthGenerated
  1575. }
  1576. if postIndex > l {
  1577. return io.ErrUnexpectedEOF
  1578. }
  1579. m.Rules = append(m.Rules, PolicyRule{})
  1580. if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1581. return err
  1582. }
  1583. iNdEx = postIndex
  1584. case 3:
  1585. if wireType != 2 {
  1586. return fmt.Errorf("proto: wrong wireType = %d for field AggregationRule", wireType)
  1587. }
  1588. var msglen int
  1589. for shift := uint(0); ; shift += 7 {
  1590. if shift >= 64 {
  1591. return ErrIntOverflowGenerated
  1592. }
  1593. if iNdEx >= l {
  1594. return io.ErrUnexpectedEOF
  1595. }
  1596. b := dAtA[iNdEx]
  1597. iNdEx++
  1598. msglen |= int(b&0x7F) << shift
  1599. if b < 0x80 {
  1600. break
  1601. }
  1602. }
  1603. if msglen < 0 {
  1604. return ErrInvalidLengthGenerated
  1605. }
  1606. postIndex := iNdEx + msglen
  1607. if postIndex < 0 {
  1608. return ErrInvalidLengthGenerated
  1609. }
  1610. if postIndex > l {
  1611. return io.ErrUnexpectedEOF
  1612. }
  1613. if m.AggregationRule == nil {
  1614. m.AggregationRule = &AggregationRule{}
  1615. }
  1616. if err := m.AggregationRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1617. return err
  1618. }
  1619. iNdEx = postIndex
  1620. default:
  1621. iNdEx = preIndex
  1622. skippy, err := skipGenerated(dAtA[iNdEx:])
  1623. if err != nil {
  1624. return err
  1625. }
  1626. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1627. return ErrInvalidLengthGenerated
  1628. }
  1629. if (iNdEx + skippy) > l {
  1630. return io.ErrUnexpectedEOF
  1631. }
  1632. iNdEx += skippy
  1633. }
  1634. }
  1635. if iNdEx > l {
  1636. return io.ErrUnexpectedEOF
  1637. }
  1638. return nil
  1639. }
  1640. func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
  1641. l := len(dAtA)
  1642. iNdEx := 0
  1643. for iNdEx < l {
  1644. preIndex := iNdEx
  1645. var wire uint64
  1646. for shift := uint(0); ; shift += 7 {
  1647. if shift >= 64 {
  1648. return ErrIntOverflowGenerated
  1649. }
  1650. if iNdEx >= l {
  1651. return io.ErrUnexpectedEOF
  1652. }
  1653. b := dAtA[iNdEx]
  1654. iNdEx++
  1655. wire |= uint64(b&0x7F) << shift
  1656. if b < 0x80 {
  1657. break
  1658. }
  1659. }
  1660. fieldNum := int32(wire >> 3)
  1661. wireType := int(wire & 0x7)
  1662. if wireType == 4 {
  1663. return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
  1664. }
  1665. if fieldNum <= 0 {
  1666. return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
  1667. }
  1668. switch fieldNum {
  1669. case 1:
  1670. if wireType != 2 {
  1671. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  1672. }
  1673. var msglen int
  1674. for shift := uint(0); ; shift += 7 {
  1675. if shift >= 64 {
  1676. return ErrIntOverflowGenerated
  1677. }
  1678. if iNdEx >= l {
  1679. return io.ErrUnexpectedEOF
  1680. }
  1681. b := dAtA[iNdEx]
  1682. iNdEx++
  1683. msglen |= int(b&0x7F) << shift
  1684. if b < 0x80 {
  1685. break
  1686. }
  1687. }
  1688. if msglen < 0 {
  1689. return ErrInvalidLengthGenerated
  1690. }
  1691. postIndex := iNdEx + msglen
  1692. if postIndex < 0 {
  1693. return ErrInvalidLengthGenerated
  1694. }
  1695. if postIndex > l {
  1696. return io.ErrUnexpectedEOF
  1697. }
  1698. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1699. return err
  1700. }
  1701. iNdEx = postIndex
  1702. case 2:
  1703. if wireType != 2 {
  1704. return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
  1705. }
  1706. var msglen int
  1707. for shift := uint(0); ; shift += 7 {
  1708. if shift >= 64 {
  1709. return ErrIntOverflowGenerated
  1710. }
  1711. if iNdEx >= l {
  1712. return io.ErrUnexpectedEOF
  1713. }
  1714. b := dAtA[iNdEx]
  1715. iNdEx++
  1716. msglen |= int(b&0x7F) << shift
  1717. if b < 0x80 {
  1718. break
  1719. }
  1720. }
  1721. if msglen < 0 {
  1722. return ErrInvalidLengthGenerated
  1723. }
  1724. postIndex := iNdEx + msglen
  1725. if postIndex < 0 {
  1726. return ErrInvalidLengthGenerated
  1727. }
  1728. if postIndex > l {
  1729. return io.ErrUnexpectedEOF
  1730. }
  1731. m.Subjects = append(m.Subjects, Subject{})
  1732. if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1733. return err
  1734. }
  1735. iNdEx = postIndex
  1736. case 3:
  1737. if wireType != 2 {
  1738. return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
  1739. }
  1740. var msglen int
  1741. for shift := uint(0); ; shift += 7 {
  1742. if shift >= 64 {
  1743. return ErrIntOverflowGenerated
  1744. }
  1745. if iNdEx >= l {
  1746. return io.ErrUnexpectedEOF
  1747. }
  1748. b := dAtA[iNdEx]
  1749. iNdEx++
  1750. msglen |= int(b&0x7F) << shift
  1751. if b < 0x80 {
  1752. break
  1753. }
  1754. }
  1755. if msglen < 0 {
  1756. return ErrInvalidLengthGenerated
  1757. }
  1758. postIndex := iNdEx + msglen
  1759. if postIndex < 0 {
  1760. return ErrInvalidLengthGenerated
  1761. }
  1762. if postIndex > l {
  1763. return io.ErrUnexpectedEOF
  1764. }
  1765. if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1766. return err
  1767. }
  1768. iNdEx = postIndex
  1769. default:
  1770. iNdEx = preIndex
  1771. skippy, err := skipGenerated(dAtA[iNdEx:])
  1772. if err != nil {
  1773. return err
  1774. }
  1775. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1776. return ErrInvalidLengthGenerated
  1777. }
  1778. if (iNdEx + skippy) > l {
  1779. return io.ErrUnexpectedEOF
  1780. }
  1781. iNdEx += skippy
  1782. }
  1783. }
  1784. if iNdEx > l {
  1785. return io.ErrUnexpectedEOF
  1786. }
  1787. return nil
  1788. }
  1789. func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
  1790. l := len(dAtA)
  1791. iNdEx := 0
  1792. for iNdEx < l {
  1793. preIndex := iNdEx
  1794. var wire uint64
  1795. for shift := uint(0); ; shift += 7 {
  1796. if shift >= 64 {
  1797. return ErrIntOverflowGenerated
  1798. }
  1799. if iNdEx >= l {
  1800. return io.ErrUnexpectedEOF
  1801. }
  1802. b := dAtA[iNdEx]
  1803. iNdEx++
  1804. wire |= uint64(b&0x7F) << shift
  1805. if b < 0x80 {
  1806. break
  1807. }
  1808. }
  1809. fieldNum := int32(wire >> 3)
  1810. wireType := int(wire & 0x7)
  1811. if wireType == 4 {
  1812. return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
  1813. }
  1814. if fieldNum <= 0 {
  1815. return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
  1816. }
  1817. switch fieldNum {
  1818. case 1:
  1819. if wireType != 2 {
  1820. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  1821. }
  1822. var msglen int
  1823. for shift := uint(0); ; shift += 7 {
  1824. if shift >= 64 {
  1825. return ErrIntOverflowGenerated
  1826. }
  1827. if iNdEx >= l {
  1828. return io.ErrUnexpectedEOF
  1829. }
  1830. b := dAtA[iNdEx]
  1831. iNdEx++
  1832. msglen |= int(b&0x7F) << shift
  1833. if b < 0x80 {
  1834. break
  1835. }
  1836. }
  1837. if msglen < 0 {
  1838. return ErrInvalidLengthGenerated
  1839. }
  1840. postIndex := iNdEx + msglen
  1841. if postIndex < 0 {
  1842. return ErrInvalidLengthGenerated
  1843. }
  1844. if postIndex > l {
  1845. return io.ErrUnexpectedEOF
  1846. }
  1847. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1848. return err
  1849. }
  1850. iNdEx = postIndex
  1851. case 2:
  1852. if wireType != 2 {
  1853. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  1854. }
  1855. var msglen int
  1856. for shift := uint(0); ; shift += 7 {
  1857. if shift >= 64 {
  1858. return ErrIntOverflowGenerated
  1859. }
  1860. if iNdEx >= l {
  1861. return io.ErrUnexpectedEOF
  1862. }
  1863. b := dAtA[iNdEx]
  1864. iNdEx++
  1865. msglen |= int(b&0x7F) << shift
  1866. if b < 0x80 {
  1867. break
  1868. }
  1869. }
  1870. if msglen < 0 {
  1871. return ErrInvalidLengthGenerated
  1872. }
  1873. postIndex := iNdEx + msglen
  1874. if postIndex < 0 {
  1875. return ErrInvalidLengthGenerated
  1876. }
  1877. if postIndex > l {
  1878. return io.ErrUnexpectedEOF
  1879. }
  1880. m.Items = append(m.Items, ClusterRoleBinding{})
  1881. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1882. return err
  1883. }
  1884. iNdEx = postIndex
  1885. default:
  1886. iNdEx = preIndex
  1887. skippy, err := skipGenerated(dAtA[iNdEx:])
  1888. if err != nil {
  1889. return err
  1890. }
  1891. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1892. return ErrInvalidLengthGenerated
  1893. }
  1894. if (iNdEx + skippy) > l {
  1895. return io.ErrUnexpectedEOF
  1896. }
  1897. iNdEx += skippy
  1898. }
  1899. }
  1900. if iNdEx > l {
  1901. return io.ErrUnexpectedEOF
  1902. }
  1903. return nil
  1904. }
  1905. func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
  1906. l := len(dAtA)
  1907. iNdEx := 0
  1908. for iNdEx < l {
  1909. preIndex := iNdEx
  1910. var wire uint64
  1911. for shift := uint(0); ; shift += 7 {
  1912. if shift >= 64 {
  1913. return ErrIntOverflowGenerated
  1914. }
  1915. if iNdEx >= l {
  1916. return io.ErrUnexpectedEOF
  1917. }
  1918. b := dAtA[iNdEx]
  1919. iNdEx++
  1920. wire |= uint64(b&0x7F) << shift
  1921. if b < 0x80 {
  1922. break
  1923. }
  1924. }
  1925. fieldNum := int32(wire >> 3)
  1926. wireType := int(wire & 0x7)
  1927. if wireType == 4 {
  1928. return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
  1929. }
  1930. if fieldNum <= 0 {
  1931. return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
  1932. }
  1933. switch fieldNum {
  1934. case 1:
  1935. if wireType != 2 {
  1936. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  1937. }
  1938. var msglen int
  1939. for shift := uint(0); ; shift += 7 {
  1940. if shift >= 64 {
  1941. return ErrIntOverflowGenerated
  1942. }
  1943. if iNdEx >= l {
  1944. return io.ErrUnexpectedEOF
  1945. }
  1946. b := dAtA[iNdEx]
  1947. iNdEx++
  1948. msglen |= int(b&0x7F) << shift
  1949. if b < 0x80 {
  1950. break
  1951. }
  1952. }
  1953. if msglen < 0 {
  1954. return ErrInvalidLengthGenerated
  1955. }
  1956. postIndex := iNdEx + msglen
  1957. if postIndex < 0 {
  1958. return ErrInvalidLengthGenerated
  1959. }
  1960. if postIndex > l {
  1961. return io.ErrUnexpectedEOF
  1962. }
  1963. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1964. return err
  1965. }
  1966. iNdEx = postIndex
  1967. case 2:
  1968. if wireType != 2 {
  1969. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  1970. }
  1971. var msglen int
  1972. for shift := uint(0); ; shift += 7 {
  1973. if shift >= 64 {
  1974. return ErrIntOverflowGenerated
  1975. }
  1976. if iNdEx >= l {
  1977. return io.ErrUnexpectedEOF
  1978. }
  1979. b := dAtA[iNdEx]
  1980. iNdEx++
  1981. msglen |= int(b&0x7F) << shift
  1982. if b < 0x80 {
  1983. break
  1984. }
  1985. }
  1986. if msglen < 0 {
  1987. return ErrInvalidLengthGenerated
  1988. }
  1989. postIndex := iNdEx + msglen
  1990. if postIndex < 0 {
  1991. return ErrInvalidLengthGenerated
  1992. }
  1993. if postIndex > l {
  1994. return io.ErrUnexpectedEOF
  1995. }
  1996. m.Items = append(m.Items, ClusterRole{})
  1997. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1998. return err
  1999. }
  2000. iNdEx = postIndex
  2001. default:
  2002. iNdEx = preIndex
  2003. skippy, err := skipGenerated(dAtA[iNdEx:])
  2004. if err != nil {
  2005. return err
  2006. }
  2007. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2008. return ErrInvalidLengthGenerated
  2009. }
  2010. if (iNdEx + skippy) > l {
  2011. return io.ErrUnexpectedEOF
  2012. }
  2013. iNdEx += skippy
  2014. }
  2015. }
  2016. if iNdEx > l {
  2017. return io.ErrUnexpectedEOF
  2018. }
  2019. return nil
  2020. }
  2021. func (m *PolicyRule) Unmarshal(dAtA []byte) error {
  2022. l := len(dAtA)
  2023. iNdEx := 0
  2024. for iNdEx < l {
  2025. preIndex := iNdEx
  2026. var wire uint64
  2027. for shift := uint(0); ; shift += 7 {
  2028. if shift >= 64 {
  2029. return ErrIntOverflowGenerated
  2030. }
  2031. if iNdEx >= l {
  2032. return io.ErrUnexpectedEOF
  2033. }
  2034. b := dAtA[iNdEx]
  2035. iNdEx++
  2036. wire |= uint64(b&0x7F) << shift
  2037. if b < 0x80 {
  2038. break
  2039. }
  2040. }
  2041. fieldNum := int32(wire >> 3)
  2042. wireType := int(wire & 0x7)
  2043. if wireType == 4 {
  2044. return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
  2045. }
  2046. if fieldNum <= 0 {
  2047. return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
  2048. }
  2049. switch fieldNum {
  2050. case 1:
  2051. if wireType != 2 {
  2052. return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
  2053. }
  2054. var stringLen uint64
  2055. for shift := uint(0); ; shift += 7 {
  2056. if shift >= 64 {
  2057. return ErrIntOverflowGenerated
  2058. }
  2059. if iNdEx >= l {
  2060. return io.ErrUnexpectedEOF
  2061. }
  2062. b := dAtA[iNdEx]
  2063. iNdEx++
  2064. stringLen |= uint64(b&0x7F) << shift
  2065. if b < 0x80 {
  2066. break
  2067. }
  2068. }
  2069. intStringLen := int(stringLen)
  2070. if intStringLen < 0 {
  2071. return ErrInvalidLengthGenerated
  2072. }
  2073. postIndex := iNdEx + intStringLen
  2074. if postIndex < 0 {
  2075. return ErrInvalidLengthGenerated
  2076. }
  2077. if postIndex > l {
  2078. return io.ErrUnexpectedEOF
  2079. }
  2080. m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
  2081. iNdEx = postIndex
  2082. case 3:
  2083. if wireType != 2 {
  2084. return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
  2085. }
  2086. var stringLen uint64
  2087. for shift := uint(0); ; shift += 7 {
  2088. if shift >= 64 {
  2089. return ErrIntOverflowGenerated
  2090. }
  2091. if iNdEx >= l {
  2092. return io.ErrUnexpectedEOF
  2093. }
  2094. b := dAtA[iNdEx]
  2095. iNdEx++
  2096. stringLen |= uint64(b&0x7F) << shift
  2097. if b < 0x80 {
  2098. break
  2099. }
  2100. }
  2101. intStringLen := int(stringLen)
  2102. if intStringLen < 0 {
  2103. return ErrInvalidLengthGenerated
  2104. }
  2105. postIndex := iNdEx + intStringLen
  2106. if postIndex < 0 {
  2107. return ErrInvalidLengthGenerated
  2108. }
  2109. if postIndex > l {
  2110. return io.ErrUnexpectedEOF
  2111. }
  2112. m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
  2113. iNdEx = postIndex
  2114. case 4:
  2115. if wireType != 2 {
  2116. return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
  2117. }
  2118. var stringLen uint64
  2119. for shift := uint(0); ; shift += 7 {
  2120. if shift >= 64 {
  2121. return ErrIntOverflowGenerated
  2122. }
  2123. if iNdEx >= l {
  2124. return io.ErrUnexpectedEOF
  2125. }
  2126. b := dAtA[iNdEx]
  2127. iNdEx++
  2128. stringLen |= uint64(b&0x7F) << shift
  2129. if b < 0x80 {
  2130. break
  2131. }
  2132. }
  2133. intStringLen := int(stringLen)
  2134. if intStringLen < 0 {
  2135. return ErrInvalidLengthGenerated
  2136. }
  2137. postIndex := iNdEx + intStringLen
  2138. if postIndex < 0 {
  2139. return ErrInvalidLengthGenerated
  2140. }
  2141. if postIndex > l {
  2142. return io.ErrUnexpectedEOF
  2143. }
  2144. m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
  2145. iNdEx = postIndex
  2146. case 5:
  2147. if wireType != 2 {
  2148. return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
  2149. }
  2150. var stringLen uint64
  2151. for shift := uint(0); ; shift += 7 {
  2152. if shift >= 64 {
  2153. return ErrIntOverflowGenerated
  2154. }
  2155. if iNdEx >= l {
  2156. return io.ErrUnexpectedEOF
  2157. }
  2158. b := dAtA[iNdEx]
  2159. iNdEx++
  2160. stringLen |= uint64(b&0x7F) << shift
  2161. if b < 0x80 {
  2162. break
  2163. }
  2164. }
  2165. intStringLen := int(stringLen)
  2166. if intStringLen < 0 {
  2167. return ErrInvalidLengthGenerated
  2168. }
  2169. postIndex := iNdEx + intStringLen
  2170. if postIndex < 0 {
  2171. return ErrInvalidLengthGenerated
  2172. }
  2173. if postIndex > l {
  2174. return io.ErrUnexpectedEOF
  2175. }
  2176. m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
  2177. iNdEx = postIndex
  2178. case 6:
  2179. if wireType != 2 {
  2180. return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
  2181. }
  2182. var stringLen uint64
  2183. for shift := uint(0); ; shift += 7 {
  2184. if shift >= 64 {
  2185. return ErrIntOverflowGenerated
  2186. }
  2187. if iNdEx >= l {
  2188. return io.ErrUnexpectedEOF
  2189. }
  2190. b := dAtA[iNdEx]
  2191. iNdEx++
  2192. stringLen |= uint64(b&0x7F) << shift
  2193. if b < 0x80 {
  2194. break
  2195. }
  2196. }
  2197. intStringLen := int(stringLen)
  2198. if intStringLen < 0 {
  2199. return ErrInvalidLengthGenerated
  2200. }
  2201. postIndex := iNdEx + intStringLen
  2202. if postIndex < 0 {
  2203. return ErrInvalidLengthGenerated
  2204. }
  2205. if postIndex > l {
  2206. return io.ErrUnexpectedEOF
  2207. }
  2208. m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
  2209. iNdEx = postIndex
  2210. default:
  2211. iNdEx = preIndex
  2212. skippy, err := skipGenerated(dAtA[iNdEx:])
  2213. if err != nil {
  2214. return err
  2215. }
  2216. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2217. return ErrInvalidLengthGenerated
  2218. }
  2219. if (iNdEx + skippy) > l {
  2220. return io.ErrUnexpectedEOF
  2221. }
  2222. iNdEx += skippy
  2223. }
  2224. }
  2225. if iNdEx > l {
  2226. return io.ErrUnexpectedEOF
  2227. }
  2228. return nil
  2229. }
  2230. func (m *Role) Unmarshal(dAtA []byte) error {
  2231. l := len(dAtA)
  2232. iNdEx := 0
  2233. for iNdEx < l {
  2234. preIndex := iNdEx
  2235. var wire uint64
  2236. for shift := uint(0); ; shift += 7 {
  2237. if shift >= 64 {
  2238. return ErrIntOverflowGenerated
  2239. }
  2240. if iNdEx >= l {
  2241. return io.ErrUnexpectedEOF
  2242. }
  2243. b := dAtA[iNdEx]
  2244. iNdEx++
  2245. wire |= uint64(b&0x7F) << shift
  2246. if b < 0x80 {
  2247. break
  2248. }
  2249. }
  2250. fieldNum := int32(wire >> 3)
  2251. wireType := int(wire & 0x7)
  2252. if wireType == 4 {
  2253. return fmt.Errorf("proto: Role: wiretype end group for non-group")
  2254. }
  2255. if fieldNum <= 0 {
  2256. return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
  2257. }
  2258. switch fieldNum {
  2259. case 1:
  2260. if wireType != 2 {
  2261. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  2262. }
  2263. var msglen int
  2264. for shift := uint(0); ; shift += 7 {
  2265. if shift >= 64 {
  2266. return ErrIntOverflowGenerated
  2267. }
  2268. if iNdEx >= l {
  2269. return io.ErrUnexpectedEOF
  2270. }
  2271. b := dAtA[iNdEx]
  2272. iNdEx++
  2273. msglen |= int(b&0x7F) << shift
  2274. if b < 0x80 {
  2275. break
  2276. }
  2277. }
  2278. if msglen < 0 {
  2279. return ErrInvalidLengthGenerated
  2280. }
  2281. postIndex := iNdEx + msglen
  2282. if postIndex < 0 {
  2283. return ErrInvalidLengthGenerated
  2284. }
  2285. if postIndex > l {
  2286. return io.ErrUnexpectedEOF
  2287. }
  2288. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2289. return err
  2290. }
  2291. iNdEx = postIndex
  2292. case 2:
  2293. if wireType != 2 {
  2294. return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
  2295. }
  2296. var msglen int
  2297. for shift := uint(0); ; shift += 7 {
  2298. if shift >= 64 {
  2299. return ErrIntOverflowGenerated
  2300. }
  2301. if iNdEx >= l {
  2302. return io.ErrUnexpectedEOF
  2303. }
  2304. b := dAtA[iNdEx]
  2305. iNdEx++
  2306. msglen |= int(b&0x7F) << shift
  2307. if b < 0x80 {
  2308. break
  2309. }
  2310. }
  2311. if msglen < 0 {
  2312. return ErrInvalidLengthGenerated
  2313. }
  2314. postIndex := iNdEx + msglen
  2315. if postIndex < 0 {
  2316. return ErrInvalidLengthGenerated
  2317. }
  2318. if postIndex > l {
  2319. return io.ErrUnexpectedEOF
  2320. }
  2321. m.Rules = append(m.Rules, PolicyRule{})
  2322. if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2323. return err
  2324. }
  2325. iNdEx = postIndex
  2326. default:
  2327. iNdEx = preIndex
  2328. skippy, err := skipGenerated(dAtA[iNdEx:])
  2329. if err != nil {
  2330. return err
  2331. }
  2332. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2333. return ErrInvalidLengthGenerated
  2334. }
  2335. if (iNdEx + skippy) > l {
  2336. return io.ErrUnexpectedEOF
  2337. }
  2338. iNdEx += skippy
  2339. }
  2340. }
  2341. if iNdEx > l {
  2342. return io.ErrUnexpectedEOF
  2343. }
  2344. return nil
  2345. }
  2346. func (m *RoleBinding) Unmarshal(dAtA []byte) error {
  2347. l := len(dAtA)
  2348. iNdEx := 0
  2349. for iNdEx < l {
  2350. preIndex := iNdEx
  2351. var wire uint64
  2352. for shift := uint(0); ; shift += 7 {
  2353. if shift >= 64 {
  2354. return ErrIntOverflowGenerated
  2355. }
  2356. if iNdEx >= l {
  2357. return io.ErrUnexpectedEOF
  2358. }
  2359. b := dAtA[iNdEx]
  2360. iNdEx++
  2361. wire |= uint64(b&0x7F) << shift
  2362. if b < 0x80 {
  2363. break
  2364. }
  2365. }
  2366. fieldNum := int32(wire >> 3)
  2367. wireType := int(wire & 0x7)
  2368. if wireType == 4 {
  2369. return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
  2370. }
  2371. if fieldNum <= 0 {
  2372. return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
  2373. }
  2374. switch fieldNum {
  2375. case 1:
  2376. if wireType != 2 {
  2377. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  2378. }
  2379. var msglen int
  2380. for shift := uint(0); ; shift += 7 {
  2381. if shift >= 64 {
  2382. return ErrIntOverflowGenerated
  2383. }
  2384. if iNdEx >= l {
  2385. return io.ErrUnexpectedEOF
  2386. }
  2387. b := dAtA[iNdEx]
  2388. iNdEx++
  2389. msglen |= int(b&0x7F) << shift
  2390. if b < 0x80 {
  2391. break
  2392. }
  2393. }
  2394. if msglen < 0 {
  2395. return ErrInvalidLengthGenerated
  2396. }
  2397. postIndex := iNdEx + msglen
  2398. if postIndex < 0 {
  2399. return ErrInvalidLengthGenerated
  2400. }
  2401. if postIndex > l {
  2402. return io.ErrUnexpectedEOF
  2403. }
  2404. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2405. return err
  2406. }
  2407. iNdEx = postIndex
  2408. case 2:
  2409. if wireType != 2 {
  2410. return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
  2411. }
  2412. var msglen int
  2413. for shift := uint(0); ; shift += 7 {
  2414. if shift >= 64 {
  2415. return ErrIntOverflowGenerated
  2416. }
  2417. if iNdEx >= l {
  2418. return io.ErrUnexpectedEOF
  2419. }
  2420. b := dAtA[iNdEx]
  2421. iNdEx++
  2422. msglen |= int(b&0x7F) << shift
  2423. if b < 0x80 {
  2424. break
  2425. }
  2426. }
  2427. if msglen < 0 {
  2428. return ErrInvalidLengthGenerated
  2429. }
  2430. postIndex := iNdEx + msglen
  2431. if postIndex < 0 {
  2432. return ErrInvalidLengthGenerated
  2433. }
  2434. if postIndex > l {
  2435. return io.ErrUnexpectedEOF
  2436. }
  2437. m.Subjects = append(m.Subjects, Subject{})
  2438. if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2439. return err
  2440. }
  2441. iNdEx = postIndex
  2442. case 3:
  2443. if wireType != 2 {
  2444. return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
  2445. }
  2446. var msglen int
  2447. for shift := uint(0); ; shift += 7 {
  2448. if shift >= 64 {
  2449. return ErrIntOverflowGenerated
  2450. }
  2451. if iNdEx >= l {
  2452. return io.ErrUnexpectedEOF
  2453. }
  2454. b := dAtA[iNdEx]
  2455. iNdEx++
  2456. msglen |= int(b&0x7F) << shift
  2457. if b < 0x80 {
  2458. break
  2459. }
  2460. }
  2461. if msglen < 0 {
  2462. return ErrInvalidLengthGenerated
  2463. }
  2464. postIndex := iNdEx + msglen
  2465. if postIndex < 0 {
  2466. return ErrInvalidLengthGenerated
  2467. }
  2468. if postIndex > l {
  2469. return io.ErrUnexpectedEOF
  2470. }
  2471. if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2472. return err
  2473. }
  2474. iNdEx = postIndex
  2475. default:
  2476. iNdEx = preIndex
  2477. skippy, err := skipGenerated(dAtA[iNdEx:])
  2478. if err != nil {
  2479. return err
  2480. }
  2481. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2482. return ErrInvalidLengthGenerated
  2483. }
  2484. if (iNdEx + skippy) > l {
  2485. return io.ErrUnexpectedEOF
  2486. }
  2487. iNdEx += skippy
  2488. }
  2489. }
  2490. if iNdEx > l {
  2491. return io.ErrUnexpectedEOF
  2492. }
  2493. return nil
  2494. }
  2495. func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
  2496. l := len(dAtA)
  2497. iNdEx := 0
  2498. for iNdEx < l {
  2499. preIndex := iNdEx
  2500. var wire uint64
  2501. for shift := uint(0); ; shift += 7 {
  2502. if shift >= 64 {
  2503. return ErrIntOverflowGenerated
  2504. }
  2505. if iNdEx >= l {
  2506. return io.ErrUnexpectedEOF
  2507. }
  2508. b := dAtA[iNdEx]
  2509. iNdEx++
  2510. wire |= uint64(b&0x7F) << shift
  2511. if b < 0x80 {
  2512. break
  2513. }
  2514. }
  2515. fieldNum := int32(wire >> 3)
  2516. wireType := int(wire & 0x7)
  2517. if wireType == 4 {
  2518. return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
  2519. }
  2520. if fieldNum <= 0 {
  2521. return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
  2522. }
  2523. switch fieldNum {
  2524. case 1:
  2525. if wireType != 2 {
  2526. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  2527. }
  2528. var msglen int
  2529. for shift := uint(0); ; shift += 7 {
  2530. if shift >= 64 {
  2531. return ErrIntOverflowGenerated
  2532. }
  2533. if iNdEx >= l {
  2534. return io.ErrUnexpectedEOF
  2535. }
  2536. b := dAtA[iNdEx]
  2537. iNdEx++
  2538. msglen |= int(b&0x7F) << shift
  2539. if b < 0x80 {
  2540. break
  2541. }
  2542. }
  2543. if msglen < 0 {
  2544. return ErrInvalidLengthGenerated
  2545. }
  2546. postIndex := iNdEx + msglen
  2547. if postIndex < 0 {
  2548. return ErrInvalidLengthGenerated
  2549. }
  2550. if postIndex > l {
  2551. return io.ErrUnexpectedEOF
  2552. }
  2553. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2554. return err
  2555. }
  2556. iNdEx = postIndex
  2557. case 2:
  2558. if wireType != 2 {
  2559. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  2560. }
  2561. var msglen int
  2562. for shift := uint(0); ; shift += 7 {
  2563. if shift >= 64 {
  2564. return ErrIntOverflowGenerated
  2565. }
  2566. if iNdEx >= l {
  2567. return io.ErrUnexpectedEOF
  2568. }
  2569. b := dAtA[iNdEx]
  2570. iNdEx++
  2571. msglen |= int(b&0x7F) << shift
  2572. if b < 0x80 {
  2573. break
  2574. }
  2575. }
  2576. if msglen < 0 {
  2577. return ErrInvalidLengthGenerated
  2578. }
  2579. postIndex := iNdEx + msglen
  2580. if postIndex < 0 {
  2581. return ErrInvalidLengthGenerated
  2582. }
  2583. if postIndex > l {
  2584. return io.ErrUnexpectedEOF
  2585. }
  2586. m.Items = append(m.Items, RoleBinding{})
  2587. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2588. return err
  2589. }
  2590. iNdEx = postIndex
  2591. default:
  2592. iNdEx = preIndex
  2593. skippy, err := skipGenerated(dAtA[iNdEx:])
  2594. if err != nil {
  2595. return err
  2596. }
  2597. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2598. return ErrInvalidLengthGenerated
  2599. }
  2600. if (iNdEx + skippy) > l {
  2601. return io.ErrUnexpectedEOF
  2602. }
  2603. iNdEx += skippy
  2604. }
  2605. }
  2606. if iNdEx > l {
  2607. return io.ErrUnexpectedEOF
  2608. }
  2609. return nil
  2610. }
  2611. func (m *RoleList) Unmarshal(dAtA []byte) error {
  2612. l := len(dAtA)
  2613. iNdEx := 0
  2614. for iNdEx < l {
  2615. preIndex := iNdEx
  2616. var wire uint64
  2617. for shift := uint(0); ; shift += 7 {
  2618. if shift >= 64 {
  2619. return ErrIntOverflowGenerated
  2620. }
  2621. if iNdEx >= l {
  2622. return io.ErrUnexpectedEOF
  2623. }
  2624. b := dAtA[iNdEx]
  2625. iNdEx++
  2626. wire |= uint64(b&0x7F) << shift
  2627. if b < 0x80 {
  2628. break
  2629. }
  2630. }
  2631. fieldNum := int32(wire >> 3)
  2632. wireType := int(wire & 0x7)
  2633. if wireType == 4 {
  2634. return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
  2635. }
  2636. if fieldNum <= 0 {
  2637. return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
  2638. }
  2639. switch fieldNum {
  2640. case 1:
  2641. if wireType != 2 {
  2642. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  2643. }
  2644. var msglen int
  2645. for shift := uint(0); ; shift += 7 {
  2646. if shift >= 64 {
  2647. return ErrIntOverflowGenerated
  2648. }
  2649. if iNdEx >= l {
  2650. return io.ErrUnexpectedEOF
  2651. }
  2652. b := dAtA[iNdEx]
  2653. iNdEx++
  2654. msglen |= int(b&0x7F) << shift
  2655. if b < 0x80 {
  2656. break
  2657. }
  2658. }
  2659. if msglen < 0 {
  2660. return ErrInvalidLengthGenerated
  2661. }
  2662. postIndex := iNdEx + msglen
  2663. if postIndex < 0 {
  2664. return ErrInvalidLengthGenerated
  2665. }
  2666. if postIndex > l {
  2667. return io.ErrUnexpectedEOF
  2668. }
  2669. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2670. return err
  2671. }
  2672. iNdEx = postIndex
  2673. case 2:
  2674. if wireType != 2 {
  2675. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  2676. }
  2677. var msglen int
  2678. for shift := uint(0); ; shift += 7 {
  2679. if shift >= 64 {
  2680. return ErrIntOverflowGenerated
  2681. }
  2682. if iNdEx >= l {
  2683. return io.ErrUnexpectedEOF
  2684. }
  2685. b := dAtA[iNdEx]
  2686. iNdEx++
  2687. msglen |= int(b&0x7F) << shift
  2688. if b < 0x80 {
  2689. break
  2690. }
  2691. }
  2692. if msglen < 0 {
  2693. return ErrInvalidLengthGenerated
  2694. }
  2695. postIndex := iNdEx + msglen
  2696. if postIndex < 0 {
  2697. return ErrInvalidLengthGenerated
  2698. }
  2699. if postIndex > l {
  2700. return io.ErrUnexpectedEOF
  2701. }
  2702. m.Items = append(m.Items, Role{})
  2703. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2704. return err
  2705. }
  2706. iNdEx = postIndex
  2707. default:
  2708. iNdEx = preIndex
  2709. skippy, err := skipGenerated(dAtA[iNdEx:])
  2710. if err != nil {
  2711. return err
  2712. }
  2713. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2714. return ErrInvalidLengthGenerated
  2715. }
  2716. if (iNdEx + skippy) > l {
  2717. return io.ErrUnexpectedEOF
  2718. }
  2719. iNdEx += skippy
  2720. }
  2721. }
  2722. if iNdEx > l {
  2723. return io.ErrUnexpectedEOF
  2724. }
  2725. return nil
  2726. }
  2727. func (m *RoleRef) Unmarshal(dAtA []byte) error {
  2728. l := len(dAtA)
  2729. iNdEx := 0
  2730. for iNdEx < l {
  2731. preIndex := iNdEx
  2732. var wire uint64
  2733. for shift := uint(0); ; shift += 7 {
  2734. if shift >= 64 {
  2735. return ErrIntOverflowGenerated
  2736. }
  2737. if iNdEx >= l {
  2738. return io.ErrUnexpectedEOF
  2739. }
  2740. b := dAtA[iNdEx]
  2741. iNdEx++
  2742. wire |= uint64(b&0x7F) << shift
  2743. if b < 0x80 {
  2744. break
  2745. }
  2746. }
  2747. fieldNum := int32(wire >> 3)
  2748. wireType := int(wire & 0x7)
  2749. if wireType == 4 {
  2750. return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
  2751. }
  2752. if fieldNum <= 0 {
  2753. return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
  2754. }
  2755. switch fieldNum {
  2756. case 1:
  2757. if wireType != 2 {
  2758. return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
  2759. }
  2760. var stringLen uint64
  2761. for shift := uint(0); ; shift += 7 {
  2762. if shift >= 64 {
  2763. return ErrIntOverflowGenerated
  2764. }
  2765. if iNdEx >= l {
  2766. return io.ErrUnexpectedEOF
  2767. }
  2768. b := dAtA[iNdEx]
  2769. iNdEx++
  2770. stringLen |= uint64(b&0x7F) << shift
  2771. if b < 0x80 {
  2772. break
  2773. }
  2774. }
  2775. intStringLen := int(stringLen)
  2776. if intStringLen < 0 {
  2777. return ErrInvalidLengthGenerated
  2778. }
  2779. postIndex := iNdEx + intStringLen
  2780. if postIndex < 0 {
  2781. return ErrInvalidLengthGenerated
  2782. }
  2783. if postIndex > l {
  2784. return io.ErrUnexpectedEOF
  2785. }
  2786. m.APIGroup = string(dAtA[iNdEx:postIndex])
  2787. iNdEx = postIndex
  2788. case 2:
  2789. if wireType != 2 {
  2790. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  2791. }
  2792. var stringLen uint64
  2793. for shift := uint(0); ; shift += 7 {
  2794. if shift >= 64 {
  2795. return ErrIntOverflowGenerated
  2796. }
  2797. if iNdEx >= l {
  2798. return io.ErrUnexpectedEOF
  2799. }
  2800. b := dAtA[iNdEx]
  2801. iNdEx++
  2802. stringLen |= uint64(b&0x7F) << shift
  2803. if b < 0x80 {
  2804. break
  2805. }
  2806. }
  2807. intStringLen := int(stringLen)
  2808. if intStringLen < 0 {
  2809. return ErrInvalidLengthGenerated
  2810. }
  2811. postIndex := iNdEx + intStringLen
  2812. if postIndex < 0 {
  2813. return ErrInvalidLengthGenerated
  2814. }
  2815. if postIndex > l {
  2816. return io.ErrUnexpectedEOF
  2817. }
  2818. m.Kind = string(dAtA[iNdEx:postIndex])
  2819. iNdEx = postIndex
  2820. case 3:
  2821. if wireType != 2 {
  2822. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2823. }
  2824. var stringLen uint64
  2825. for shift := uint(0); ; shift += 7 {
  2826. if shift >= 64 {
  2827. return ErrIntOverflowGenerated
  2828. }
  2829. if iNdEx >= l {
  2830. return io.ErrUnexpectedEOF
  2831. }
  2832. b := dAtA[iNdEx]
  2833. iNdEx++
  2834. stringLen |= uint64(b&0x7F) << shift
  2835. if b < 0x80 {
  2836. break
  2837. }
  2838. }
  2839. intStringLen := int(stringLen)
  2840. if intStringLen < 0 {
  2841. return ErrInvalidLengthGenerated
  2842. }
  2843. postIndex := iNdEx + intStringLen
  2844. if postIndex < 0 {
  2845. return ErrInvalidLengthGenerated
  2846. }
  2847. if postIndex > l {
  2848. return io.ErrUnexpectedEOF
  2849. }
  2850. m.Name = string(dAtA[iNdEx:postIndex])
  2851. iNdEx = postIndex
  2852. default:
  2853. iNdEx = preIndex
  2854. skippy, err := skipGenerated(dAtA[iNdEx:])
  2855. if err != nil {
  2856. return err
  2857. }
  2858. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2859. return ErrInvalidLengthGenerated
  2860. }
  2861. if (iNdEx + skippy) > l {
  2862. return io.ErrUnexpectedEOF
  2863. }
  2864. iNdEx += skippy
  2865. }
  2866. }
  2867. if iNdEx > l {
  2868. return io.ErrUnexpectedEOF
  2869. }
  2870. return nil
  2871. }
  2872. func (m *Subject) Unmarshal(dAtA []byte) error {
  2873. l := len(dAtA)
  2874. iNdEx := 0
  2875. for iNdEx < l {
  2876. preIndex := iNdEx
  2877. var wire uint64
  2878. for shift := uint(0); ; shift += 7 {
  2879. if shift >= 64 {
  2880. return ErrIntOverflowGenerated
  2881. }
  2882. if iNdEx >= l {
  2883. return io.ErrUnexpectedEOF
  2884. }
  2885. b := dAtA[iNdEx]
  2886. iNdEx++
  2887. wire |= uint64(b&0x7F) << shift
  2888. if b < 0x80 {
  2889. break
  2890. }
  2891. }
  2892. fieldNum := int32(wire >> 3)
  2893. wireType := int(wire & 0x7)
  2894. if wireType == 4 {
  2895. return fmt.Errorf("proto: Subject: wiretype end group for non-group")
  2896. }
  2897. if fieldNum <= 0 {
  2898. return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
  2899. }
  2900. switch fieldNum {
  2901. case 1:
  2902. if wireType != 2 {
  2903. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  2904. }
  2905. var stringLen uint64
  2906. for shift := uint(0); ; shift += 7 {
  2907. if shift >= 64 {
  2908. return ErrIntOverflowGenerated
  2909. }
  2910. if iNdEx >= l {
  2911. return io.ErrUnexpectedEOF
  2912. }
  2913. b := dAtA[iNdEx]
  2914. iNdEx++
  2915. stringLen |= uint64(b&0x7F) << shift
  2916. if b < 0x80 {
  2917. break
  2918. }
  2919. }
  2920. intStringLen := int(stringLen)
  2921. if intStringLen < 0 {
  2922. return ErrInvalidLengthGenerated
  2923. }
  2924. postIndex := iNdEx + intStringLen
  2925. if postIndex < 0 {
  2926. return ErrInvalidLengthGenerated
  2927. }
  2928. if postIndex > l {
  2929. return io.ErrUnexpectedEOF
  2930. }
  2931. m.Kind = string(dAtA[iNdEx:postIndex])
  2932. iNdEx = postIndex
  2933. case 2:
  2934. if wireType != 2 {
  2935. return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
  2936. }
  2937. var stringLen uint64
  2938. for shift := uint(0); ; shift += 7 {
  2939. if shift >= 64 {
  2940. return ErrIntOverflowGenerated
  2941. }
  2942. if iNdEx >= l {
  2943. return io.ErrUnexpectedEOF
  2944. }
  2945. b := dAtA[iNdEx]
  2946. iNdEx++
  2947. stringLen |= uint64(b&0x7F) << shift
  2948. if b < 0x80 {
  2949. break
  2950. }
  2951. }
  2952. intStringLen := int(stringLen)
  2953. if intStringLen < 0 {
  2954. return ErrInvalidLengthGenerated
  2955. }
  2956. postIndex := iNdEx + intStringLen
  2957. if postIndex < 0 {
  2958. return ErrInvalidLengthGenerated
  2959. }
  2960. if postIndex > l {
  2961. return io.ErrUnexpectedEOF
  2962. }
  2963. m.APIVersion = string(dAtA[iNdEx:postIndex])
  2964. iNdEx = postIndex
  2965. case 3:
  2966. if wireType != 2 {
  2967. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2968. }
  2969. var stringLen uint64
  2970. for shift := uint(0); ; shift += 7 {
  2971. if shift >= 64 {
  2972. return ErrIntOverflowGenerated
  2973. }
  2974. if iNdEx >= l {
  2975. return io.ErrUnexpectedEOF
  2976. }
  2977. b := dAtA[iNdEx]
  2978. iNdEx++
  2979. stringLen |= uint64(b&0x7F) << shift
  2980. if b < 0x80 {
  2981. break
  2982. }
  2983. }
  2984. intStringLen := int(stringLen)
  2985. if intStringLen < 0 {
  2986. return ErrInvalidLengthGenerated
  2987. }
  2988. postIndex := iNdEx + intStringLen
  2989. if postIndex < 0 {
  2990. return ErrInvalidLengthGenerated
  2991. }
  2992. if postIndex > l {
  2993. return io.ErrUnexpectedEOF
  2994. }
  2995. m.Name = string(dAtA[iNdEx:postIndex])
  2996. iNdEx = postIndex
  2997. case 4:
  2998. if wireType != 2 {
  2999. return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
  3000. }
  3001. var stringLen uint64
  3002. for shift := uint(0); ; shift += 7 {
  3003. if shift >= 64 {
  3004. return ErrIntOverflowGenerated
  3005. }
  3006. if iNdEx >= l {
  3007. return io.ErrUnexpectedEOF
  3008. }
  3009. b := dAtA[iNdEx]
  3010. iNdEx++
  3011. stringLen |= uint64(b&0x7F) << shift
  3012. if b < 0x80 {
  3013. break
  3014. }
  3015. }
  3016. intStringLen := int(stringLen)
  3017. if intStringLen < 0 {
  3018. return ErrInvalidLengthGenerated
  3019. }
  3020. postIndex := iNdEx + intStringLen
  3021. if postIndex < 0 {
  3022. return ErrInvalidLengthGenerated
  3023. }
  3024. if postIndex > l {
  3025. return io.ErrUnexpectedEOF
  3026. }
  3027. m.Namespace = string(dAtA[iNdEx:postIndex])
  3028. iNdEx = postIndex
  3029. default:
  3030. iNdEx = preIndex
  3031. skippy, err := skipGenerated(dAtA[iNdEx:])
  3032. if err != nil {
  3033. return err
  3034. }
  3035. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3036. return ErrInvalidLengthGenerated
  3037. }
  3038. if (iNdEx + skippy) > l {
  3039. return io.ErrUnexpectedEOF
  3040. }
  3041. iNdEx += skippy
  3042. }
  3043. }
  3044. if iNdEx > l {
  3045. return io.ErrUnexpectedEOF
  3046. }
  3047. return nil
  3048. }
  3049. func skipGenerated(dAtA []byte) (n int, err error) {
  3050. l := len(dAtA)
  3051. iNdEx := 0
  3052. depth := 0
  3053. for iNdEx < l {
  3054. var wire uint64
  3055. for shift := uint(0); ; shift += 7 {
  3056. if shift >= 64 {
  3057. return 0, ErrIntOverflowGenerated
  3058. }
  3059. if iNdEx >= l {
  3060. return 0, io.ErrUnexpectedEOF
  3061. }
  3062. b := dAtA[iNdEx]
  3063. iNdEx++
  3064. wire |= (uint64(b) & 0x7F) << shift
  3065. if b < 0x80 {
  3066. break
  3067. }
  3068. }
  3069. wireType := int(wire & 0x7)
  3070. switch wireType {
  3071. case 0:
  3072. for shift := uint(0); ; shift += 7 {
  3073. if shift >= 64 {
  3074. return 0, ErrIntOverflowGenerated
  3075. }
  3076. if iNdEx >= l {
  3077. return 0, io.ErrUnexpectedEOF
  3078. }
  3079. iNdEx++
  3080. if dAtA[iNdEx-1] < 0x80 {
  3081. break
  3082. }
  3083. }
  3084. case 1:
  3085. iNdEx += 8
  3086. case 2:
  3087. var length int
  3088. for shift := uint(0); ; shift += 7 {
  3089. if shift >= 64 {
  3090. return 0, ErrIntOverflowGenerated
  3091. }
  3092. if iNdEx >= l {
  3093. return 0, io.ErrUnexpectedEOF
  3094. }
  3095. b := dAtA[iNdEx]
  3096. iNdEx++
  3097. length |= (int(b) & 0x7F) << shift
  3098. if b < 0x80 {
  3099. break
  3100. }
  3101. }
  3102. if length < 0 {
  3103. return 0, ErrInvalidLengthGenerated
  3104. }
  3105. iNdEx += length
  3106. case 3:
  3107. depth++
  3108. case 4:
  3109. if depth == 0 {
  3110. return 0, ErrUnexpectedEndOfGroupGenerated
  3111. }
  3112. depth--
  3113. case 5:
  3114. iNdEx += 4
  3115. default:
  3116. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3117. }
  3118. if iNdEx < 0 {
  3119. return 0, ErrInvalidLengthGenerated
  3120. }
  3121. if depth == 0 {
  3122. return iNdEx, nil
  3123. }
  3124. }
  3125. return 0, io.ErrUnexpectedEOF
  3126. }
  3127. var (
  3128. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  3129. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  3130. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  3131. )