generated.pb.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  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/scheduling/v1beta1/generated.proto
  15. package v1beta1
  16. import (
  17. fmt "fmt"
  18. io "io"
  19. proto "github.com/gogo/protobuf/proto"
  20. k8s_io_api_core_v1 "k8s.io/api/core/v1"
  21. math "math"
  22. math_bits "math/bits"
  23. reflect "reflect"
  24. strings "strings"
  25. )
  26. // Reference imports to suppress errors if they are not otherwise used.
  27. var _ = proto.Marshal
  28. var _ = fmt.Errorf
  29. var _ = math.Inf
  30. // This is a compile-time assertion to ensure that this generated file
  31. // is compatible with the proto package it is being compiled against.
  32. // A compilation error at this line likely means your copy of the
  33. // proto package needs to be updated.
  34. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  35. func (m *PriorityClass) Reset() { *m = PriorityClass{} }
  36. func (*PriorityClass) ProtoMessage() {}
  37. func (*PriorityClass) Descriptor() ([]byte, []int) {
  38. return fileDescriptor_6cd406dede2d3f42, []int{0}
  39. }
  40. func (m *PriorityClass) XXX_Unmarshal(b []byte) error {
  41. return m.Unmarshal(b)
  42. }
  43. func (m *PriorityClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  44. b = b[:cap(b)]
  45. n, err := m.MarshalToSizedBuffer(b)
  46. if err != nil {
  47. return nil, err
  48. }
  49. return b[:n], nil
  50. }
  51. func (m *PriorityClass) XXX_Merge(src proto.Message) {
  52. xxx_messageInfo_PriorityClass.Merge(m, src)
  53. }
  54. func (m *PriorityClass) XXX_Size() int {
  55. return m.Size()
  56. }
  57. func (m *PriorityClass) XXX_DiscardUnknown() {
  58. xxx_messageInfo_PriorityClass.DiscardUnknown(m)
  59. }
  60. var xxx_messageInfo_PriorityClass proto.InternalMessageInfo
  61. func (m *PriorityClassList) Reset() { *m = PriorityClassList{} }
  62. func (*PriorityClassList) ProtoMessage() {}
  63. func (*PriorityClassList) Descriptor() ([]byte, []int) {
  64. return fileDescriptor_6cd406dede2d3f42, []int{1}
  65. }
  66. func (m *PriorityClassList) XXX_Unmarshal(b []byte) error {
  67. return m.Unmarshal(b)
  68. }
  69. func (m *PriorityClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  70. b = b[:cap(b)]
  71. n, err := m.MarshalToSizedBuffer(b)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return b[:n], nil
  76. }
  77. func (m *PriorityClassList) XXX_Merge(src proto.Message) {
  78. xxx_messageInfo_PriorityClassList.Merge(m, src)
  79. }
  80. func (m *PriorityClassList) XXX_Size() int {
  81. return m.Size()
  82. }
  83. func (m *PriorityClassList) XXX_DiscardUnknown() {
  84. xxx_messageInfo_PriorityClassList.DiscardUnknown(m)
  85. }
  86. var xxx_messageInfo_PriorityClassList proto.InternalMessageInfo
  87. func init() {
  88. proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClass")
  89. proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClassList")
  90. }
  91. func init() {
  92. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_6cd406dede2d3f42)
  93. }
  94. var fileDescriptor_6cd406dede2d3f42 = []byte{
  95. // 494 bytes of a gzipped FileDescriptorProto
  96. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x8f, 0xd3, 0x30,
  97. 0x18, 0xc6, 0xeb, 0x1e, 0x15, 0xc5, 0x55, 0xa5, 0x12, 0x84, 0x14, 0x55, 0x22, 0xad, 0x7a, 0x4b,
  98. 0x07, 0xce, 0xa6, 0x27, 0x40, 0x48, 0xb7, 0x95, 0x13, 0x08, 0x09, 0x44, 0xc9, 0xc0, 0x80, 0x18,
  99. 0x70, 0x92, 0xf7, 0x52, 0xd3, 0x24, 0x8e, 0x6c, 0x27, 0x52, 0x37, 0x3e, 0x02, 0x1f, 0x8a, 0xa1,
  100. 0xe3, 0x8d, 0x37, 0x55, 0x34, 0x7c, 0x04, 0x36, 0x26, 0x94, 0x34, 0x5c, 0xda, 0x86, 0x7f, 0x5b,
  101. 0xfc, 0x3e, 0xbf, 0xe7, 0xb1, 0xfd, 0x24, 0xc1, 0xcf, 0x16, 0x4f, 0x14, 0xe1, 0x82, 0x2e, 0x12,
  102. 0x07, 0x64, 0x04, 0x1a, 0x14, 0x4d, 0x21, 0xf2, 0x84, 0xa4, 0xa5, 0xc0, 0x62, 0x4e, 0x95, 0x3b,
  103. 0x07, 0x2f, 0x09, 0x78, 0xe4, 0xd3, 0x74, 0xe2, 0x80, 0x66, 0x13, 0xea, 0x43, 0x04, 0x92, 0x69,
  104. 0xf0, 0x48, 0x2c, 0x85, 0x16, 0xc6, 0xbd, 0x2d, 0x4e, 0x58, 0xcc, 0x49, 0x85, 0x93, 0x12, 0xef,
  105. 0x9f, 0xf8, 0x5c, 0xcf, 0x13, 0x87, 0xb8, 0x22, 0xa4, 0xbe, 0xf0, 0x05, 0x2d, 0x5c, 0x4e, 0x72,
  106. 0x51, 0xac, 0x8a, 0x45, 0xf1, 0xb4, 0x4d, 0xeb, 0x8f, 0x76, 0x36, 0x77, 0x85, 0x04, 0x9a, 0xd6,
  107. 0x76, 0xec, 0x3f, 0xac, 0x98, 0x90, 0xb9, 0x73, 0x1e, 0x81, 0x5c, 0xd2, 0x78, 0xe1, 0xe7, 0x03,
  108. 0x45, 0x43, 0xd0, 0xec, 0x77, 0x2e, 0xfa, 0x27, 0x97, 0x4c, 0x22, 0xcd, 0x43, 0xa8, 0x19, 0x1e,
  109. 0xff, 0xcb, 0x90, 0xdf, 0x36, 0x64, 0x87, 0xbe, 0xd1, 0xf7, 0x26, 0xee, 0xce, 0x24, 0x17, 0x92,
  110. 0xeb, 0xe5, 0xd3, 0x80, 0x29, 0x65, 0x7c, 0xc0, 0xed, 0xfc, 0x54, 0x1e, 0xd3, 0xcc, 0x44, 0x43,
  111. 0x34, 0xee, 0x9c, 0x3e, 0x20, 0x55, 0x6b, 0xd7, 0xe1, 0x24, 0x5e, 0xf8, 0xf9, 0x40, 0x91, 0x9c,
  112. 0x26, 0xe9, 0x84, 0xbc, 0x76, 0x3e, 0x82, 0xab, 0x5f, 0x81, 0x66, 0x53, 0x63, 0xb5, 0x1e, 0x34,
  113. 0xb2, 0xf5, 0x00, 0x57, 0x33, 0xfb, 0x3a, 0xd5, 0x38, 0xc6, 0xad, 0x94, 0x05, 0x09, 0x98, 0xcd,
  114. 0x21, 0x1a, 0xb7, 0xa6, 0xdd, 0x12, 0x6e, 0xbd, 0xcd, 0x87, 0xf6, 0x56, 0x33, 0xce, 0x70, 0xd7,
  115. 0x0f, 0x84, 0xc3, 0x82, 0x73, 0xb8, 0x60, 0x49, 0xa0, 0xcd, 0xa3, 0x21, 0x1a, 0xb7, 0xa7, 0x77,
  116. 0x4b, 0xb8, 0xfb, 0x7c, 0x57, 0xb4, 0xf7, 0x59, 0xe3, 0x11, 0xee, 0x78, 0xa0, 0x5c, 0xc9, 0x63,
  117. 0xcd, 0x45, 0x64, 0xde, 0x18, 0xa2, 0xf1, 0xad, 0xe9, 0x9d, 0xd2, 0xda, 0x39, 0xaf, 0x24, 0x7b,
  118. 0x97, 0x33, 0x7c, 0xdc, 0x8b, 0x25, 0x40, 0x58, 0xac, 0x66, 0x22, 0xe0, 0xee, 0xd2, 0x6c, 0x15,
  119. 0xde, 0xb3, 0x6c, 0x3d, 0xe8, 0xcd, 0x0e, 0xb4, 0x1f, 0xeb, 0xc1, 0x71, 0xfd, 0x0b, 0x20, 0x87,
  120. 0x98, 0x5d, 0x0b, 0x1d, 0x7d, 0x41, 0xf8, 0xf6, 0x5e, 0xeb, 0x2f, 0xb9, 0xd2, 0xc6, 0xfb, 0x5a,
  121. 0xf3, 0xe4, 0xff, 0x9a, 0xcf, 0xdd, 0x45, 0xef, 0xbd, 0xf2, 0x8a, 0xed, 0x5f, 0x93, 0x9d, 0xd6,
  122. 0xdf, 0xe0, 0x16, 0xd7, 0x10, 0x2a, 0xb3, 0x39, 0x3c, 0x1a, 0x77, 0x4e, 0xef, 0x93, 0xbf, 0xfe,
  123. 0x0a, 0x64, 0xef, 0x78, 0xd5, 0x3b, 0x7a, 0x91, 0x47, 0xd8, 0xdb, 0xa4, 0xe9, 0xc9, 0x6a, 0x63,
  124. 0x35, 0x2e, 0x37, 0x56, 0xe3, 0x6a, 0x63, 0x35, 0x3e, 0x65, 0x16, 0x5a, 0x65, 0x16, 0xba, 0xcc,
  125. 0x2c, 0x74, 0x95, 0x59, 0xe8, 0x6b, 0x66, 0xa1, 0xcf, 0xdf, 0xac, 0xc6, 0xbb, 0x9b, 0x65, 0xe4,
  126. 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xc2, 0xc0, 0x1f, 0xc5, 0x03, 0x00, 0x00,
  127. }
  128. func (m *PriorityClass) Marshal() (dAtA []byte, err error) {
  129. size := m.Size()
  130. dAtA = make([]byte, size)
  131. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  132. if err != nil {
  133. return nil, err
  134. }
  135. return dAtA[:n], nil
  136. }
  137. func (m *PriorityClass) MarshalTo(dAtA []byte) (int, error) {
  138. size := m.Size()
  139. return m.MarshalToSizedBuffer(dAtA[:size])
  140. }
  141. func (m *PriorityClass) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  142. i := len(dAtA)
  143. _ = i
  144. var l int
  145. _ = l
  146. if m.PreemptionPolicy != nil {
  147. i -= len(*m.PreemptionPolicy)
  148. copy(dAtA[i:], *m.PreemptionPolicy)
  149. i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreemptionPolicy)))
  150. i--
  151. dAtA[i] = 0x2a
  152. }
  153. i -= len(m.Description)
  154. copy(dAtA[i:], m.Description)
  155. i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description)))
  156. i--
  157. dAtA[i] = 0x22
  158. i--
  159. if m.GlobalDefault {
  160. dAtA[i] = 1
  161. } else {
  162. dAtA[i] = 0
  163. }
  164. i--
  165. dAtA[i] = 0x18
  166. i = encodeVarintGenerated(dAtA, i, uint64(m.Value))
  167. i--
  168. dAtA[i] = 0x10
  169. {
  170. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  171. if err != nil {
  172. return 0, err
  173. }
  174. i -= size
  175. i = encodeVarintGenerated(dAtA, i, uint64(size))
  176. }
  177. i--
  178. dAtA[i] = 0xa
  179. return len(dAtA) - i, nil
  180. }
  181. func (m *PriorityClassList) Marshal() (dAtA []byte, err error) {
  182. size := m.Size()
  183. dAtA = make([]byte, size)
  184. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  185. if err != nil {
  186. return nil, err
  187. }
  188. return dAtA[:n], nil
  189. }
  190. func (m *PriorityClassList) MarshalTo(dAtA []byte) (int, error) {
  191. size := m.Size()
  192. return m.MarshalToSizedBuffer(dAtA[:size])
  193. }
  194. func (m *PriorityClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  195. i := len(dAtA)
  196. _ = i
  197. var l int
  198. _ = l
  199. if len(m.Items) > 0 {
  200. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  201. {
  202. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  203. if err != nil {
  204. return 0, err
  205. }
  206. i -= size
  207. i = encodeVarintGenerated(dAtA, i, uint64(size))
  208. }
  209. i--
  210. dAtA[i] = 0x12
  211. }
  212. }
  213. {
  214. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  215. if err != nil {
  216. return 0, err
  217. }
  218. i -= size
  219. i = encodeVarintGenerated(dAtA, i, uint64(size))
  220. }
  221. i--
  222. dAtA[i] = 0xa
  223. return len(dAtA) - i, nil
  224. }
  225. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  226. offset -= sovGenerated(v)
  227. base := offset
  228. for v >= 1<<7 {
  229. dAtA[offset] = uint8(v&0x7f | 0x80)
  230. v >>= 7
  231. offset++
  232. }
  233. dAtA[offset] = uint8(v)
  234. return base
  235. }
  236. func (m *PriorityClass) Size() (n int) {
  237. if m == nil {
  238. return 0
  239. }
  240. var l int
  241. _ = l
  242. l = m.ObjectMeta.Size()
  243. n += 1 + l + sovGenerated(uint64(l))
  244. n += 1 + sovGenerated(uint64(m.Value))
  245. n += 2
  246. l = len(m.Description)
  247. n += 1 + l + sovGenerated(uint64(l))
  248. if m.PreemptionPolicy != nil {
  249. l = len(*m.PreemptionPolicy)
  250. n += 1 + l + sovGenerated(uint64(l))
  251. }
  252. return n
  253. }
  254. func (m *PriorityClassList) Size() (n int) {
  255. if m == nil {
  256. return 0
  257. }
  258. var l int
  259. _ = l
  260. l = m.ListMeta.Size()
  261. n += 1 + l + sovGenerated(uint64(l))
  262. if len(m.Items) > 0 {
  263. for _, e := range m.Items {
  264. l = e.Size()
  265. n += 1 + l + sovGenerated(uint64(l))
  266. }
  267. }
  268. return n
  269. }
  270. func sovGenerated(x uint64) (n int) {
  271. return (math_bits.Len64(x|1) + 6) / 7
  272. }
  273. func sozGenerated(x uint64) (n int) {
  274. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  275. }
  276. func (this *PriorityClass) String() string {
  277. if this == nil {
  278. return "nil"
  279. }
  280. s := strings.Join([]string{`&PriorityClass{`,
  281. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  282. `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
  283. `GlobalDefault:` + fmt.Sprintf("%v", this.GlobalDefault) + `,`,
  284. `Description:` + fmt.Sprintf("%v", this.Description) + `,`,
  285. `PreemptionPolicy:` + valueToStringGenerated(this.PreemptionPolicy) + `,`,
  286. `}`,
  287. }, "")
  288. return s
  289. }
  290. func (this *PriorityClassList) String() string {
  291. if this == nil {
  292. return "nil"
  293. }
  294. repeatedStringForItems := "[]PriorityClass{"
  295. for _, f := range this.Items {
  296. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PriorityClass", "PriorityClass", 1), `&`, ``, 1) + ","
  297. }
  298. repeatedStringForItems += "}"
  299. s := strings.Join([]string{`&PriorityClassList{`,
  300. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  301. `Items:` + repeatedStringForItems + `,`,
  302. `}`,
  303. }, "")
  304. return s
  305. }
  306. func valueToStringGenerated(v interface{}) string {
  307. rv := reflect.ValueOf(v)
  308. if rv.IsNil() {
  309. return "nil"
  310. }
  311. pv := reflect.Indirect(rv).Interface()
  312. return fmt.Sprintf("*%v", pv)
  313. }
  314. func (m *PriorityClass) Unmarshal(dAtA []byte) error {
  315. l := len(dAtA)
  316. iNdEx := 0
  317. for iNdEx < l {
  318. preIndex := iNdEx
  319. var wire uint64
  320. for shift := uint(0); ; shift += 7 {
  321. if shift >= 64 {
  322. return ErrIntOverflowGenerated
  323. }
  324. if iNdEx >= l {
  325. return io.ErrUnexpectedEOF
  326. }
  327. b := dAtA[iNdEx]
  328. iNdEx++
  329. wire |= uint64(b&0x7F) << shift
  330. if b < 0x80 {
  331. break
  332. }
  333. }
  334. fieldNum := int32(wire >> 3)
  335. wireType := int(wire & 0x7)
  336. if wireType == 4 {
  337. return fmt.Errorf("proto: PriorityClass: wiretype end group for non-group")
  338. }
  339. if fieldNum <= 0 {
  340. return fmt.Errorf("proto: PriorityClass: illegal tag %d (wire type %d)", fieldNum, wire)
  341. }
  342. switch fieldNum {
  343. case 1:
  344. if wireType != 2 {
  345. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  346. }
  347. var msglen int
  348. for shift := uint(0); ; shift += 7 {
  349. if shift >= 64 {
  350. return ErrIntOverflowGenerated
  351. }
  352. if iNdEx >= l {
  353. return io.ErrUnexpectedEOF
  354. }
  355. b := dAtA[iNdEx]
  356. iNdEx++
  357. msglen |= int(b&0x7F) << shift
  358. if b < 0x80 {
  359. break
  360. }
  361. }
  362. if msglen < 0 {
  363. return ErrInvalidLengthGenerated
  364. }
  365. postIndex := iNdEx + msglen
  366. if postIndex < 0 {
  367. return ErrInvalidLengthGenerated
  368. }
  369. if postIndex > l {
  370. return io.ErrUnexpectedEOF
  371. }
  372. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  373. return err
  374. }
  375. iNdEx = postIndex
  376. case 2:
  377. if wireType != 0 {
  378. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  379. }
  380. m.Value = 0
  381. for shift := uint(0); ; shift += 7 {
  382. if shift >= 64 {
  383. return ErrIntOverflowGenerated
  384. }
  385. if iNdEx >= l {
  386. return io.ErrUnexpectedEOF
  387. }
  388. b := dAtA[iNdEx]
  389. iNdEx++
  390. m.Value |= int32(b&0x7F) << shift
  391. if b < 0x80 {
  392. break
  393. }
  394. }
  395. case 3:
  396. if wireType != 0 {
  397. return fmt.Errorf("proto: wrong wireType = %d for field GlobalDefault", wireType)
  398. }
  399. var v int
  400. for shift := uint(0); ; shift += 7 {
  401. if shift >= 64 {
  402. return ErrIntOverflowGenerated
  403. }
  404. if iNdEx >= l {
  405. return io.ErrUnexpectedEOF
  406. }
  407. b := dAtA[iNdEx]
  408. iNdEx++
  409. v |= int(b&0x7F) << shift
  410. if b < 0x80 {
  411. break
  412. }
  413. }
  414. m.GlobalDefault = bool(v != 0)
  415. case 4:
  416. if wireType != 2 {
  417. return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
  418. }
  419. var stringLen uint64
  420. for shift := uint(0); ; shift += 7 {
  421. if shift >= 64 {
  422. return ErrIntOverflowGenerated
  423. }
  424. if iNdEx >= l {
  425. return io.ErrUnexpectedEOF
  426. }
  427. b := dAtA[iNdEx]
  428. iNdEx++
  429. stringLen |= uint64(b&0x7F) << shift
  430. if b < 0x80 {
  431. break
  432. }
  433. }
  434. intStringLen := int(stringLen)
  435. if intStringLen < 0 {
  436. return ErrInvalidLengthGenerated
  437. }
  438. postIndex := iNdEx + intStringLen
  439. if postIndex < 0 {
  440. return ErrInvalidLengthGenerated
  441. }
  442. if postIndex > l {
  443. return io.ErrUnexpectedEOF
  444. }
  445. m.Description = string(dAtA[iNdEx:postIndex])
  446. iNdEx = postIndex
  447. case 5:
  448. if wireType != 2 {
  449. return fmt.Errorf("proto: wrong wireType = %d for field PreemptionPolicy", wireType)
  450. }
  451. var stringLen uint64
  452. for shift := uint(0); ; shift += 7 {
  453. if shift >= 64 {
  454. return ErrIntOverflowGenerated
  455. }
  456. if iNdEx >= l {
  457. return io.ErrUnexpectedEOF
  458. }
  459. b := dAtA[iNdEx]
  460. iNdEx++
  461. stringLen |= uint64(b&0x7F) << shift
  462. if b < 0x80 {
  463. break
  464. }
  465. }
  466. intStringLen := int(stringLen)
  467. if intStringLen < 0 {
  468. return ErrInvalidLengthGenerated
  469. }
  470. postIndex := iNdEx + intStringLen
  471. if postIndex < 0 {
  472. return ErrInvalidLengthGenerated
  473. }
  474. if postIndex > l {
  475. return io.ErrUnexpectedEOF
  476. }
  477. s := k8s_io_api_core_v1.PreemptionPolicy(dAtA[iNdEx:postIndex])
  478. m.PreemptionPolicy = &s
  479. iNdEx = postIndex
  480. default:
  481. iNdEx = preIndex
  482. skippy, err := skipGenerated(dAtA[iNdEx:])
  483. if err != nil {
  484. return err
  485. }
  486. if skippy < 0 {
  487. return ErrInvalidLengthGenerated
  488. }
  489. if (iNdEx + skippy) < 0 {
  490. return ErrInvalidLengthGenerated
  491. }
  492. if (iNdEx + skippy) > l {
  493. return io.ErrUnexpectedEOF
  494. }
  495. iNdEx += skippy
  496. }
  497. }
  498. if iNdEx > l {
  499. return io.ErrUnexpectedEOF
  500. }
  501. return nil
  502. }
  503. func (m *PriorityClassList) Unmarshal(dAtA []byte) error {
  504. l := len(dAtA)
  505. iNdEx := 0
  506. for iNdEx < l {
  507. preIndex := iNdEx
  508. var wire uint64
  509. for shift := uint(0); ; shift += 7 {
  510. if shift >= 64 {
  511. return ErrIntOverflowGenerated
  512. }
  513. if iNdEx >= l {
  514. return io.ErrUnexpectedEOF
  515. }
  516. b := dAtA[iNdEx]
  517. iNdEx++
  518. wire |= uint64(b&0x7F) << shift
  519. if b < 0x80 {
  520. break
  521. }
  522. }
  523. fieldNum := int32(wire >> 3)
  524. wireType := int(wire & 0x7)
  525. if wireType == 4 {
  526. return fmt.Errorf("proto: PriorityClassList: wiretype end group for non-group")
  527. }
  528. if fieldNum <= 0 {
  529. return fmt.Errorf("proto: PriorityClassList: illegal tag %d (wire type %d)", fieldNum, wire)
  530. }
  531. switch fieldNum {
  532. case 1:
  533. if wireType != 2 {
  534. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  535. }
  536. var msglen int
  537. for shift := uint(0); ; shift += 7 {
  538. if shift >= 64 {
  539. return ErrIntOverflowGenerated
  540. }
  541. if iNdEx >= l {
  542. return io.ErrUnexpectedEOF
  543. }
  544. b := dAtA[iNdEx]
  545. iNdEx++
  546. msglen |= int(b&0x7F) << shift
  547. if b < 0x80 {
  548. break
  549. }
  550. }
  551. if msglen < 0 {
  552. return ErrInvalidLengthGenerated
  553. }
  554. postIndex := iNdEx + msglen
  555. if postIndex < 0 {
  556. return ErrInvalidLengthGenerated
  557. }
  558. if postIndex > l {
  559. return io.ErrUnexpectedEOF
  560. }
  561. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  562. return err
  563. }
  564. iNdEx = postIndex
  565. case 2:
  566. if wireType != 2 {
  567. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  568. }
  569. var msglen int
  570. for shift := uint(0); ; shift += 7 {
  571. if shift >= 64 {
  572. return ErrIntOverflowGenerated
  573. }
  574. if iNdEx >= l {
  575. return io.ErrUnexpectedEOF
  576. }
  577. b := dAtA[iNdEx]
  578. iNdEx++
  579. msglen |= int(b&0x7F) << shift
  580. if b < 0x80 {
  581. break
  582. }
  583. }
  584. if msglen < 0 {
  585. return ErrInvalidLengthGenerated
  586. }
  587. postIndex := iNdEx + msglen
  588. if postIndex < 0 {
  589. return ErrInvalidLengthGenerated
  590. }
  591. if postIndex > l {
  592. return io.ErrUnexpectedEOF
  593. }
  594. m.Items = append(m.Items, PriorityClass{})
  595. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  596. return err
  597. }
  598. iNdEx = postIndex
  599. default:
  600. iNdEx = preIndex
  601. skippy, err := skipGenerated(dAtA[iNdEx:])
  602. if err != nil {
  603. return err
  604. }
  605. if skippy < 0 {
  606. return ErrInvalidLengthGenerated
  607. }
  608. if (iNdEx + skippy) < 0 {
  609. return ErrInvalidLengthGenerated
  610. }
  611. if (iNdEx + skippy) > l {
  612. return io.ErrUnexpectedEOF
  613. }
  614. iNdEx += skippy
  615. }
  616. }
  617. if iNdEx > l {
  618. return io.ErrUnexpectedEOF
  619. }
  620. return nil
  621. }
  622. func skipGenerated(dAtA []byte) (n int, err error) {
  623. l := len(dAtA)
  624. iNdEx := 0
  625. depth := 0
  626. for iNdEx < l {
  627. var wire uint64
  628. for shift := uint(0); ; shift += 7 {
  629. if shift >= 64 {
  630. return 0, ErrIntOverflowGenerated
  631. }
  632. if iNdEx >= l {
  633. return 0, io.ErrUnexpectedEOF
  634. }
  635. b := dAtA[iNdEx]
  636. iNdEx++
  637. wire |= (uint64(b) & 0x7F) << shift
  638. if b < 0x80 {
  639. break
  640. }
  641. }
  642. wireType := int(wire & 0x7)
  643. switch wireType {
  644. case 0:
  645. for shift := uint(0); ; shift += 7 {
  646. if shift >= 64 {
  647. return 0, ErrIntOverflowGenerated
  648. }
  649. if iNdEx >= l {
  650. return 0, io.ErrUnexpectedEOF
  651. }
  652. iNdEx++
  653. if dAtA[iNdEx-1] < 0x80 {
  654. break
  655. }
  656. }
  657. case 1:
  658. iNdEx += 8
  659. case 2:
  660. var length int
  661. for shift := uint(0); ; shift += 7 {
  662. if shift >= 64 {
  663. return 0, ErrIntOverflowGenerated
  664. }
  665. if iNdEx >= l {
  666. return 0, io.ErrUnexpectedEOF
  667. }
  668. b := dAtA[iNdEx]
  669. iNdEx++
  670. length |= (int(b) & 0x7F) << shift
  671. if b < 0x80 {
  672. break
  673. }
  674. }
  675. if length < 0 {
  676. return 0, ErrInvalidLengthGenerated
  677. }
  678. iNdEx += length
  679. case 3:
  680. depth++
  681. case 4:
  682. if depth == 0 {
  683. return 0, ErrUnexpectedEndOfGroupGenerated
  684. }
  685. depth--
  686. case 5:
  687. iNdEx += 4
  688. default:
  689. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  690. }
  691. if iNdEx < 0 {
  692. return 0, ErrInvalidLengthGenerated
  693. }
  694. if depth == 0 {
  695. return iNdEx, nil
  696. }
  697. }
  698. return 0, io.ErrUnexpectedEOF
  699. }
  700. var (
  701. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  702. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  703. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  704. )