generated.pb.go 76 KB

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