1
16
17
18
19
20 package v1
21
22 import (
23 fmt "fmt"
24
25 io "io"
26
27 proto "github.com/gogo/protobuf/proto"
28 v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
29
30 math "math"
31 math_bits "math/bits"
32 reflect "reflect"
33 strings "strings"
34 )
35
36
37 var _ = proto.Marshal
38 var _ = fmt.Errorf
39 var _ = math.Inf
40
41
42
43
44
45 const _ = proto.GoGoProtoPackageIsVersion3
46
47 func (m *Lease) Reset() { *m = Lease{} }
48 func (*Lease) ProtoMessage() {}
49 func (*Lease) Descriptor() ([]byte, []int) {
50 return fileDescriptor_239d5a4df3139dce, []int{0}
51 }
52 func (m *Lease) XXX_Unmarshal(b []byte) error {
53 return m.Unmarshal(b)
54 }
55 func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
56 b = b[:cap(b)]
57 n, err := m.MarshalToSizedBuffer(b)
58 if err != nil {
59 return nil, err
60 }
61 return b[:n], nil
62 }
63 func (m *Lease) XXX_Merge(src proto.Message) {
64 xxx_messageInfo_Lease.Merge(m, src)
65 }
66 func (m *Lease) XXX_Size() int {
67 return m.Size()
68 }
69 func (m *Lease) XXX_DiscardUnknown() {
70 xxx_messageInfo_Lease.DiscardUnknown(m)
71 }
72
73 var xxx_messageInfo_Lease proto.InternalMessageInfo
74
75 func (m *LeaseList) Reset() { *m = LeaseList{} }
76 func (*LeaseList) ProtoMessage() {}
77 func (*LeaseList) Descriptor() ([]byte, []int) {
78 return fileDescriptor_239d5a4df3139dce, []int{1}
79 }
80 func (m *LeaseList) XXX_Unmarshal(b []byte) error {
81 return m.Unmarshal(b)
82 }
83 func (m *LeaseList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
84 b = b[:cap(b)]
85 n, err := m.MarshalToSizedBuffer(b)
86 if err != nil {
87 return nil, err
88 }
89 return b[:n], nil
90 }
91 func (m *LeaseList) XXX_Merge(src proto.Message) {
92 xxx_messageInfo_LeaseList.Merge(m, src)
93 }
94 func (m *LeaseList) XXX_Size() int {
95 return m.Size()
96 }
97 func (m *LeaseList) XXX_DiscardUnknown() {
98 xxx_messageInfo_LeaseList.DiscardUnknown(m)
99 }
100
101 var xxx_messageInfo_LeaseList proto.InternalMessageInfo
102
103 func (m *LeaseSpec) Reset() { *m = LeaseSpec{} }
104 func (*LeaseSpec) ProtoMessage() {}
105 func (*LeaseSpec) Descriptor() ([]byte, []int) {
106 return fileDescriptor_239d5a4df3139dce, []int{2}
107 }
108 func (m *LeaseSpec) XXX_Unmarshal(b []byte) error {
109 return m.Unmarshal(b)
110 }
111 func (m *LeaseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
112 b = b[:cap(b)]
113 n, err := m.MarshalToSizedBuffer(b)
114 if err != nil {
115 return nil, err
116 }
117 return b[:n], nil
118 }
119 func (m *LeaseSpec) XXX_Merge(src proto.Message) {
120 xxx_messageInfo_LeaseSpec.Merge(m, src)
121 }
122 func (m *LeaseSpec) XXX_Size() int {
123 return m.Size()
124 }
125 func (m *LeaseSpec) XXX_DiscardUnknown() {
126 xxx_messageInfo_LeaseSpec.DiscardUnknown(m)
127 }
128
129 var xxx_messageInfo_LeaseSpec proto.InternalMessageInfo
130
131 func init() {
132 proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1.Lease")
133 proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1.LeaseList")
134 proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1.LeaseSpec")
135 }
136
137 func init() {
138 proto.RegisterFile("k8s.io/api/coordination/v1/generated.proto", fileDescriptor_239d5a4df3139dce)
139 }
140
141 var fileDescriptor_239d5a4df3139dce = []byte{
142
143 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6f, 0xd3, 0x30,
144 0x18, 0xc6, 0x9b, 0xb5, 0x95, 0x56, 0x97, 0x8d, 0x2a, 0xea, 0x21, 0xea, 0x21, 0x19, 0x95, 0x90,
145 0x26, 0x24, 0x1c, 0x3a, 0x21, 0x84, 0x38, 0x8d, 0x08, 0x01, 0x93, 0x3a, 0x21, 0x65, 0x3b, 0xa1,
146 0x1d, 0x70, 0x93, 0x97, 0xd4, 0x74, 0x89, 0x83, 0xed, 0x16, 0xed, 0xc6, 0x47, 0xe0, 0xca, 0xc7,
147 0x80, 0x4f, 0xd1, 0xe3, 0x8e, 0x3b, 0x45, 0xd4, 0x7c, 0x11, 0x64, 0xb7, 0x5b, 0x4b, 0xff, 0x68,
148 0xd3, 0x6e, 0xf1, 0xeb, 0xe7, 0xf9, 0xbd, 0x8f, 0x9f, 0x43, 0xd0, 0x93, 0xc1, 0x4b, 0x81, 0x29,
149 0xf3, 0x49, 0x4e, 0xfd, 0x88, 0x31, 0x1e, 0xd3, 0x8c, 0x48, 0xca, 0x32, 0x7f, 0xd4, 0xf1, 0x13,
150 0xc8, 0x80, 0x13, 0x09, 0x31, 0xce, 0x39, 0x93, 0xcc, 0x6e, 0x4d, 0xb5, 0x98, 0xe4, 0x14, 0x2f,
151 0x6a, 0xf1, 0xa8, 0xd3, 0x7a, 0x9a, 0x50, 0xd9, 0x1f, 0xf6, 0x70, 0xc4, 0x52, 0x3f, 0x61, 0x09,
152 0xf3, 0x8d, 0xa5, 0x37, 0xfc, 0x6c, 0x4e, 0xe6, 0x60, 0xbe, 0xa6, 0xa8, 0xd6, 0xf3, 0xf9, 0xda,
153 0x94, 0x44, 0x7d, 0x9a, 0x01, 0xbf, 0xf0, 0xf3, 0x41, 0xa2, 0x07, 0xc2, 0x4f, 0x41, 0x92, 0x35,
154 0x01, 0x5a, 0xfe, 0x26, 0x17, 0x1f, 0x66, 0x92, 0xa6, 0xb0, 0x62, 0x78, 0x71, 0x9b, 0x41, 0x44,
155 0x7d, 0x48, 0xc9, 0xb2, 0xaf, 0xfd, 0xdb, 0x42, 0xd5, 0x2e, 0x10, 0x01, 0xf6, 0x27, 0xb4, 0xad,
156 0xd3, 0xc4, 0x44, 0x12, 0xc7, 0xda, 0xb3, 0xf6, 0xeb, 0x07, 0xcf, 0xf0, 0xbc, 0x86, 0x1b, 0x28,
157 0xce, 0x07, 0x89, 0x1e, 0x08, 0xac, 0xd5, 0x78, 0xd4, 0xc1, 0x1f, 0x7a, 0x5f, 0x20, 0x92, 0xc7,
158 0x20, 0x49, 0x60, 0x8f, 0x0b, 0xaf, 0xa4, 0x0a, 0x0f, 0xcd, 0x67, 0xe1, 0x0d, 0xd5, 0x7e, 0x87,
159 0x2a, 0x22, 0x87, 0xc8, 0xd9, 0x32, 0xf4, 0xc7, 0x78, 0x73, 0xc9, 0xd8, 0x44, 0x3a, 0xc9, 0x21,
160 0x0a, 0x1e, 0xcc, 0x90, 0x15, 0x7d, 0x0a, 0x0d, 0xa0, 0xfd, 0xcb, 0x42, 0x35, 0xa3, 0xe8, 0x52,
161 0x21, 0xed, 0xb3, 0x95, 0xe0, 0xf8, 0x6e, 0xc1, 0xb5, 0xdb, 0xc4, 0x6e, 0xcc, 0x76, 0x6c, 0x5f,
162 0x4f, 0x16, 0x42, 0xbf, 0x45, 0x55, 0x2a, 0x21, 0x15, 0xce, 0xd6, 0x5e, 0x79, 0xbf, 0x7e, 0xf0,
163 0xe8, 0xd6, 0xd4, 0xc1, 0xce, 0x8c, 0x56, 0x3d, 0xd2, 0xbe, 0x70, 0x6a, 0x6f, 0xff, 0x2c, 0xcf,
164 0x32, 0xeb, 0x77, 0xd8, 0xaf, 0xd0, 0x6e, 0x9f, 0x9d, 0xc7, 0xc0, 0x8f, 0x62, 0xc8, 0x24, 0x95,
165 0x17, 0x26, 0x79, 0x2d, 0xb0, 0x55, 0xe1, 0xed, 0xbe, 0xff, 0xef, 0x26, 0x5c, 0x52, 0xda, 0x5d,
166 0xd4, 0x3c, 0xd7, 0xa0, 0x37, 0x43, 0x6e, 0x36, 0x9f, 0x40, 0xc4, 0xb2, 0x58, 0x98, 0x5a, 0xab,
167 0x81, 0xa3, 0x0a, 0xaf, 0xd9, 0x5d, 0x73, 0x1f, 0xae, 0x75, 0xd9, 0x3d, 0x54, 0x27, 0xd1, 0xd7,
168 0x21, 0xe5, 0x70, 0x4a, 0x53, 0x70, 0xca, 0xa6, 0x40, 0xff, 0x6e, 0x05, 0x1e, 0xd3, 0x88, 0x33,
169 0x6d, 0x0b, 0x1e, 0xaa, 0xc2, 0xab, 0xbf, 0x9e, 0x73, 0xc2, 0x45, 0xa8, 0x7d, 0x86, 0x6a, 0x1c,
170 0x32, 0xf8, 0x66, 0x36, 0x54, 0xee, 0xb7, 0x61, 0x47, 0x15, 0x5e, 0x2d, 0xbc, 0xa6, 0x84, 0x73,
171 0xa0, 0x7d, 0x88, 0x1a, 0xe6, 0x65, 0xa7, 0x9c, 0x64, 0x82, 0xea, 0xb7, 0x09, 0xa7, 0x6a, 0xba,
172 0x68, 0xaa, 0xc2, 0x6b, 0x74, 0x97, 0xee, 0xc2, 0x15, 0x75, 0x70, 0x38, 0x9e, 0xb8, 0xa5, 0xcb,
173 0x89, 0x5b, 0xba, 0x9a, 0xb8, 0xa5, 0xef, 0xca, 0xb5, 0xc6, 0xca, 0xb5, 0x2e, 0x95, 0x6b, 0x5d,
174 0x29, 0xd7, 0xfa, 0xa3, 0x5c, 0xeb, 0xc7, 0x5f, 0xb7, 0xf4, 0xb1, 0xb5, 0xf9, 0x07, 0xf2, 0x2f,
175 0x00, 0x00, 0xff, 0xff, 0xb0, 0xb0, 0x3a, 0x46, 0x5d, 0x04, 0x00, 0x00,
176 }
177
178 func (m *Lease) Marshal() (dAtA []byte, err error) {
179 size := m.Size()
180 dAtA = make([]byte, size)
181 n, err := m.MarshalToSizedBuffer(dAtA[:size])
182 if err != nil {
183 return nil, err
184 }
185 return dAtA[:n], nil
186 }
187
188 func (m *Lease) MarshalTo(dAtA []byte) (int, error) {
189 size := m.Size()
190 return m.MarshalToSizedBuffer(dAtA[:size])
191 }
192
193 func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) {
194 i := len(dAtA)
195 _ = i
196 var l int
197 _ = l
198 {
199 size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
200 if err != nil {
201 return 0, err
202 }
203 i -= size
204 i = encodeVarintGenerated(dAtA, i, uint64(size))
205 }
206 i--
207 dAtA[i] = 0x12
208 {
209 size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
210 if err != nil {
211 return 0, err
212 }
213 i -= size
214 i = encodeVarintGenerated(dAtA, i, uint64(size))
215 }
216 i--
217 dAtA[i] = 0xa
218 return len(dAtA) - i, nil
219 }
220
221 func (m *LeaseList) Marshal() (dAtA []byte, err error) {
222 size := m.Size()
223 dAtA = make([]byte, size)
224 n, err := m.MarshalToSizedBuffer(dAtA[:size])
225 if err != nil {
226 return nil, err
227 }
228 return dAtA[:n], nil
229 }
230
231 func (m *LeaseList) MarshalTo(dAtA []byte) (int, error) {
232 size := m.Size()
233 return m.MarshalToSizedBuffer(dAtA[:size])
234 }
235
236 func (m *LeaseList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
237 i := len(dAtA)
238 _ = i
239 var l int
240 _ = l
241 if len(m.Items) > 0 {
242 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
243 {
244 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
245 if err != nil {
246 return 0, err
247 }
248 i -= size
249 i = encodeVarintGenerated(dAtA, i, uint64(size))
250 }
251 i--
252 dAtA[i] = 0x12
253 }
254 }
255 {
256 size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
257 if err != nil {
258 return 0, err
259 }
260 i -= size
261 i = encodeVarintGenerated(dAtA, i, uint64(size))
262 }
263 i--
264 dAtA[i] = 0xa
265 return len(dAtA) - i, nil
266 }
267
268 func (m *LeaseSpec) Marshal() (dAtA []byte, err error) {
269 size := m.Size()
270 dAtA = make([]byte, size)
271 n, err := m.MarshalToSizedBuffer(dAtA[:size])
272 if err != nil {
273 return nil, err
274 }
275 return dAtA[:n], nil
276 }
277
278 func (m *LeaseSpec) MarshalTo(dAtA []byte) (int, error) {
279 size := m.Size()
280 return m.MarshalToSizedBuffer(dAtA[:size])
281 }
282
283 func (m *LeaseSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
284 i := len(dAtA)
285 _ = i
286 var l int
287 _ = l
288 if m.LeaseTransitions != nil {
289 i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseTransitions))
290 i--
291 dAtA[i] = 0x28
292 }
293 if m.RenewTime != nil {
294 {
295 size, err := m.RenewTime.MarshalToSizedBuffer(dAtA[:i])
296 if err != nil {
297 return 0, err
298 }
299 i -= size
300 i = encodeVarintGenerated(dAtA, i, uint64(size))
301 }
302 i--
303 dAtA[i] = 0x22
304 }
305 if m.AcquireTime != nil {
306 {
307 size, err := m.AcquireTime.MarshalToSizedBuffer(dAtA[:i])
308 if err != nil {
309 return 0, err
310 }
311 i -= size
312 i = encodeVarintGenerated(dAtA, i, uint64(size))
313 }
314 i--
315 dAtA[i] = 0x1a
316 }
317 if m.LeaseDurationSeconds != nil {
318 i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseDurationSeconds))
319 i--
320 dAtA[i] = 0x10
321 }
322 if m.HolderIdentity != nil {
323 i -= len(*m.HolderIdentity)
324 copy(dAtA[i:], *m.HolderIdentity)
325 i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HolderIdentity)))
326 i--
327 dAtA[i] = 0xa
328 }
329 return len(dAtA) - i, nil
330 }
331
332 func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
333 offset -= sovGenerated(v)
334 base := offset
335 for v >= 1<<7 {
336 dAtA[offset] = uint8(v&0x7f | 0x80)
337 v >>= 7
338 offset++
339 }
340 dAtA[offset] = uint8(v)
341 return base
342 }
343 func (m *Lease) Size() (n int) {
344 if m == nil {
345 return 0
346 }
347 var l int
348 _ = l
349 l = m.ObjectMeta.Size()
350 n += 1 + l + sovGenerated(uint64(l))
351 l = m.Spec.Size()
352 n += 1 + l + sovGenerated(uint64(l))
353 return n
354 }
355
356 func (m *LeaseList) Size() (n int) {
357 if m == nil {
358 return 0
359 }
360 var l int
361 _ = l
362 l = m.ListMeta.Size()
363 n += 1 + l + sovGenerated(uint64(l))
364 if len(m.Items) > 0 {
365 for _, e := range m.Items {
366 l = e.Size()
367 n += 1 + l + sovGenerated(uint64(l))
368 }
369 }
370 return n
371 }
372
373 func (m *LeaseSpec) Size() (n int) {
374 if m == nil {
375 return 0
376 }
377 var l int
378 _ = l
379 if m.HolderIdentity != nil {
380 l = len(*m.HolderIdentity)
381 n += 1 + l + sovGenerated(uint64(l))
382 }
383 if m.LeaseDurationSeconds != nil {
384 n += 1 + sovGenerated(uint64(*m.LeaseDurationSeconds))
385 }
386 if m.AcquireTime != nil {
387 l = m.AcquireTime.Size()
388 n += 1 + l + sovGenerated(uint64(l))
389 }
390 if m.RenewTime != nil {
391 l = m.RenewTime.Size()
392 n += 1 + l + sovGenerated(uint64(l))
393 }
394 if m.LeaseTransitions != nil {
395 n += 1 + sovGenerated(uint64(*m.LeaseTransitions))
396 }
397 return n
398 }
399
400 func sovGenerated(x uint64) (n int) {
401 return (math_bits.Len64(x|1) + 6) / 7
402 }
403 func sozGenerated(x uint64) (n int) {
404 return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
405 }
406 func (this *Lease) String() string {
407 if this == nil {
408 return "nil"
409 }
410 s := strings.Join([]string{`&Lease{`,
411 `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
412 `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseSpec", "LeaseSpec", 1), `&`, ``, 1) + `,`,
413 `}`,
414 }, "")
415 return s
416 }
417 func (this *LeaseList) String() string {
418 if this == nil {
419 return "nil"
420 }
421 repeatedStringForItems := "[]Lease{"
422 for _, f := range this.Items {
423 repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Lease", "Lease", 1), `&`, ``, 1) + ","
424 }
425 repeatedStringForItems += "}"
426 s := strings.Join([]string{`&LeaseList{`,
427 `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
428 `Items:` + repeatedStringForItems + `,`,
429 `}`,
430 }, "")
431 return s
432 }
433 func (this *LeaseSpec) String() string {
434 if this == nil {
435 return "nil"
436 }
437 s := strings.Join([]string{`&LeaseSpec{`,
438 `HolderIdentity:` + valueToStringGenerated(this.HolderIdentity) + `,`,
439 `LeaseDurationSeconds:` + valueToStringGenerated(this.LeaseDurationSeconds) + `,`,
440 `AcquireTime:` + strings.Replace(fmt.Sprintf("%v", this.AcquireTime), "MicroTime", "v1.MicroTime", 1) + `,`,
441 `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`,
442 `LeaseTransitions:` + valueToStringGenerated(this.LeaseTransitions) + `,`,
443 `}`,
444 }, "")
445 return s
446 }
447 func valueToStringGenerated(v interface{}) string {
448 rv := reflect.ValueOf(v)
449 if rv.IsNil() {
450 return "nil"
451 }
452 pv := reflect.Indirect(rv).Interface()
453 return fmt.Sprintf("*%v", pv)
454 }
455 func (m *Lease) Unmarshal(dAtA []byte) error {
456 l := len(dAtA)
457 iNdEx := 0
458 for iNdEx < l {
459 preIndex := iNdEx
460 var wire uint64
461 for shift := uint(0); ; shift += 7 {
462 if shift >= 64 {
463 return ErrIntOverflowGenerated
464 }
465 if iNdEx >= l {
466 return io.ErrUnexpectedEOF
467 }
468 b := dAtA[iNdEx]
469 iNdEx++
470 wire |= uint64(b&0x7F) << shift
471 if b < 0x80 {
472 break
473 }
474 }
475 fieldNum := int32(wire >> 3)
476 wireType := int(wire & 0x7)
477 if wireType == 4 {
478 return fmt.Errorf("proto: Lease: wiretype end group for non-group")
479 }
480 if fieldNum <= 0 {
481 return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire)
482 }
483 switch fieldNum {
484 case 1:
485 if wireType != 2 {
486 return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
487 }
488 var msglen int
489 for shift := uint(0); ; shift += 7 {
490 if shift >= 64 {
491 return ErrIntOverflowGenerated
492 }
493 if iNdEx >= l {
494 return io.ErrUnexpectedEOF
495 }
496 b := dAtA[iNdEx]
497 iNdEx++
498 msglen |= int(b&0x7F) << shift
499 if b < 0x80 {
500 break
501 }
502 }
503 if msglen < 0 {
504 return ErrInvalidLengthGenerated
505 }
506 postIndex := iNdEx + msglen
507 if postIndex < 0 {
508 return ErrInvalidLengthGenerated
509 }
510 if postIndex > l {
511 return io.ErrUnexpectedEOF
512 }
513 if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
514 return err
515 }
516 iNdEx = postIndex
517 case 2:
518 if wireType != 2 {
519 return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
520 }
521 var msglen int
522 for shift := uint(0); ; shift += 7 {
523 if shift >= 64 {
524 return ErrIntOverflowGenerated
525 }
526 if iNdEx >= l {
527 return io.ErrUnexpectedEOF
528 }
529 b := dAtA[iNdEx]
530 iNdEx++
531 msglen |= int(b&0x7F) << shift
532 if b < 0x80 {
533 break
534 }
535 }
536 if msglen < 0 {
537 return ErrInvalidLengthGenerated
538 }
539 postIndex := iNdEx + msglen
540 if postIndex < 0 {
541 return ErrInvalidLengthGenerated
542 }
543 if postIndex > l {
544 return io.ErrUnexpectedEOF
545 }
546 if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
547 return err
548 }
549 iNdEx = postIndex
550 default:
551 iNdEx = preIndex
552 skippy, err := skipGenerated(dAtA[iNdEx:])
553 if err != nil {
554 return err
555 }
556 if (skippy < 0) || (iNdEx+skippy) < 0 {
557 return ErrInvalidLengthGenerated
558 }
559 if (iNdEx + skippy) > l {
560 return io.ErrUnexpectedEOF
561 }
562 iNdEx += skippy
563 }
564 }
565
566 if iNdEx > l {
567 return io.ErrUnexpectedEOF
568 }
569 return nil
570 }
571 func (m *LeaseList) Unmarshal(dAtA []byte) error {
572 l := len(dAtA)
573 iNdEx := 0
574 for iNdEx < l {
575 preIndex := iNdEx
576 var wire uint64
577 for shift := uint(0); ; shift += 7 {
578 if shift >= 64 {
579 return ErrIntOverflowGenerated
580 }
581 if iNdEx >= l {
582 return io.ErrUnexpectedEOF
583 }
584 b := dAtA[iNdEx]
585 iNdEx++
586 wire |= uint64(b&0x7F) << shift
587 if b < 0x80 {
588 break
589 }
590 }
591 fieldNum := int32(wire >> 3)
592 wireType := int(wire & 0x7)
593 if wireType == 4 {
594 return fmt.Errorf("proto: LeaseList: wiretype end group for non-group")
595 }
596 if fieldNum <= 0 {
597 return fmt.Errorf("proto: LeaseList: illegal tag %d (wire type %d)", fieldNum, wire)
598 }
599 switch fieldNum {
600 case 1:
601 if wireType != 2 {
602 return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
603 }
604 var msglen int
605 for shift := uint(0); ; shift += 7 {
606 if shift >= 64 {
607 return ErrIntOverflowGenerated
608 }
609 if iNdEx >= l {
610 return io.ErrUnexpectedEOF
611 }
612 b := dAtA[iNdEx]
613 iNdEx++
614 msglen |= int(b&0x7F) << shift
615 if b < 0x80 {
616 break
617 }
618 }
619 if msglen < 0 {
620 return ErrInvalidLengthGenerated
621 }
622 postIndex := iNdEx + msglen
623 if postIndex < 0 {
624 return ErrInvalidLengthGenerated
625 }
626 if postIndex > l {
627 return io.ErrUnexpectedEOF
628 }
629 if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
630 return err
631 }
632 iNdEx = postIndex
633 case 2:
634 if wireType != 2 {
635 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
636 }
637 var msglen int
638 for shift := uint(0); ; shift += 7 {
639 if shift >= 64 {
640 return ErrIntOverflowGenerated
641 }
642 if iNdEx >= l {
643 return io.ErrUnexpectedEOF
644 }
645 b := dAtA[iNdEx]
646 iNdEx++
647 msglen |= int(b&0x7F) << shift
648 if b < 0x80 {
649 break
650 }
651 }
652 if msglen < 0 {
653 return ErrInvalidLengthGenerated
654 }
655 postIndex := iNdEx + msglen
656 if postIndex < 0 {
657 return ErrInvalidLengthGenerated
658 }
659 if postIndex > l {
660 return io.ErrUnexpectedEOF
661 }
662 m.Items = append(m.Items, Lease{})
663 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
664 return err
665 }
666 iNdEx = postIndex
667 default:
668 iNdEx = preIndex
669 skippy, err := skipGenerated(dAtA[iNdEx:])
670 if err != nil {
671 return err
672 }
673 if (skippy < 0) || (iNdEx+skippy) < 0 {
674 return ErrInvalidLengthGenerated
675 }
676 if (iNdEx + skippy) > l {
677 return io.ErrUnexpectedEOF
678 }
679 iNdEx += skippy
680 }
681 }
682
683 if iNdEx > l {
684 return io.ErrUnexpectedEOF
685 }
686 return nil
687 }
688 func (m *LeaseSpec) Unmarshal(dAtA []byte) error {
689 l := len(dAtA)
690 iNdEx := 0
691 for iNdEx < l {
692 preIndex := iNdEx
693 var wire uint64
694 for shift := uint(0); ; shift += 7 {
695 if shift >= 64 {
696 return ErrIntOverflowGenerated
697 }
698 if iNdEx >= l {
699 return io.ErrUnexpectedEOF
700 }
701 b := dAtA[iNdEx]
702 iNdEx++
703 wire |= uint64(b&0x7F) << shift
704 if b < 0x80 {
705 break
706 }
707 }
708 fieldNum := int32(wire >> 3)
709 wireType := int(wire & 0x7)
710 if wireType == 4 {
711 return fmt.Errorf("proto: LeaseSpec: wiretype end group for non-group")
712 }
713 if fieldNum <= 0 {
714 return fmt.Errorf("proto: LeaseSpec: illegal tag %d (wire type %d)", fieldNum, wire)
715 }
716 switch fieldNum {
717 case 1:
718 if wireType != 2 {
719 return fmt.Errorf("proto: wrong wireType = %d for field HolderIdentity", wireType)
720 }
721 var stringLen uint64
722 for shift := uint(0); ; shift += 7 {
723 if shift >= 64 {
724 return ErrIntOverflowGenerated
725 }
726 if iNdEx >= l {
727 return io.ErrUnexpectedEOF
728 }
729 b := dAtA[iNdEx]
730 iNdEx++
731 stringLen |= uint64(b&0x7F) << shift
732 if b < 0x80 {
733 break
734 }
735 }
736 intStringLen := int(stringLen)
737 if intStringLen < 0 {
738 return ErrInvalidLengthGenerated
739 }
740 postIndex := iNdEx + intStringLen
741 if postIndex < 0 {
742 return ErrInvalidLengthGenerated
743 }
744 if postIndex > l {
745 return io.ErrUnexpectedEOF
746 }
747 s := string(dAtA[iNdEx:postIndex])
748 m.HolderIdentity = &s
749 iNdEx = postIndex
750 case 2:
751 if wireType != 0 {
752 return fmt.Errorf("proto: wrong wireType = %d for field LeaseDurationSeconds", wireType)
753 }
754 var v int32
755 for shift := uint(0); ; shift += 7 {
756 if shift >= 64 {
757 return ErrIntOverflowGenerated
758 }
759 if iNdEx >= l {
760 return io.ErrUnexpectedEOF
761 }
762 b := dAtA[iNdEx]
763 iNdEx++
764 v |= int32(b&0x7F) << shift
765 if b < 0x80 {
766 break
767 }
768 }
769 m.LeaseDurationSeconds = &v
770 case 3:
771 if wireType != 2 {
772 return fmt.Errorf("proto: wrong wireType = %d for field AcquireTime", wireType)
773 }
774 var msglen int
775 for shift := uint(0); ; shift += 7 {
776 if shift >= 64 {
777 return ErrIntOverflowGenerated
778 }
779 if iNdEx >= l {
780 return io.ErrUnexpectedEOF
781 }
782 b := dAtA[iNdEx]
783 iNdEx++
784 msglen |= int(b&0x7F) << shift
785 if b < 0x80 {
786 break
787 }
788 }
789 if msglen < 0 {
790 return ErrInvalidLengthGenerated
791 }
792 postIndex := iNdEx + msglen
793 if postIndex < 0 {
794 return ErrInvalidLengthGenerated
795 }
796 if postIndex > l {
797 return io.ErrUnexpectedEOF
798 }
799 if m.AcquireTime == nil {
800 m.AcquireTime = &v1.MicroTime{}
801 }
802 if err := m.AcquireTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
803 return err
804 }
805 iNdEx = postIndex
806 case 4:
807 if wireType != 2 {
808 return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType)
809 }
810 var msglen int
811 for shift := uint(0); ; shift += 7 {
812 if shift >= 64 {
813 return ErrIntOverflowGenerated
814 }
815 if iNdEx >= l {
816 return io.ErrUnexpectedEOF
817 }
818 b := dAtA[iNdEx]
819 iNdEx++
820 msglen |= int(b&0x7F) << shift
821 if b < 0x80 {
822 break
823 }
824 }
825 if msglen < 0 {
826 return ErrInvalidLengthGenerated
827 }
828 postIndex := iNdEx + msglen
829 if postIndex < 0 {
830 return ErrInvalidLengthGenerated
831 }
832 if postIndex > l {
833 return io.ErrUnexpectedEOF
834 }
835 if m.RenewTime == nil {
836 m.RenewTime = &v1.MicroTime{}
837 }
838 if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
839 return err
840 }
841 iNdEx = postIndex
842 case 5:
843 if wireType != 0 {
844 return fmt.Errorf("proto: wrong wireType = %d for field LeaseTransitions", wireType)
845 }
846 var v int32
847 for shift := uint(0); ; shift += 7 {
848 if shift >= 64 {
849 return ErrIntOverflowGenerated
850 }
851 if iNdEx >= l {
852 return io.ErrUnexpectedEOF
853 }
854 b := dAtA[iNdEx]
855 iNdEx++
856 v |= int32(b&0x7F) << shift
857 if b < 0x80 {
858 break
859 }
860 }
861 m.LeaseTransitions = &v
862 default:
863 iNdEx = preIndex
864 skippy, err := skipGenerated(dAtA[iNdEx:])
865 if err != nil {
866 return err
867 }
868 if (skippy < 0) || (iNdEx+skippy) < 0 {
869 return ErrInvalidLengthGenerated
870 }
871 if (iNdEx + skippy) > l {
872 return io.ErrUnexpectedEOF
873 }
874 iNdEx += skippy
875 }
876 }
877
878 if iNdEx > l {
879 return io.ErrUnexpectedEOF
880 }
881 return nil
882 }
883 func skipGenerated(dAtA []byte) (n int, err error) {
884 l := len(dAtA)
885 iNdEx := 0
886 depth := 0
887 for iNdEx < l {
888 var wire uint64
889 for shift := uint(0); ; shift += 7 {
890 if shift >= 64 {
891 return 0, ErrIntOverflowGenerated
892 }
893 if iNdEx >= l {
894 return 0, io.ErrUnexpectedEOF
895 }
896 b := dAtA[iNdEx]
897 iNdEx++
898 wire |= (uint64(b) & 0x7F) << shift
899 if b < 0x80 {
900 break
901 }
902 }
903 wireType := int(wire & 0x7)
904 switch wireType {
905 case 0:
906 for shift := uint(0); ; shift += 7 {
907 if shift >= 64 {
908 return 0, ErrIntOverflowGenerated
909 }
910 if iNdEx >= l {
911 return 0, io.ErrUnexpectedEOF
912 }
913 iNdEx++
914 if dAtA[iNdEx-1] < 0x80 {
915 break
916 }
917 }
918 case 1:
919 iNdEx += 8
920 case 2:
921 var length int
922 for shift := uint(0); ; shift += 7 {
923 if shift >= 64 {
924 return 0, ErrIntOverflowGenerated
925 }
926 if iNdEx >= l {
927 return 0, io.ErrUnexpectedEOF
928 }
929 b := dAtA[iNdEx]
930 iNdEx++
931 length |= (int(b) & 0x7F) << shift
932 if b < 0x80 {
933 break
934 }
935 }
936 if length < 0 {
937 return 0, ErrInvalidLengthGenerated
938 }
939 iNdEx += length
940 case 3:
941 depth++
942 case 4:
943 if depth == 0 {
944 return 0, ErrUnexpectedEndOfGroupGenerated
945 }
946 depth--
947 case 5:
948 iNdEx += 4
949 default:
950 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
951 }
952 if iNdEx < 0 {
953 return 0, ErrInvalidLengthGenerated
954 }
955 if depth == 0 {
956 return iNdEx, nil
957 }
958 }
959 return 0, io.ErrUnexpectedEOF
960 }
961
962 var (
963 ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
964 ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
965 ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
966 )
967
View as plain text