generated.pb.go 19 KB

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