generated.pb.go 78 KB

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