generated.pb.go 78 KB

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