generated.pb.go 78 KB

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