generated.pb.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  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/api/storagemigration/v1beta1/generated.proto
  15. package v1beta1
  16. import (
  17. fmt "fmt"
  18. io "io"
  19. v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  20. math_bits "math/bits"
  21. reflect "reflect"
  22. strings "strings"
  23. )
  24. func (m *StorageVersionMigration) Reset() { *m = StorageVersionMigration{} }
  25. func (m *StorageVersionMigrationList) Reset() { *m = StorageVersionMigrationList{} }
  26. func (m *StorageVersionMigrationSpec) Reset() { *m = StorageVersionMigrationSpec{} }
  27. func (m *StorageVersionMigrationStatus) Reset() { *m = StorageVersionMigrationStatus{} }
  28. func (m *StorageVersionMigration) Marshal() (dAtA []byte, err error) {
  29. size := m.Size()
  30. dAtA = make([]byte, size)
  31. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  32. if err != nil {
  33. return nil, err
  34. }
  35. return dAtA[:n], nil
  36. }
  37. func (m *StorageVersionMigration) MarshalTo(dAtA []byte) (int, error) {
  38. size := m.Size()
  39. return m.MarshalToSizedBuffer(dAtA[:size])
  40. }
  41. func (m *StorageVersionMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  42. i := len(dAtA)
  43. _ = i
  44. var l int
  45. _ = l
  46. {
  47. size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
  48. if err != nil {
  49. return 0, err
  50. }
  51. i -= size
  52. i = encodeVarintGenerated(dAtA, i, uint64(size))
  53. }
  54. i--
  55. dAtA[i] = 0x1a
  56. {
  57. size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
  58. if err != nil {
  59. return 0, err
  60. }
  61. i -= size
  62. i = encodeVarintGenerated(dAtA, i, uint64(size))
  63. }
  64. i--
  65. dAtA[i] = 0x12
  66. {
  67. size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
  68. if err != nil {
  69. return 0, err
  70. }
  71. i -= size
  72. i = encodeVarintGenerated(dAtA, i, uint64(size))
  73. }
  74. i--
  75. dAtA[i] = 0xa
  76. return len(dAtA) - i, nil
  77. }
  78. func (m *StorageVersionMigrationList) Marshal() (dAtA []byte, err error) {
  79. size := m.Size()
  80. dAtA = make([]byte, size)
  81. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  82. if err != nil {
  83. return nil, err
  84. }
  85. return dAtA[:n], nil
  86. }
  87. func (m *StorageVersionMigrationList) MarshalTo(dAtA []byte) (int, error) {
  88. size := m.Size()
  89. return m.MarshalToSizedBuffer(dAtA[:size])
  90. }
  91. func (m *StorageVersionMigrationList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  92. i := len(dAtA)
  93. _ = i
  94. var l int
  95. _ = l
  96. if len(m.Items) > 0 {
  97. for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
  98. {
  99. size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  100. if err != nil {
  101. return 0, err
  102. }
  103. i -= size
  104. i = encodeVarintGenerated(dAtA, i, uint64(size))
  105. }
  106. i--
  107. dAtA[i] = 0x12
  108. }
  109. }
  110. {
  111. size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
  112. if err != nil {
  113. return 0, err
  114. }
  115. i -= size
  116. i = encodeVarintGenerated(dAtA, i, uint64(size))
  117. }
  118. i--
  119. dAtA[i] = 0xa
  120. return len(dAtA) - i, nil
  121. }
  122. func (m *StorageVersionMigrationSpec) Marshal() (dAtA []byte, err error) {
  123. size := m.Size()
  124. dAtA = make([]byte, size)
  125. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  126. if err != nil {
  127. return nil, err
  128. }
  129. return dAtA[:n], nil
  130. }
  131. func (m *StorageVersionMigrationSpec) MarshalTo(dAtA []byte) (int, error) {
  132. size := m.Size()
  133. return m.MarshalToSizedBuffer(dAtA[:size])
  134. }
  135. func (m *StorageVersionMigrationSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  136. i := len(dAtA)
  137. _ = i
  138. var l int
  139. _ = l
  140. {
  141. size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
  142. if err != nil {
  143. return 0, err
  144. }
  145. i -= size
  146. i = encodeVarintGenerated(dAtA, i, uint64(size))
  147. }
  148. i--
  149. dAtA[i] = 0xa
  150. return len(dAtA) - i, nil
  151. }
  152. func (m *StorageVersionMigrationStatus) Marshal() (dAtA []byte, err error) {
  153. size := m.Size()
  154. dAtA = make([]byte, size)
  155. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  156. if err != nil {
  157. return nil, err
  158. }
  159. return dAtA[:n], nil
  160. }
  161. func (m *StorageVersionMigrationStatus) MarshalTo(dAtA []byte) (int, error) {
  162. size := m.Size()
  163. return m.MarshalToSizedBuffer(dAtA[:size])
  164. }
  165. func (m *StorageVersionMigrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  166. i := len(dAtA)
  167. _ = i
  168. var l int
  169. _ = l
  170. i -= len(m.ResourceVersion)
  171. copy(dAtA[i:], m.ResourceVersion)
  172. i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
  173. i--
  174. dAtA[i] = 0x12
  175. if len(m.Conditions) > 0 {
  176. for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- {
  177. {
  178. size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  179. if err != nil {
  180. return 0, err
  181. }
  182. i -= size
  183. i = encodeVarintGenerated(dAtA, i, uint64(size))
  184. }
  185. i--
  186. dAtA[i] = 0xa
  187. }
  188. }
  189. return len(dAtA) - i, nil
  190. }
  191. func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
  192. offset -= sovGenerated(v)
  193. base := offset
  194. for v >= 1<<7 {
  195. dAtA[offset] = uint8(v&0x7f | 0x80)
  196. v >>= 7
  197. offset++
  198. }
  199. dAtA[offset] = uint8(v)
  200. return base
  201. }
  202. func (m *StorageVersionMigration) Size() (n int) {
  203. if m == nil {
  204. return 0
  205. }
  206. var l int
  207. _ = l
  208. l = m.ObjectMeta.Size()
  209. n += 1 + l + sovGenerated(uint64(l))
  210. l = m.Spec.Size()
  211. n += 1 + l + sovGenerated(uint64(l))
  212. l = m.Status.Size()
  213. n += 1 + l + sovGenerated(uint64(l))
  214. return n
  215. }
  216. func (m *StorageVersionMigrationList) Size() (n int) {
  217. if m == nil {
  218. return 0
  219. }
  220. var l int
  221. _ = l
  222. l = m.ListMeta.Size()
  223. n += 1 + l + sovGenerated(uint64(l))
  224. if len(m.Items) > 0 {
  225. for _, e := range m.Items {
  226. l = e.Size()
  227. n += 1 + l + sovGenerated(uint64(l))
  228. }
  229. }
  230. return n
  231. }
  232. func (m *StorageVersionMigrationSpec) Size() (n int) {
  233. if m == nil {
  234. return 0
  235. }
  236. var l int
  237. _ = l
  238. l = m.Resource.Size()
  239. n += 1 + l + sovGenerated(uint64(l))
  240. return n
  241. }
  242. func (m *StorageVersionMigrationStatus) Size() (n int) {
  243. if m == nil {
  244. return 0
  245. }
  246. var l int
  247. _ = l
  248. if len(m.Conditions) > 0 {
  249. for _, e := range m.Conditions {
  250. l = e.Size()
  251. n += 1 + l + sovGenerated(uint64(l))
  252. }
  253. }
  254. l = len(m.ResourceVersion)
  255. n += 1 + l + sovGenerated(uint64(l))
  256. return n
  257. }
  258. func sovGenerated(x uint64) (n int) {
  259. return (math_bits.Len64(x|1) + 6) / 7
  260. }
  261. func sozGenerated(x uint64) (n int) {
  262. return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  263. }
  264. func (this *StorageVersionMigration) String() string {
  265. if this == nil {
  266. return "nil"
  267. }
  268. s := strings.Join([]string{`&StorageVersionMigration{`,
  269. `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
  270. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StorageVersionMigrationSpec", "StorageVersionMigrationSpec", 1), `&`, ``, 1) + `,`,
  271. `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StorageVersionMigrationStatus", "StorageVersionMigrationStatus", 1), `&`, ``, 1) + `,`,
  272. `}`,
  273. }, "")
  274. return s
  275. }
  276. func (this *StorageVersionMigrationList) String() string {
  277. if this == nil {
  278. return "nil"
  279. }
  280. repeatedStringForItems := "[]StorageVersionMigration{"
  281. for _, f := range this.Items {
  282. repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "StorageVersionMigration", "StorageVersionMigration", 1), `&`, ``, 1) + ","
  283. }
  284. repeatedStringForItems += "}"
  285. s := strings.Join([]string{`&StorageVersionMigrationList{`,
  286. `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
  287. `Items:` + repeatedStringForItems + `,`,
  288. `}`,
  289. }, "")
  290. return s
  291. }
  292. func (this *StorageVersionMigrationSpec) String() string {
  293. if this == nil {
  294. return "nil"
  295. }
  296. s := strings.Join([]string{`&StorageVersionMigrationSpec{`,
  297. `Resource:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resource), "GroupResource", "v1.GroupResource", 1), `&`, ``, 1) + `,`,
  298. `}`,
  299. }, "")
  300. return s
  301. }
  302. func (this *StorageVersionMigrationStatus) String() string {
  303. if this == nil {
  304. return "nil"
  305. }
  306. repeatedStringForConditions := "[]Condition{"
  307. for _, f := range this.Conditions {
  308. repeatedStringForConditions += fmt.Sprintf("%v", f) + ","
  309. }
  310. repeatedStringForConditions += "}"
  311. s := strings.Join([]string{`&StorageVersionMigrationStatus{`,
  312. `Conditions:` + repeatedStringForConditions + `,`,
  313. `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
  314. `}`,
  315. }, "")
  316. return s
  317. }
  318. func valueToStringGenerated(v interface{}) string {
  319. rv := reflect.ValueOf(v)
  320. if rv.IsNil() {
  321. return "nil"
  322. }
  323. pv := reflect.Indirect(rv).Interface()
  324. return fmt.Sprintf("*%v", pv)
  325. }
  326. func (m *StorageVersionMigration) Unmarshal(dAtA []byte) error {
  327. l := len(dAtA)
  328. iNdEx := 0
  329. for iNdEx < l {
  330. preIndex := iNdEx
  331. var wire uint64
  332. for shift := uint(0); ; shift += 7 {
  333. if shift >= 64 {
  334. return ErrIntOverflowGenerated
  335. }
  336. if iNdEx >= l {
  337. return io.ErrUnexpectedEOF
  338. }
  339. b := dAtA[iNdEx]
  340. iNdEx++
  341. wire |= uint64(b&0x7F) << shift
  342. if b < 0x80 {
  343. break
  344. }
  345. }
  346. fieldNum := int32(wire >> 3)
  347. wireType := int(wire & 0x7)
  348. if wireType == 4 {
  349. return fmt.Errorf("proto: StorageVersionMigration: wiretype end group for non-group")
  350. }
  351. if fieldNum <= 0 {
  352. return fmt.Errorf("proto: StorageVersionMigration: illegal tag %d (wire type %d)", fieldNum, wire)
  353. }
  354. switch fieldNum {
  355. case 1:
  356. if wireType != 2 {
  357. return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
  358. }
  359. var msglen int
  360. for shift := uint(0); ; shift += 7 {
  361. if shift >= 64 {
  362. return ErrIntOverflowGenerated
  363. }
  364. if iNdEx >= l {
  365. return io.ErrUnexpectedEOF
  366. }
  367. b := dAtA[iNdEx]
  368. iNdEx++
  369. msglen |= int(b&0x7F) << shift
  370. if b < 0x80 {
  371. break
  372. }
  373. }
  374. if msglen < 0 {
  375. return ErrInvalidLengthGenerated
  376. }
  377. postIndex := iNdEx + msglen
  378. if postIndex < 0 {
  379. return ErrInvalidLengthGenerated
  380. }
  381. if postIndex > l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  385. return err
  386. }
  387. iNdEx = postIndex
  388. case 2:
  389. if wireType != 2 {
  390. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  391. }
  392. var msglen int
  393. for shift := uint(0); ; shift += 7 {
  394. if shift >= 64 {
  395. return ErrIntOverflowGenerated
  396. }
  397. if iNdEx >= l {
  398. return io.ErrUnexpectedEOF
  399. }
  400. b := dAtA[iNdEx]
  401. iNdEx++
  402. msglen |= int(b&0x7F) << shift
  403. if b < 0x80 {
  404. break
  405. }
  406. }
  407. if msglen < 0 {
  408. return ErrInvalidLengthGenerated
  409. }
  410. postIndex := iNdEx + msglen
  411. if postIndex < 0 {
  412. return ErrInvalidLengthGenerated
  413. }
  414. if postIndex > l {
  415. return io.ErrUnexpectedEOF
  416. }
  417. if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  418. return err
  419. }
  420. iNdEx = postIndex
  421. case 3:
  422. if wireType != 2 {
  423. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  424. }
  425. var msglen int
  426. for shift := uint(0); ; shift += 7 {
  427. if shift >= 64 {
  428. return ErrIntOverflowGenerated
  429. }
  430. if iNdEx >= l {
  431. return io.ErrUnexpectedEOF
  432. }
  433. b := dAtA[iNdEx]
  434. iNdEx++
  435. msglen |= int(b&0x7F) << shift
  436. if b < 0x80 {
  437. break
  438. }
  439. }
  440. if msglen < 0 {
  441. return ErrInvalidLengthGenerated
  442. }
  443. postIndex := iNdEx + msglen
  444. if postIndex < 0 {
  445. return ErrInvalidLengthGenerated
  446. }
  447. if postIndex > l {
  448. return io.ErrUnexpectedEOF
  449. }
  450. if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  451. return err
  452. }
  453. iNdEx = postIndex
  454. default:
  455. iNdEx = preIndex
  456. skippy, err := skipGenerated(dAtA[iNdEx:])
  457. if err != nil {
  458. return err
  459. }
  460. if (skippy < 0) || (iNdEx+skippy) < 0 {
  461. return ErrInvalidLengthGenerated
  462. }
  463. if (iNdEx + skippy) > l {
  464. return io.ErrUnexpectedEOF
  465. }
  466. iNdEx += skippy
  467. }
  468. }
  469. if iNdEx > l {
  470. return io.ErrUnexpectedEOF
  471. }
  472. return nil
  473. }
  474. func (m *StorageVersionMigrationList) Unmarshal(dAtA []byte) error {
  475. l := len(dAtA)
  476. iNdEx := 0
  477. for iNdEx < l {
  478. preIndex := iNdEx
  479. var wire uint64
  480. for shift := uint(0); ; shift += 7 {
  481. if shift >= 64 {
  482. return ErrIntOverflowGenerated
  483. }
  484. if iNdEx >= l {
  485. return io.ErrUnexpectedEOF
  486. }
  487. b := dAtA[iNdEx]
  488. iNdEx++
  489. wire |= uint64(b&0x7F) << shift
  490. if b < 0x80 {
  491. break
  492. }
  493. }
  494. fieldNum := int32(wire >> 3)
  495. wireType := int(wire & 0x7)
  496. if wireType == 4 {
  497. return fmt.Errorf("proto: StorageVersionMigrationList: wiretype end group for non-group")
  498. }
  499. if fieldNum <= 0 {
  500. return fmt.Errorf("proto: StorageVersionMigrationList: illegal tag %d (wire type %d)", fieldNum, wire)
  501. }
  502. switch fieldNum {
  503. case 1:
  504. if wireType != 2 {
  505. return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
  506. }
  507. var msglen int
  508. for shift := uint(0); ; shift += 7 {
  509. if shift >= 64 {
  510. return ErrIntOverflowGenerated
  511. }
  512. if iNdEx >= l {
  513. return io.ErrUnexpectedEOF
  514. }
  515. b := dAtA[iNdEx]
  516. iNdEx++
  517. msglen |= int(b&0x7F) << shift
  518. if b < 0x80 {
  519. break
  520. }
  521. }
  522. if msglen < 0 {
  523. return ErrInvalidLengthGenerated
  524. }
  525. postIndex := iNdEx + msglen
  526. if postIndex < 0 {
  527. return ErrInvalidLengthGenerated
  528. }
  529. if postIndex > l {
  530. return io.ErrUnexpectedEOF
  531. }
  532. if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  533. return err
  534. }
  535. iNdEx = postIndex
  536. case 2:
  537. if wireType != 2 {
  538. return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
  539. }
  540. var msglen int
  541. for shift := uint(0); ; shift += 7 {
  542. if shift >= 64 {
  543. return ErrIntOverflowGenerated
  544. }
  545. if iNdEx >= l {
  546. return io.ErrUnexpectedEOF
  547. }
  548. b := dAtA[iNdEx]
  549. iNdEx++
  550. msglen |= int(b&0x7F) << shift
  551. if b < 0x80 {
  552. break
  553. }
  554. }
  555. if msglen < 0 {
  556. return ErrInvalidLengthGenerated
  557. }
  558. postIndex := iNdEx + msglen
  559. if postIndex < 0 {
  560. return ErrInvalidLengthGenerated
  561. }
  562. if postIndex > l {
  563. return io.ErrUnexpectedEOF
  564. }
  565. m.Items = append(m.Items, StorageVersionMigration{})
  566. if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  567. return err
  568. }
  569. iNdEx = postIndex
  570. default:
  571. iNdEx = preIndex
  572. skippy, err := skipGenerated(dAtA[iNdEx:])
  573. if err != nil {
  574. return err
  575. }
  576. if (skippy < 0) || (iNdEx+skippy) < 0 {
  577. return ErrInvalidLengthGenerated
  578. }
  579. if (iNdEx + skippy) > l {
  580. return io.ErrUnexpectedEOF
  581. }
  582. iNdEx += skippy
  583. }
  584. }
  585. if iNdEx > l {
  586. return io.ErrUnexpectedEOF
  587. }
  588. return nil
  589. }
  590. func (m *StorageVersionMigrationSpec) Unmarshal(dAtA []byte) error {
  591. l := len(dAtA)
  592. iNdEx := 0
  593. for iNdEx < l {
  594. preIndex := iNdEx
  595. var wire uint64
  596. for shift := uint(0); ; shift += 7 {
  597. if shift >= 64 {
  598. return ErrIntOverflowGenerated
  599. }
  600. if iNdEx >= l {
  601. return io.ErrUnexpectedEOF
  602. }
  603. b := dAtA[iNdEx]
  604. iNdEx++
  605. wire |= uint64(b&0x7F) << shift
  606. if b < 0x80 {
  607. break
  608. }
  609. }
  610. fieldNum := int32(wire >> 3)
  611. wireType := int(wire & 0x7)
  612. if wireType == 4 {
  613. return fmt.Errorf("proto: StorageVersionMigrationSpec: wiretype end group for non-group")
  614. }
  615. if fieldNum <= 0 {
  616. return fmt.Errorf("proto: StorageVersionMigrationSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  617. }
  618. switch fieldNum {
  619. case 1:
  620. if wireType != 2 {
  621. return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
  622. }
  623. var msglen int
  624. for shift := uint(0); ; shift += 7 {
  625. if shift >= 64 {
  626. return ErrIntOverflowGenerated
  627. }
  628. if iNdEx >= l {
  629. return io.ErrUnexpectedEOF
  630. }
  631. b := dAtA[iNdEx]
  632. iNdEx++
  633. msglen |= int(b&0x7F) << shift
  634. if b < 0x80 {
  635. break
  636. }
  637. }
  638. if msglen < 0 {
  639. return ErrInvalidLengthGenerated
  640. }
  641. postIndex := iNdEx + msglen
  642. if postIndex < 0 {
  643. return ErrInvalidLengthGenerated
  644. }
  645. if postIndex > l {
  646. return io.ErrUnexpectedEOF
  647. }
  648. if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  649. return err
  650. }
  651. iNdEx = postIndex
  652. default:
  653. iNdEx = preIndex
  654. skippy, err := skipGenerated(dAtA[iNdEx:])
  655. if err != nil {
  656. return err
  657. }
  658. if (skippy < 0) || (iNdEx+skippy) < 0 {
  659. return ErrInvalidLengthGenerated
  660. }
  661. if (iNdEx + skippy) > l {
  662. return io.ErrUnexpectedEOF
  663. }
  664. iNdEx += skippy
  665. }
  666. }
  667. if iNdEx > l {
  668. return io.ErrUnexpectedEOF
  669. }
  670. return nil
  671. }
  672. func (m *StorageVersionMigrationStatus) Unmarshal(dAtA []byte) error {
  673. l := len(dAtA)
  674. iNdEx := 0
  675. for iNdEx < l {
  676. preIndex := iNdEx
  677. var wire uint64
  678. for shift := uint(0); ; shift += 7 {
  679. if shift >= 64 {
  680. return ErrIntOverflowGenerated
  681. }
  682. if iNdEx >= l {
  683. return io.ErrUnexpectedEOF
  684. }
  685. b := dAtA[iNdEx]
  686. iNdEx++
  687. wire |= uint64(b&0x7F) << shift
  688. if b < 0x80 {
  689. break
  690. }
  691. }
  692. fieldNum := int32(wire >> 3)
  693. wireType := int(wire & 0x7)
  694. if wireType == 4 {
  695. return fmt.Errorf("proto: StorageVersionMigrationStatus: wiretype end group for non-group")
  696. }
  697. if fieldNum <= 0 {
  698. return fmt.Errorf("proto: StorageVersionMigrationStatus: illegal tag %d (wire type %d)", fieldNum, wire)
  699. }
  700. switch fieldNum {
  701. case 1:
  702. if wireType != 2 {
  703. return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
  704. }
  705. var msglen int
  706. for shift := uint(0); ; shift += 7 {
  707. if shift >= 64 {
  708. return ErrIntOverflowGenerated
  709. }
  710. if iNdEx >= l {
  711. return io.ErrUnexpectedEOF
  712. }
  713. b := dAtA[iNdEx]
  714. iNdEx++
  715. msglen |= int(b&0x7F) << shift
  716. if b < 0x80 {
  717. break
  718. }
  719. }
  720. if msglen < 0 {
  721. return ErrInvalidLengthGenerated
  722. }
  723. postIndex := iNdEx + msglen
  724. if postIndex < 0 {
  725. return ErrInvalidLengthGenerated
  726. }
  727. if postIndex > l {
  728. return io.ErrUnexpectedEOF
  729. }
  730. m.Conditions = append(m.Conditions, v1.Condition{})
  731. if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  732. return err
  733. }
  734. iNdEx = postIndex
  735. case 2:
  736. if wireType != 2 {
  737. return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
  738. }
  739. var stringLen uint64
  740. for shift := uint(0); ; shift += 7 {
  741. if shift >= 64 {
  742. return ErrIntOverflowGenerated
  743. }
  744. if iNdEx >= l {
  745. return io.ErrUnexpectedEOF
  746. }
  747. b := dAtA[iNdEx]
  748. iNdEx++
  749. stringLen |= uint64(b&0x7F) << shift
  750. if b < 0x80 {
  751. break
  752. }
  753. }
  754. intStringLen := int(stringLen)
  755. if intStringLen < 0 {
  756. return ErrInvalidLengthGenerated
  757. }
  758. postIndex := iNdEx + intStringLen
  759. if postIndex < 0 {
  760. return ErrInvalidLengthGenerated
  761. }
  762. if postIndex > l {
  763. return io.ErrUnexpectedEOF
  764. }
  765. m.ResourceVersion = string(dAtA[iNdEx:postIndex])
  766. iNdEx = postIndex
  767. default:
  768. iNdEx = preIndex
  769. skippy, err := skipGenerated(dAtA[iNdEx:])
  770. if err != nil {
  771. return err
  772. }
  773. if (skippy < 0) || (iNdEx+skippy) < 0 {
  774. return ErrInvalidLengthGenerated
  775. }
  776. if (iNdEx + skippy) > l {
  777. return io.ErrUnexpectedEOF
  778. }
  779. iNdEx += skippy
  780. }
  781. }
  782. if iNdEx > l {
  783. return io.ErrUnexpectedEOF
  784. }
  785. return nil
  786. }
  787. func skipGenerated(dAtA []byte) (n int, err error) {
  788. l := len(dAtA)
  789. iNdEx := 0
  790. depth := 0
  791. for iNdEx < l {
  792. var wire uint64
  793. for shift := uint(0); ; shift += 7 {
  794. if shift >= 64 {
  795. return 0, ErrIntOverflowGenerated
  796. }
  797. if iNdEx >= l {
  798. return 0, io.ErrUnexpectedEOF
  799. }
  800. b := dAtA[iNdEx]
  801. iNdEx++
  802. wire |= (uint64(b) & 0x7F) << shift
  803. if b < 0x80 {
  804. break
  805. }
  806. }
  807. wireType := int(wire & 0x7)
  808. switch wireType {
  809. case 0:
  810. for shift := uint(0); ; shift += 7 {
  811. if shift >= 64 {
  812. return 0, ErrIntOverflowGenerated
  813. }
  814. if iNdEx >= l {
  815. return 0, io.ErrUnexpectedEOF
  816. }
  817. iNdEx++
  818. if dAtA[iNdEx-1] < 0x80 {
  819. break
  820. }
  821. }
  822. case 1:
  823. iNdEx += 8
  824. case 2:
  825. var length int
  826. for shift := uint(0); ; shift += 7 {
  827. if shift >= 64 {
  828. return 0, ErrIntOverflowGenerated
  829. }
  830. if iNdEx >= l {
  831. return 0, io.ErrUnexpectedEOF
  832. }
  833. b := dAtA[iNdEx]
  834. iNdEx++
  835. length |= (int(b) & 0x7F) << shift
  836. if b < 0x80 {
  837. break
  838. }
  839. }
  840. if length < 0 {
  841. return 0, ErrInvalidLengthGenerated
  842. }
  843. iNdEx += length
  844. case 3:
  845. depth++
  846. case 4:
  847. if depth == 0 {
  848. return 0, ErrUnexpectedEndOfGroupGenerated
  849. }
  850. depth--
  851. case 5:
  852. iNdEx += 4
  853. default:
  854. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  855. }
  856. if iNdEx < 0 {
  857. return 0, ErrInvalidLengthGenerated
  858. }
  859. if depth == 0 {
  860. return iNdEx, nil
  861. }
  862. }
  863. return 0, io.ErrUnexpectedEOF
  864. }
  865. var (
  866. ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
  867. ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
  868. ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
  869. )