1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: proto.proto
3
4package issue34
5
6import (
7	fmt "fmt"
8	_ "github.com/gogo/protobuf/gogoproto"
9	proto "github.com/gogo/protobuf/proto"
10	io "io"
11	math "math"
12)
13
14// Reference imports to suppress errors if they are not otherwise used.
15var _ = proto.Marshal
16var _ = fmt.Errorf
17var _ = math.Inf
18
19// This is a compile-time assertion to ensure that this generated file
20// is compatible with the proto package it is being compiled against.
21// A compilation error at this line likely means your copy of the
22// proto package needs to be updated.
23const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
24
25type Foo struct {
26	Bar                  []byte   `protobuf:"bytes,1,opt,name=bar" json:"bar,omitempty"`
27	XXX_NoUnkeyedLiteral struct{} `json:"-"`
28	XXX_unrecognized     []byte   `json:"-"`
29	XXX_sizecache        int32    `json:"-"`
30}
31
32func (m *Foo) Reset()         { *m = Foo{} }
33func (m *Foo) String() string { return proto.CompactTextString(m) }
34func (*Foo) ProtoMessage()    {}
35func (*Foo) Descriptor() ([]byte, []int) {
36	return fileDescriptor_2fcc84b9998d60d8, []int{0}
37}
38func (m *Foo) XXX_Unmarshal(b []byte) error {
39	return m.Unmarshal(b)
40}
41func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
42	return xxx_messageInfo_Foo.Marshal(b, m, deterministic)
43}
44func (m *Foo) XXX_Merge(src proto.Message) {
45	xxx_messageInfo_Foo.Merge(m, src)
46}
47func (m *Foo) XXX_Size() int {
48	return xxx_messageInfo_Foo.Size(m)
49}
50func (m *Foo) XXX_DiscardUnknown() {
51	xxx_messageInfo_Foo.DiscardUnknown(m)
52}
53
54var xxx_messageInfo_Foo proto.InternalMessageInfo
55
56func (m *Foo) GetBar() []byte {
57	if m != nil {
58		return m.Bar
59	}
60	return nil
61}
62
63type FooWithRepeated struct {
64	Bar                  [][]byte `protobuf:"bytes,1,rep,name=bar" json:"bar,omitempty"`
65	XXX_NoUnkeyedLiteral struct{} `json:"-"`
66	XXX_unrecognized     []byte   `json:"-"`
67	XXX_sizecache        int32    `json:"-"`
68}
69
70func (m *FooWithRepeated) Reset()         { *m = FooWithRepeated{} }
71func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) }
72func (*FooWithRepeated) ProtoMessage()    {}
73func (*FooWithRepeated) Descriptor() ([]byte, []int) {
74	return fileDescriptor_2fcc84b9998d60d8, []int{1}
75}
76func (m *FooWithRepeated) XXX_Unmarshal(b []byte) error {
77	return m.Unmarshal(b)
78}
79func (m *FooWithRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
80	return xxx_messageInfo_FooWithRepeated.Marshal(b, m, deterministic)
81}
82func (m *FooWithRepeated) XXX_Merge(src proto.Message) {
83	xxx_messageInfo_FooWithRepeated.Merge(m, src)
84}
85func (m *FooWithRepeated) XXX_Size() int {
86	return xxx_messageInfo_FooWithRepeated.Size(m)
87}
88func (m *FooWithRepeated) XXX_DiscardUnknown() {
89	xxx_messageInfo_FooWithRepeated.DiscardUnknown(m)
90}
91
92var xxx_messageInfo_FooWithRepeated proto.InternalMessageInfo
93
94func (m *FooWithRepeated) GetBar() [][]byte {
95	if m != nil {
96		return m.Bar
97	}
98	return nil
99}
100
101func init() {
102	proto.RegisterType((*Foo)(nil), "issue34.Foo")
103	proto.RegisterType((*FooWithRepeated)(nil), "issue34.FooWithRepeated")
104}
105
106func init() { proto.RegisterFile("proto.proto", fileDescriptor_2fcc84b9998d60d8) }
107
108var fileDescriptor_2fcc84b9998d60d8 = []byte{
109	// 126 bytes of a gzipped FileDescriptorProto
110	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f,
111	0xc9, 0xd7, 0x03, 0x93, 0x42, 0xec, 0x99, 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x26, 0x52, 0xba, 0xe9,
112	0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60,
113	0xf9, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xfa, 0x94, 0xc4, 0xb9, 0x98, 0xdd,
114	0xf2, 0xf3, 0x85, 0x04, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82,
115	0x40, 0x4c, 0x25, 0x65, 0x2e, 0x7e, 0xb7, 0xfc, 0xfc, 0xf0, 0xcc, 0x92, 0x8c, 0xa0, 0xd4, 0x82,
116	0xd4, 0xc4, 0x92, 0xd4, 0x14, 0x84, 0x22, 0x66, 0xa8, 0x22, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18,
117	0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb2, 0x1b, 0xef, 0x89, 0x00, 0x00, 0x00,
118}
119
120func (m *Foo) Unmarshal(dAtA []byte) error {
121	l := len(dAtA)
122	iNdEx := 0
123	for iNdEx < l {
124		preIndex := iNdEx
125		var wire uint64
126		for shift := uint(0); ; shift += 7 {
127			if shift >= 64 {
128				return ErrIntOverflowProto
129			}
130			if iNdEx >= l {
131				return io.ErrUnexpectedEOF
132			}
133			b := dAtA[iNdEx]
134			iNdEx++
135			wire |= uint64(b&0x7F) << shift
136			if b < 0x80 {
137				break
138			}
139		}
140		fieldNum := int32(wire >> 3)
141		wireType := int(wire & 0x7)
142		if wireType == 4 {
143			return fmt.Errorf("proto: Foo: wiretype end group for non-group")
144		}
145		if fieldNum <= 0 {
146			return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire)
147		}
148		switch fieldNum {
149		case 1:
150			if wireType != 2 {
151				return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType)
152			}
153			var byteLen int
154			for shift := uint(0); ; shift += 7 {
155				if shift >= 64 {
156					return ErrIntOverflowProto
157				}
158				if iNdEx >= l {
159					return io.ErrUnexpectedEOF
160				}
161				b := dAtA[iNdEx]
162				iNdEx++
163				byteLen |= int(b&0x7F) << shift
164				if b < 0x80 {
165					break
166				}
167			}
168			if byteLen < 0 {
169				return ErrInvalidLengthProto
170			}
171			postIndex := iNdEx + byteLen
172			if postIndex < 0 {
173				return ErrInvalidLengthProto
174			}
175			if postIndex > l {
176				return io.ErrUnexpectedEOF
177			}
178			m.Bar = append(m.Bar[:0], dAtA[iNdEx:postIndex]...)
179			if m.Bar == nil {
180				m.Bar = []byte{}
181			}
182			iNdEx = postIndex
183		default:
184			iNdEx = preIndex
185			skippy, err := skipProto(dAtA[iNdEx:])
186			if err != nil {
187				return err
188			}
189			if skippy < 0 {
190				return ErrInvalidLengthProto
191			}
192			if (iNdEx + skippy) < 0 {
193				return ErrInvalidLengthProto
194			}
195			if (iNdEx + skippy) > l {
196				return io.ErrUnexpectedEOF
197			}
198			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
199			iNdEx += skippy
200		}
201	}
202
203	if iNdEx > l {
204		return io.ErrUnexpectedEOF
205	}
206	return nil
207}
208func (m *FooWithRepeated) Unmarshal(dAtA []byte) error {
209	l := len(dAtA)
210	iNdEx := 0
211	for iNdEx < l {
212		preIndex := iNdEx
213		var wire uint64
214		for shift := uint(0); ; shift += 7 {
215			if shift >= 64 {
216				return ErrIntOverflowProto
217			}
218			if iNdEx >= l {
219				return io.ErrUnexpectedEOF
220			}
221			b := dAtA[iNdEx]
222			iNdEx++
223			wire |= uint64(b&0x7F) << shift
224			if b < 0x80 {
225				break
226			}
227		}
228		fieldNum := int32(wire >> 3)
229		wireType := int(wire & 0x7)
230		if wireType == 4 {
231			return fmt.Errorf("proto: FooWithRepeated: wiretype end group for non-group")
232		}
233		if fieldNum <= 0 {
234			return fmt.Errorf("proto: FooWithRepeated: illegal tag %d (wire type %d)", fieldNum, wire)
235		}
236		switch fieldNum {
237		case 1:
238			if wireType != 2 {
239				return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType)
240			}
241			var byteLen int
242			for shift := uint(0); ; shift += 7 {
243				if shift >= 64 {
244					return ErrIntOverflowProto
245				}
246				if iNdEx >= l {
247					return io.ErrUnexpectedEOF
248				}
249				b := dAtA[iNdEx]
250				iNdEx++
251				byteLen |= int(b&0x7F) << shift
252				if b < 0x80 {
253					break
254				}
255			}
256			if byteLen < 0 {
257				return ErrInvalidLengthProto
258			}
259			postIndex := iNdEx + byteLen
260			if postIndex < 0 {
261				return ErrInvalidLengthProto
262			}
263			if postIndex > l {
264				return io.ErrUnexpectedEOF
265			}
266			m.Bar = append(m.Bar, make([]byte, postIndex-iNdEx))
267			copy(m.Bar[len(m.Bar)-1], dAtA[iNdEx:postIndex])
268			iNdEx = postIndex
269		default:
270			iNdEx = preIndex
271			skippy, err := skipProto(dAtA[iNdEx:])
272			if err != nil {
273				return err
274			}
275			if skippy < 0 {
276				return ErrInvalidLengthProto
277			}
278			if (iNdEx + skippy) < 0 {
279				return ErrInvalidLengthProto
280			}
281			if (iNdEx + skippy) > l {
282				return io.ErrUnexpectedEOF
283			}
284			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
285			iNdEx += skippy
286		}
287	}
288
289	if iNdEx > l {
290		return io.ErrUnexpectedEOF
291	}
292	return nil
293}
294func skipProto(dAtA []byte) (n int, err error) {
295	l := len(dAtA)
296	iNdEx := 0
297	for iNdEx < l {
298		var wire uint64
299		for shift := uint(0); ; shift += 7 {
300			if shift >= 64 {
301				return 0, ErrIntOverflowProto
302			}
303			if iNdEx >= l {
304				return 0, io.ErrUnexpectedEOF
305			}
306			b := dAtA[iNdEx]
307			iNdEx++
308			wire |= (uint64(b) & 0x7F) << shift
309			if b < 0x80 {
310				break
311			}
312		}
313		wireType := int(wire & 0x7)
314		switch wireType {
315		case 0:
316			for shift := uint(0); ; shift += 7 {
317				if shift >= 64 {
318					return 0, ErrIntOverflowProto
319				}
320				if iNdEx >= l {
321					return 0, io.ErrUnexpectedEOF
322				}
323				iNdEx++
324				if dAtA[iNdEx-1] < 0x80 {
325					break
326				}
327			}
328			return iNdEx, nil
329		case 1:
330			iNdEx += 8
331			return iNdEx, nil
332		case 2:
333			var length int
334			for shift := uint(0); ; shift += 7 {
335				if shift >= 64 {
336					return 0, ErrIntOverflowProto
337				}
338				if iNdEx >= l {
339					return 0, io.ErrUnexpectedEOF
340				}
341				b := dAtA[iNdEx]
342				iNdEx++
343				length |= (int(b) & 0x7F) << shift
344				if b < 0x80 {
345					break
346				}
347			}
348			if length < 0 {
349				return 0, ErrInvalidLengthProto
350			}
351			iNdEx += length
352			if iNdEx < 0 {
353				return 0, ErrInvalidLengthProto
354			}
355			return iNdEx, nil
356		case 3:
357			for {
358				var innerWire uint64
359				var start int = iNdEx
360				for shift := uint(0); ; shift += 7 {
361					if shift >= 64 {
362						return 0, ErrIntOverflowProto
363					}
364					if iNdEx >= l {
365						return 0, io.ErrUnexpectedEOF
366					}
367					b := dAtA[iNdEx]
368					iNdEx++
369					innerWire |= (uint64(b) & 0x7F) << shift
370					if b < 0x80 {
371						break
372					}
373				}
374				innerWireType := int(innerWire & 0x7)
375				if innerWireType == 4 {
376					break
377				}
378				next, err := skipProto(dAtA[start:])
379				if err != nil {
380					return 0, err
381				}
382				iNdEx = start + next
383				if iNdEx < 0 {
384					return 0, ErrInvalidLengthProto
385				}
386			}
387			return iNdEx, nil
388		case 4:
389			return iNdEx, nil
390		case 5:
391			iNdEx += 4
392			return iNdEx, nil
393		default:
394			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
395		}
396	}
397	panic("unreachable")
398}
399
400var (
401	ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling")
402	ErrIntOverflowProto   = fmt.Errorf("proto: integer overflow")
403)
404