generated.pb.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  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/v1/generated.proto
  15. package v1
  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_277b2f43b72fffd5, []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_277b2f43b72fffd5, []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.v1.PriorityClass")
  89. proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1.PriorityClassList")
  90. }
  91. func init() {
  92. proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1/generated.proto", fileDescriptor_277b2f43b72fffd5)
  93. }
  94. var fileDescriptor_277b2f43b72fffd5 = []byte{
  95. // 492 bytes of a gzipped FileDescriptorProto
  96. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x4e,
  97. 0x18, 0xc7, 0x3b, 0xdd, 0x5f, 0xa1, 0xbf, 0x29, 0x85, 0x1a, 0x11, 0x42, 0x0f, 0x69, 0xe9, 0x1e,
  98. 0xec, 0xc5, 0x19, 0xbb, 0xa8, 0x08, 0x0b, 0x82, 0x71, 0x41, 0x84, 0x15, 0x4b, 0x0e, 0x1e, 0xc4,
  99. 0x83, 0x93, 0xe4, 0xd9, 0x74, 0x6c, 0x92, 0x09, 0x33, 0x93, 0x40, 0x6f, 0xbe, 0x04, 0xdf, 0x91,
  100. 0xd7, 0x1e, 0xf7, 0xb8, 0xa7, 0x62, 0xe3, 0x4b, 0xf0, 0xe6, 0x49, 0x92, 0xc6, 0x4d, 0xff, 0x6c,
  101. 0xd1, 0x5b, 0x9e, 0xe7, 0xf9, 0x7e, 0xbe, 0x33, 0xf3, 0xcd, 0x0c, 0x7e, 0x39, 0x7f, 0xae, 0x08,
  102. 0x17, 0x74, 0x9e, 0xba, 0x20, 0x63, 0xd0, 0xa0, 0x68, 0x06, 0xb1, 0x2f, 0x24, 0xad, 0x06, 0x2c,
  103. 0xe1, 0x54, 0x79, 0x33, 0xf0, 0xd3, 0x90, 0xc7, 0x01, 0xcd, 0x26, 0x34, 0x80, 0x18, 0x24, 0xd3,
  104. 0xe0, 0x93, 0x44, 0x0a, 0x2d, 0x0c, 0x73, 0xa3, 0x24, 0x2c, 0xe1, 0xa4, 0x56, 0x92, 0x6c, 0xd2,
  105. 0x7f, 0x14, 0x70, 0x3d, 0x4b, 0x5d, 0xe2, 0x89, 0x88, 0x06, 0x22, 0x10, 0xb4, 0x04, 0xdc, 0xf4,
  106. 0xaa, 0xac, 0xca, 0xa2, 0xfc, 0xda, 0x18, 0xf5, 0x47, 0x5b, 0x4b, 0x7a, 0x42, 0xc2, 0x1d, 0x8b,
  107. 0xf5, 0x9f, 0xd4, 0x9a, 0x88, 0x79, 0x33, 0x1e, 0x83, 0x5c, 0xd0, 0x64, 0x1e, 0x14, 0x0d, 0x45,
  108. 0x23, 0xd0, 0xec, 0x2e, 0x8a, 0x1e, 0xa3, 0x64, 0x1a, 0x6b, 0x1e, 0xc1, 0x01, 0xf0, 0xec, 0x6f,
  109. 0x40, 0x71, 0xd0, 0x88, 0xed, 0x73, 0xa3, 0x9f, 0x4d, 0xdc, 0x9d, 0x4a, 0x2e, 0x24, 0xd7, 0x8b,
  110. 0x57, 0x21, 0x53, 0xca, 0xf8, 0x84, 0xdb, 0xc5, 0xae, 0x7c, 0xa6, 0x99, 0x89, 0x86, 0x68, 0xdc,
  111. 0x39, 0x7b, 0x4c, 0xea, 0xc0, 0x6e, 0xcd, 0x49, 0x32, 0x0f, 0x8a, 0x86, 0x22, 0x85, 0x9a, 0x64,
  112. 0x13, 0xf2, 0xce, 0xfd, 0x0c, 0x9e, 0x7e, 0x0b, 0x9a, 0xd9, 0xc6, 0x72, 0x35, 0x68, 0xe4, 0xab,
  113. 0x01, 0xae, 0x7b, 0xce, 0xad, 0xab, 0x71, 0x8a, 0x5b, 0x19, 0x0b, 0x53, 0x30, 0x9b, 0x43, 0x34,
  114. 0x6e, 0xd9, 0xdd, 0x4a, 0xdc, 0x7a, 0x5f, 0x34, 0x9d, 0xcd, 0xcc, 0x38, 0xc7, 0xdd, 0x20, 0x14,
  115. 0x2e, 0x0b, 0x2f, 0xe0, 0x8a, 0xa5, 0xa1, 0x36, 0x4f, 0x86, 0x68, 0xdc, 0xb6, 0x1f, 0x54, 0xe2,
  116. 0xee, 0xeb, 0xed, 0xa1, 0xb3, 0xab, 0x35, 0x9e, 0xe2, 0x8e, 0x0f, 0xca, 0x93, 0x3c, 0xd1, 0x5c,
  117. 0xc4, 0xe6, 0x7f, 0x43, 0x34, 0xfe, 0xdf, 0xbe, 0x5f, 0xa1, 0x9d, 0x8b, 0x7a, 0xe4, 0x6c, 0xeb,
  118. 0x8c, 0x00, 0xf7, 0x12, 0x09, 0x10, 0x95, 0xd5, 0x54, 0x84, 0xdc, 0x5b, 0x98, 0xad, 0x92, 0x3d,
  119. 0xcf, 0x57, 0x83, 0xde, 0x74, 0x6f, 0xf6, 0x6b, 0x35, 0x38, 0x3d, 0xbc, 0x01, 0x64, 0x5f, 0xe6,
  120. 0x1c, 0x98, 0x8e, 0xbe, 0x21, 0x7c, 0x6f, 0x27, 0xf5, 0x4b, 0xae, 0xb4, 0xf1, 0xf1, 0x20, 0x79,
  121. 0xf2, 0x6f, 0xc9, 0x17, 0x74, 0x99, 0x7b, 0xaf, 0x3a, 0x62, 0xfb, 0x4f, 0x67, 0x2b, 0xf5, 0x4b,
  122. 0xdc, 0xe2, 0x1a, 0x22, 0x65, 0x36, 0x87, 0x27, 0xe3, 0xce, 0xd9, 0x43, 0x72, 0xec, 0x15, 0x90,
  123. 0x9d, 0x9d, 0xd5, 0xbf, 0xe7, 0x4d, 0x41, 0x3b, 0x1b, 0x13, 0xfb, 0xc5, 0x72, 0x6d, 0x35, 0xae,
  124. 0xd7, 0x56, 0xe3, 0x66, 0x6d, 0x35, 0xbe, 0xe4, 0x16, 0x5a, 0xe6, 0x16, 0xba, 0xce, 0x2d, 0x74,
  125. 0x93, 0x5b, 0xe8, 0x7b, 0x6e, 0xa1, 0xaf, 0x3f, 0xac, 0xc6, 0x07, 0xf3, 0xd8, 0x9b, 0xfc, 0x1d,
  126. 0x00, 0x00, 0xff, 0xff, 0xa9, 0x88, 0x2b, 0xa0, 0xc7, 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) || (iNdEx+skippy) < 0 {
  487. return ErrInvalidLengthGenerated
  488. }
  489. if (iNdEx + skippy) > l {
  490. return io.ErrUnexpectedEOF
  491. }
  492. iNdEx += skippy
  493. }
  494. }
  495. if iNdEx > l {
  496. return io.ErrUnexpectedEOF
  497. }
  498. return nil
  499. }
  500. func (m *PriorityClassList) Unmarshal(dAtA []byte) error {
  501. l := len(dAtA)
  502. iNdEx := 0
  503. for iNdEx < l {
  504. preIndex := iNdEx
  505. var wire uint64
  506. for shift := uint(0); ; shift += 7 {
  507. if shift >= 64 {
  508. return ErrIntOverflowGenerated
  509. }
  510. if iNdEx >= l {
  511. return io.ErrUnexpectedEOF
  512. }
  513. b := dAtA[iNdEx]
  514. iNdEx++
  515. wire |= uint64(b&0x7F) << shift
  516. if b < 0x80 {
  517. break
  518. }
  519. }
  520. fieldNum := int32(wire >> 3)
  521. wireType := int(wire & 0x7)
  522. if wireType == 4 {
  523. return fmt.Errorf("proto: PriorityClassList: wiretype end group for non-group")
  524. }
  525. if fieldNum <= 0 {
  526. return fmt.Errorf("proto: PriorityClassList: illegal tag %d (wire type %d)", fieldNum, wire)
  527. }
  528. switch fieldNum {
  529. case 1:
  530. if wireType != 2 {
  531. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  532. }
  533. var msglen int
  534. for shift := uint(0); ; shift += 7 {
  535. if shift >= 64 {
  536. return ErrIntOverflowGenerated
  537. }
  538. if iNdEx >= l {
  539. return io.ErrUnexpectedEOF
  540. }
  541. b := dAtA[iNdEx]
  542. iNdEx++
  543. msglen |= int(b&0x7F) << shift
  544. if b < 0x80 {
  545. break
  546. }
  547. }
  548. if msglen < 0 {
  549. return ErrInvalidLengthGenerated
  550. }
  551. postIndex := iNdEx + msglen
  552. if postIndex < 0 {
  553. return ErrInvalidLengthGenerated
  554. }
  555. if postIndex > l {
  556. return io.ErrUnexpectedEOF
  557. }
  558. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  559. return err
  560. }
  561. iNdEx = postIndex
  562. case 2:
  563. if wireType != 2 {
  564. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  565. }
  566. var msglen int
  567. for shift := uint(0); ; shift += 7 {
  568. if shift >= 64 {
  569. return ErrIntOverflowGenerated
  570. }
  571. if iNdEx >= l {
  572. return io.ErrUnexpectedEOF
  573. }
  574. b := dAtA[iNdEx]
  575. iNdEx++
  576. msglen |= int(b&0x7F) << shift
  577. if b < 0x80 {
  578. break
  579. }
  580. }
  581. if msglen < 0 {
  582. return ErrInvalidLengthGenerated
  583. }
  584. postIndex := iNdEx + msglen
  585. if postIndex < 0 {
  586. return ErrInvalidLengthGenerated
  587. }
  588. if postIndex > l {
  589. return io.ErrUnexpectedEOF
  590. }
  591. m.Items = append(m.Items, PriorityClass{})
  592. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  593. return err
  594. }
  595. iNdEx = postIndex
  596. default:
  597. iNdEx = preIndex
  598. skippy, err := skipGenerated(dAtA[iNdEx:])
  599. if err != nil {
  600. return err
  601. }
  602. if (skippy < 0) || (iNdEx+skippy) < 0 {
  603. return ErrInvalidLengthGenerated
  604. }
  605. if (iNdEx + skippy) > l {
  606. return io.ErrUnexpectedEOF
  607. }
  608. iNdEx += skippy
  609. }
  610. }
  611. if iNdEx > l {
  612. return io.ErrUnexpectedEOF
  613. }
  614. return nil
  615. }
  616. func skipGenerated(dAtA []byte) (n int, err error) {
  617. l := len(dAtA)
  618. iNdEx := 0
  619. depth := 0
  620. for iNdEx < l {
  621. var wire uint64
  622. for shift := uint(0); ; shift += 7 {
  623. if shift >= 64 {
  624. return 0, ErrIntOverflowGenerated
  625. }
  626. if iNdEx >= l {
  627. return 0, io.ErrUnexpectedEOF
  628. }
  629. b := dAtA[iNdEx]
  630. iNdEx++
  631. wire |= (uint64(b) & 0x7F) << shift
  632. if b < 0x80 {
  633. break
  634. }
  635. }
  636. wireType := int(wire & 0x7)
  637. switch wireType {
  638. case 0:
  639. for shift := uint(0); ; shift += 7 {
  640. if shift >= 64 {
  641. return 0, ErrIntOverflowGenerated
  642. }
  643. if iNdEx >= l {
  644. return 0, io.ErrUnexpectedEOF
  645. }
  646. iNdEx++
  647. if dAtA[iNdEx-1] < 0x80 {
  648. break
  649. }
  650. }
  651. case 1:
  652. iNdEx += 8
  653. case 2:
  654. var length int
  655. for shift := uint(0); ; shift += 7 {
  656. if shift >= 64 {
  657. return 0, ErrIntOverflowGenerated
  658. }
  659. if iNdEx >= l {
  660. return 0, io.ErrUnexpectedEOF
  661. }
  662. b := dAtA[iNdEx]
  663. iNdEx++
  664. length |= (int(b) & 0x7F) << shift
  665. if b < 0x80 {
  666. break
  667. }
  668. }
  669. if length < 0 {
  670. return 0, ErrInvalidLengthGenerated
  671. }
  672. iNdEx += length
  673. case 3:
  674. depth++
  675. case 4:
  676. if depth == 0 {
  677. return 0, ErrUnexpectedEndOfGroupGenerated
  678. }
  679. depth--
  680. case 5:
  681. iNdEx += 4
  682. default:
  683. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  684. }
  685. if iNdEx < 0 {
  686. return 0, ErrInvalidLengthGenerated
  687. }
  688. if depth == 0 {
  689. return iNdEx, nil
  690. }
  691. }
  692. return 0, io.ErrUnexpectedEOF
  693. }
  694. var (
  695. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  696. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  697. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  698. )