1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: lease.proto
3
4/*
5	Package leasepb is a generated protocol buffer package.
6
7	It is generated from these files:
8		lease.proto
9
10	It has these top-level messages:
11		Lease
12		LeaseInternalRequest
13		LeaseInternalResponse
14*/
15package leasepb
16
17import (
18	"fmt"
19
20	proto "github.com/golang/protobuf/proto"
21
22	math "math"
23
24	_ "github.com/gogo/protobuf/gogoproto"
25
26	etcdserverpb "go.etcd.io/etcd/etcdserver/etcdserverpb"
27
28	io "io"
29)
30
31// Reference imports to suppress errors if they are not otherwise used.
32var _ = proto.Marshal
33var _ = fmt.Errorf
34var _ = math.Inf
35
36// This is a compile-time assertion to ensure that this generated file
37// is compatible with the proto package it is being compiled against.
38// A compilation error at this line likely means your copy of the
39// proto package needs to be updated.
40const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
41
42type Lease struct {
43	ID           int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
44	TTL          int64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"`
45	RemainingTTL int64 `protobuf:"varint,3,opt,name=RemainingTTL,proto3" json:"RemainingTTL,omitempty"`
46}
47
48func (m *Lease) Reset()                    { *m = Lease{} }
49func (m *Lease) String() string            { return proto.CompactTextString(m) }
50func (*Lease) ProtoMessage()               {}
51func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{0} }
52
53type LeaseInternalRequest struct {
54	LeaseTimeToLiveRequest *etcdserverpb.LeaseTimeToLiveRequest `protobuf:"bytes,1,opt,name=LeaseTimeToLiveRequest" json:"LeaseTimeToLiveRequest,omitempty"`
55}
56
57func (m *LeaseInternalRequest) Reset()                    { *m = LeaseInternalRequest{} }
58func (m *LeaseInternalRequest) String() string            { return proto.CompactTextString(m) }
59func (*LeaseInternalRequest) ProtoMessage()               {}
60func (*LeaseInternalRequest) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{1} }
61
62type LeaseInternalResponse struct {
63	LeaseTimeToLiveResponse *etcdserverpb.LeaseTimeToLiveResponse `protobuf:"bytes,1,opt,name=LeaseTimeToLiveResponse" json:"LeaseTimeToLiveResponse,omitempty"`
64}
65
66func (m *LeaseInternalResponse) Reset()                    { *m = LeaseInternalResponse{} }
67func (m *LeaseInternalResponse) String() string            { return proto.CompactTextString(m) }
68func (*LeaseInternalResponse) ProtoMessage()               {}
69func (*LeaseInternalResponse) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{2} }
70
71func init() {
72	proto.RegisterType((*Lease)(nil), "leasepb.Lease")
73	proto.RegisterType((*LeaseInternalRequest)(nil), "leasepb.LeaseInternalRequest")
74	proto.RegisterType((*LeaseInternalResponse)(nil), "leasepb.LeaseInternalResponse")
75}
76func (m *Lease) Marshal() (dAtA []byte, err error) {
77	size := m.Size()
78	dAtA = make([]byte, size)
79	n, err := m.MarshalTo(dAtA)
80	if err != nil {
81		return nil, err
82	}
83	return dAtA[:n], nil
84}
85
86func (m *Lease) MarshalTo(dAtA []byte) (int, error) {
87	var i int
88	_ = i
89	var l int
90	_ = l
91	if m.ID != 0 {
92		dAtA[i] = 0x8
93		i++
94		i = encodeVarintLease(dAtA, i, uint64(m.ID))
95	}
96	if m.TTL != 0 {
97		dAtA[i] = 0x10
98		i++
99		i = encodeVarintLease(dAtA, i, uint64(m.TTL))
100	}
101	if m.RemainingTTL != 0 {
102		dAtA[i] = 0x18
103		i++
104		i = encodeVarintLease(dAtA, i, uint64(m.RemainingTTL))
105	}
106	return i, nil
107}
108
109func (m *LeaseInternalRequest) Marshal() (dAtA []byte, err error) {
110	size := m.Size()
111	dAtA = make([]byte, size)
112	n, err := m.MarshalTo(dAtA)
113	if err != nil {
114		return nil, err
115	}
116	return dAtA[:n], nil
117}
118
119func (m *LeaseInternalRequest) MarshalTo(dAtA []byte) (int, error) {
120	var i int
121	_ = i
122	var l int
123	_ = l
124	if m.LeaseTimeToLiveRequest != nil {
125		dAtA[i] = 0xa
126		i++
127		i = encodeVarintLease(dAtA, i, uint64(m.LeaseTimeToLiveRequest.Size()))
128		n1, err := m.LeaseTimeToLiveRequest.MarshalTo(dAtA[i:])
129		if err != nil {
130			return 0, err
131		}
132		i += n1
133	}
134	return i, nil
135}
136
137func (m *LeaseInternalResponse) Marshal() (dAtA []byte, err error) {
138	size := m.Size()
139	dAtA = make([]byte, size)
140	n, err := m.MarshalTo(dAtA)
141	if err != nil {
142		return nil, err
143	}
144	return dAtA[:n], nil
145}
146
147func (m *LeaseInternalResponse) MarshalTo(dAtA []byte) (int, error) {
148	var i int
149	_ = i
150	var l int
151	_ = l
152	if m.LeaseTimeToLiveResponse != nil {
153		dAtA[i] = 0xa
154		i++
155		i = encodeVarintLease(dAtA, i, uint64(m.LeaseTimeToLiveResponse.Size()))
156		n2, err := m.LeaseTimeToLiveResponse.MarshalTo(dAtA[i:])
157		if err != nil {
158			return 0, err
159		}
160		i += n2
161	}
162	return i, nil
163}
164
165func encodeVarintLease(dAtA []byte, offset int, v uint64) int {
166	for v >= 1<<7 {
167		dAtA[offset] = uint8(v&0x7f | 0x80)
168		v >>= 7
169		offset++
170	}
171	dAtA[offset] = uint8(v)
172	return offset + 1
173}
174func (m *Lease) Size() (n int) {
175	var l int
176	_ = l
177	if m.ID != 0 {
178		n += 1 + sovLease(uint64(m.ID))
179	}
180	if m.TTL != 0 {
181		n += 1 + sovLease(uint64(m.TTL))
182	}
183	if m.RemainingTTL != 0 {
184		n += 1 + sovLease(uint64(m.RemainingTTL))
185	}
186	return n
187}
188
189func (m *LeaseInternalRequest) Size() (n int) {
190	var l int
191	_ = l
192	if m.LeaseTimeToLiveRequest != nil {
193		l = m.LeaseTimeToLiveRequest.Size()
194		n += 1 + l + sovLease(uint64(l))
195	}
196	return n
197}
198
199func (m *LeaseInternalResponse) Size() (n int) {
200	var l int
201	_ = l
202	if m.LeaseTimeToLiveResponse != nil {
203		l = m.LeaseTimeToLiveResponse.Size()
204		n += 1 + l + sovLease(uint64(l))
205	}
206	return n
207}
208
209func sovLease(x uint64) (n int) {
210	for {
211		n++
212		x >>= 7
213		if x == 0 {
214			break
215		}
216	}
217	return n
218}
219func sozLease(x uint64) (n int) {
220	return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63))))
221}
222func (m *Lease) Unmarshal(dAtA []byte) error {
223	l := len(dAtA)
224	iNdEx := 0
225	for iNdEx < l {
226		preIndex := iNdEx
227		var wire uint64
228		for shift := uint(0); ; shift += 7 {
229			if shift >= 64 {
230				return ErrIntOverflowLease
231			}
232			if iNdEx >= l {
233				return io.ErrUnexpectedEOF
234			}
235			b := dAtA[iNdEx]
236			iNdEx++
237			wire |= (uint64(b) & 0x7F) << shift
238			if b < 0x80 {
239				break
240			}
241		}
242		fieldNum := int32(wire >> 3)
243		wireType := int(wire & 0x7)
244		if wireType == 4 {
245			return fmt.Errorf("proto: Lease: wiretype end group for non-group")
246		}
247		if fieldNum <= 0 {
248			return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire)
249		}
250		switch fieldNum {
251		case 1:
252			if wireType != 0 {
253				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
254			}
255			m.ID = 0
256			for shift := uint(0); ; shift += 7 {
257				if shift >= 64 {
258					return ErrIntOverflowLease
259				}
260				if iNdEx >= l {
261					return io.ErrUnexpectedEOF
262				}
263				b := dAtA[iNdEx]
264				iNdEx++
265				m.ID |= (int64(b) & 0x7F) << shift
266				if b < 0x80 {
267					break
268				}
269			}
270		case 2:
271			if wireType != 0 {
272				return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
273			}
274			m.TTL = 0
275			for shift := uint(0); ; shift += 7 {
276				if shift >= 64 {
277					return ErrIntOverflowLease
278				}
279				if iNdEx >= l {
280					return io.ErrUnexpectedEOF
281				}
282				b := dAtA[iNdEx]
283				iNdEx++
284				m.TTL |= (int64(b) & 0x7F) << shift
285				if b < 0x80 {
286					break
287				}
288			}
289		case 3:
290			if wireType != 0 {
291				return fmt.Errorf("proto: wrong wireType = %d for field RemainingTTL", wireType)
292			}
293			m.RemainingTTL = 0
294			for shift := uint(0); ; shift += 7 {
295				if shift >= 64 {
296					return ErrIntOverflowLease
297				}
298				if iNdEx >= l {
299					return io.ErrUnexpectedEOF
300				}
301				b := dAtA[iNdEx]
302				iNdEx++
303				m.RemainingTTL |= (int64(b) & 0x7F) << shift
304				if b < 0x80 {
305					break
306				}
307			}
308		default:
309			iNdEx = preIndex
310			skippy, err := skipLease(dAtA[iNdEx:])
311			if err != nil {
312				return err
313			}
314			if skippy < 0 {
315				return ErrInvalidLengthLease
316			}
317			if (iNdEx + skippy) > l {
318				return io.ErrUnexpectedEOF
319			}
320			iNdEx += skippy
321		}
322	}
323
324	if iNdEx > l {
325		return io.ErrUnexpectedEOF
326	}
327	return nil
328}
329func (m *LeaseInternalRequest) Unmarshal(dAtA []byte) error {
330	l := len(dAtA)
331	iNdEx := 0
332	for iNdEx < l {
333		preIndex := iNdEx
334		var wire uint64
335		for shift := uint(0); ; shift += 7 {
336			if shift >= 64 {
337				return ErrIntOverflowLease
338			}
339			if iNdEx >= l {
340				return io.ErrUnexpectedEOF
341			}
342			b := dAtA[iNdEx]
343			iNdEx++
344			wire |= (uint64(b) & 0x7F) << shift
345			if b < 0x80 {
346				break
347			}
348		}
349		fieldNum := int32(wire >> 3)
350		wireType := int(wire & 0x7)
351		if wireType == 4 {
352			return fmt.Errorf("proto: LeaseInternalRequest: wiretype end group for non-group")
353		}
354		if fieldNum <= 0 {
355			return fmt.Errorf("proto: LeaseInternalRequest: illegal tag %d (wire type %d)", fieldNum, wire)
356		}
357		switch fieldNum {
358		case 1:
359			if wireType != 2 {
360				return fmt.Errorf("proto: wrong wireType = %d for field LeaseTimeToLiveRequest", wireType)
361			}
362			var msglen int
363			for shift := uint(0); ; shift += 7 {
364				if shift >= 64 {
365					return ErrIntOverflowLease
366				}
367				if iNdEx >= l {
368					return io.ErrUnexpectedEOF
369				}
370				b := dAtA[iNdEx]
371				iNdEx++
372				msglen |= (int(b) & 0x7F) << shift
373				if b < 0x80 {
374					break
375				}
376			}
377			if msglen < 0 {
378				return ErrInvalidLengthLease
379			}
380			postIndex := iNdEx + msglen
381			if postIndex > l {
382				return io.ErrUnexpectedEOF
383			}
384			if m.LeaseTimeToLiveRequest == nil {
385				m.LeaseTimeToLiveRequest = &etcdserverpb.LeaseTimeToLiveRequest{}
386			}
387			if err := m.LeaseTimeToLiveRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
388				return err
389			}
390			iNdEx = postIndex
391		default:
392			iNdEx = preIndex
393			skippy, err := skipLease(dAtA[iNdEx:])
394			if err != nil {
395				return err
396			}
397			if skippy < 0 {
398				return ErrInvalidLengthLease
399			}
400			if (iNdEx + skippy) > l {
401				return io.ErrUnexpectedEOF
402			}
403			iNdEx += skippy
404		}
405	}
406
407	if iNdEx > l {
408		return io.ErrUnexpectedEOF
409	}
410	return nil
411}
412func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error {
413	l := len(dAtA)
414	iNdEx := 0
415	for iNdEx < l {
416		preIndex := iNdEx
417		var wire uint64
418		for shift := uint(0); ; shift += 7 {
419			if shift >= 64 {
420				return ErrIntOverflowLease
421			}
422			if iNdEx >= l {
423				return io.ErrUnexpectedEOF
424			}
425			b := dAtA[iNdEx]
426			iNdEx++
427			wire |= (uint64(b) & 0x7F) << shift
428			if b < 0x80 {
429				break
430			}
431		}
432		fieldNum := int32(wire >> 3)
433		wireType := int(wire & 0x7)
434		if wireType == 4 {
435			return fmt.Errorf("proto: LeaseInternalResponse: wiretype end group for non-group")
436		}
437		if fieldNum <= 0 {
438			return fmt.Errorf("proto: LeaseInternalResponse: illegal tag %d (wire type %d)", fieldNum, wire)
439		}
440		switch fieldNum {
441		case 1:
442			if wireType != 2 {
443				return fmt.Errorf("proto: wrong wireType = %d for field LeaseTimeToLiveResponse", wireType)
444			}
445			var msglen int
446			for shift := uint(0); ; shift += 7 {
447				if shift >= 64 {
448					return ErrIntOverflowLease
449				}
450				if iNdEx >= l {
451					return io.ErrUnexpectedEOF
452				}
453				b := dAtA[iNdEx]
454				iNdEx++
455				msglen |= (int(b) & 0x7F) << shift
456				if b < 0x80 {
457					break
458				}
459			}
460			if msglen < 0 {
461				return ErrInvalidLengthLease
462			}
463			postIndex := iNdEx + msglen
464			if postIndex > l {
465				return io.ErrUnexpectedEOF
466			}
467			if m.LeaseTimeToLiveResponse == nil {
468				m.LeaseTimeToLiveResponse = &etcdserverpb.LeaseTimeToLiveResponse{}
469			}
470			if err := m.LeaseTimeToLiveResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
471				return err
472			}
473			iNdEx = postIndex
474		default:
475			iNdEx = preIndex
476			skippy, err := skipLease(dAtA[iNdEx:])
477			if err != nil {
478				return err
479			}
480			if skippy < 0 {
481				return ErrInvalidLengthLease
482			}
483			if (iNdEx + skippy) > l {
484				return io.ErrUnexpectedEOF
485			}
486			iNdEx += skippy
487		}
488	}
489
490	if iNdEx > l {
491		return io.ErrUnexpectedEOF
492	}
493	return nil
494}
495func skipLease(dAtA []byte) (n int, err error) {
496	l := len(dAtA)
497	iNdEx := 0
498	for iNdEx < l {
499		var wire uint64
500		for shift := uint(0); ; shift += 7 {
501			if shift >= 64 {
502				return 0, ErrIntOverflowLease
503			}
504			if iNdEx >= l {
505				return 0, io.ErrUnexpectedEOF
506			}
507			b := dAtA[iNdEx]
508			iNdEx++
509			wire |= (uint64(b) & 0x7F) << shift
510			if b < 0x80 {
511				break
512			}
513		}
514		wireType := int(wire & 0x7)
515		switch wireType {
516		case 0:
517			for shift := uint(0); ; shift += 7 {
518				if shift >= 64 {
519					return 0, ErrIntOverflowLease
520				}
521				if iNdEx >= l {
522					return 0, io.ErrUnexpectedEOF
523				}
524				iNdEx++
525				if dAtA[iNdEx-1] < 0x80 {
526					break
527				}
528			}
529			return iNdEx, nil
530		case 1:
531			iNdEx += 8
532			return iNdEx, nil
533		case 2:
534			var length int
535			for shift := uint(0); ; shift += 7 {
536				if shift >= 64 {
537					return 0, ErrIntOverflowLease
538				}
539				if iNdEx >= l {
540					return 0, io.ErrUnexpectedEOF
541				}
542				b := dAtA[iNdEx]
543				iNdEx++
544				length |= (int(b) & 0x7F) << shift
545				if b < 0x80 {
546					break
547				}
548			}
549			iNdEx += length
550			if length < 0 {
551				return 0, ErrInvalidLengthLease
552			}
553			return iNdEx, nil
554		case 3:
555			for {
556				var innerWire uint64
557				var start int = iNdEx
558				for shift := uint(0); ; shift += 7 {
559					if shift >= 64 {
560						return 0, ErrIntOverflowLease
561					}
562					if iNdEx >= l {
563						return 0, io.ErrUnexpectedEOF
564					}
565					b := dAtA[iNdEx]
566					iNdEx++
567					innerWire |= (uint64(b) & 0x7F) << shift
568					if b < 0x80 {
569						break
570					}
571				}
572				innerWireType := int(innerWire & 0x7)
573				if innerWireType == 4 {
574					break
575				}
576				next, err := skipLease(dAtA[start:])
577				if err != nil {
578					return 0, err
579				}
580				iNdEx = start + next
581			}
582			return iNdEx, nil
583		case 4:
584			return iNdEx, nil
585		case 5:
586			iNdEx += 4
587			return iNdEx, nil
588		default:
589			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
590		}
591	}
592	panic("unreachable")
593}
594
595var (
596	ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling")
597	ErrIntOverflowLease   = fmt.Errorf("proto: integer overflow")
598)
599
600func init() { proto.RegisterFile("lease.proto", fileDescriptorLease) }
601
602var fileDescriptorLease = []byte{
603	// 253 bytes of a gzipped FileDescriptorProto
604	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x49, 0x4d, 0x2c,
605	0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x73, 0x0a, 0x92, 0xa4, 0x44, 0xd2,
606	0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x4a, 0x2d, 0xb5, 0x24, 0x39, 0x45,
607	0x1f, 0x44, 0x14, 0xa7, 0x16, 0x95, 0xa5, 0x16, 0x21, 0x31, 0x0b, 0x92, 0xf4, 0x8b, 0x0a, 0x92,
608	0x21, 0xea, 0x94, 0x7c, 0xb9, 0x58, 0x7d, 0x40, 0x06, 0x09, 0xf1, 0x71, 0x31, 0x79, 0xba, 0x48,
609	0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x31, 0x79, 0xba, 0x08, 0x09, 0x70, 0x31, 0x87, 0x84, 0xf8,
610	0x48, 0x30, 0x81, 0x05, 0x40, 0x4c, 0x21, 0x25, 0x2e, 0x9e, 0xa0, 0xd4, 0xdc, 0xc4, 0xcc, 0xbc,
611	0xcc, 0xbc, 0x74, 0x90, 0x14, 0x33, 0x58, 0x0a, 0x45, 0x4c, 0xa9, 0x84, 0x4b, 0x04, 0x6c, 0x9c,
612	0x67, 0x5e, 0x49, 0x6a, 0x51, 0x5e, 0x62, 0x4e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x50,
613	0x0c, 0x97, 0x18, 0x58, 0x3c, 0x24, 0x33, 0x37, 0x35, 0x24, 0xdf, 0x27, 0xb3, 0x2c, 0x15, 0x2a,
614	0x03, 0xb6, 0x91, 0xdb, 0x48, 0x45, 0x0f, 0xd9, 0x7d, 0x7a, 0xd8, 0xd5, 0x06, 0xe1, 0x30, 0x43,
615	0xa9, 0x82, 0x4b, 0x14, 0xcd, 0xd6, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa1, 0x78, 0x2e, 0x71,
616	0x0c, 0x2d, 0x10, 0x29, 0xa8, 0xbd, 0xaa, 0x04, 0xec, 0x85, 0x28, 0x0e, 0xc2, 0x65, 0x8a, 0x93,
617	0xc4, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca, 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91,
618	0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x33, 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, 0xc3, 0xd7, 0x18,
619	0x10, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x9f, 0x8b, 0x6c, 0xb5, 0x01, 0x00, 0x00,
620}
621