1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: issue330.proto
3
4package issue330
5
6import proto "github.com/gogo/protobuf/proto"
7import fmt "fmt"
8import math "math"
9import _ "github.com/gogo/protobuf/gogoproto"
10
11import bytes "bytes"
12
13import io "io"
14
15// Reference imports to suppress errors if they are not otherwise used.
16var _ = proto.Marshal
17var _ = fmt.Errorf
18var _ = math.Inf
19
20// This is a compile-time assertion to ensure that this generated file
21// is compatible with the proto package it is being compiled against.
22// A compilation error at this line likely means your copy of the
23// proto package needs to be updated.
24const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
25
26type Object struct {
27	Type                 TypeIdentifier `protobuf:"varint,1,opt,name=type,proto3,casttype=TypeIdentifier" json:"type,omitempty"`
28	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
29	XXX_unrecognized     []byte         `json:"-"`
30	XXX_sizecache        int32          `json:"-"`
31}
32
33func (m *Object) Reset()         { *m = Object{} }
34func (m *Object) String() string { return proto.CompactTextString(m) }
35func (*Object) ProtoMessage()    {}
36func (*Object) Descriptor() ([]byte, []int) {
37	return fileDescriptor_issue330_8ac709e024292525, []int{0}
38}
39func (m *Object) XXX_Unmarshal(b []byte) error {
40	return m.Unmarshal(b)
41}
42func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
43	if deterministic {
44		return xxx_messageInfo_Object.Marshal(b, m, deterministic)
45	} else {
46		b = b[:cap(b)]
47		n, err := m.MarshalTo(b)
48		if err != nil {
49			return nil, err
50		}
51		return b[:n], nil
52	}
53}
54func (dst *Object) XXX_Merge(src proto.Message) {
55	xxx_messageInfo_Object.Merge(dst, src)
56}
57func (m *Object) XXX_Size() int {
58	return m.Size()
59}
60func (m *Object) XXX_DiscardUnknown() {
61	xxx_messageInfo_Object.DiscardUnknown(m)
62}
63
64var xxx_messageInfo_Object proto.InternalMessageInfo
65
66func (m *Object) GetType() TypeIdentifier {
67	if m != nil {
68		return m.Type
69	}
70	return 0
71}
72
73func init() {
74	proto.RegisterType((*Object)(nil), "issue330.Object")
75}
76func (this *Object) Equal(that interface{}) bool {
77	if that == nil {
78		return this == nil
79	}
80
81	that1, ok := that.(*Object)
82	if !ok {
83		that2, ok := that.(Object)
84		if ok {
85			that1 = &that2
86		} else {
87			return false
88		}
89	}
90	if that1 == nil {
91		return this == nil
92	} else if this == nil {
93		return false
94	}
95	if this.Type != that1.Type {
96		return false
97	}
98	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
99		return false
100	}
101	return true
102}
103func (m *Object) Marshal() (dAtA []byte, err error) {
104	size := m.Size()
105	dAtA = make([]byte, size)
106	n, err := m.MarshalTo(dAtA)
107	if err != nil {
108		return nil, err
109	}
110	return dAtA[:n], nil
111}
112
113func (m *Object) MarshalTo(dAtA []byte) (int, error) {
114	var i int
115	_ = i
116	var l int
117	_ = l
118	if m.Type != 0 {
119		dAtA[i] = 0x8
120		i++
121		i = encodeVarintIssue330(dAtA, i, uint64(m.Type))
122	}
123	if m.XXX_unrecognized != nil {
124		i += copy(dAtA[i:], m.XXX_unrecognized)
125	}
126	return i, nil
127}
128
129func encodeVarintIssue330(dAtA []byte, offset int, v uint64) int {
130	for v >= 1<<7 {
131		dAtA[offset] = uint8(v&0x7f | 0x80)
132		v >>= 7
133		offset++
134	}
135	dAtA[offset] = uint8(v)
136	return offset + 1
137}
138func NewPopulatedObject(r randyIssue330, easy bool) *Object {
139	this := &Object{}
140	this.Type = TypeIdentifier(r.Uint32())
141	if !easy && r.Intn(10) != 0 {
142		this.XXX_unrecognized = randUnrecognizedIssue330(r, 2)
143	}
144	return this
145}
146
147type randyIssue330 interface {
148	Float32() float32
149	Float64() float64
150	Int63() int64
151	Int31() int32
152	Uint32() uint32
153	Intn(n int) int
154}
155
156func randUTF8RuneIssue330(r randyIssue330) rune {
157	ru := r.Intn(62)
158	if ru < 10 {
159		return rune(ru + 48)
160	} else if ru < 36 {
161		return rune(ru + 55)
162	}
163	return rune(ru + 61)
164}
165func randStringIssue330(r randyIssue330) string {
166	v1 := r.Intn(100)
167	tmps := make([]rune, v1)
168	for i := 0; i < v1; i++ {
169		tmps[i] = randUTF8RuneIssue330(r)
170	}
171	return string(tmps)
172}
173func randUnrecognizedIssue330(r randyIssue330, maxFieldNumber int) (dAtA []byte) {
174	l := r.Intn(5)
175	for i := 0; i < l; i++ {
176		wire := r.Intn(4)
177		if wire == 3 {
178			wire = 5
179		}
180		fieldNumber := maxFieldNumber + r.Intn(100)
181		dAtA = randFieldIssue330(dAtA, r, fieldNumber, wire)
182	}
183	return dAtA
184}
185func randFieldIssue330(dAtA []byte, r randyIssue330, fieldNumber int, wire int) []byte {
186	key := uint32(fieldNumber)<<3 | uint32(wire)
187	switch wire {
188	case 0:
189		dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key))
190		v2 := r.Int63()
191		if r.Intn(2) == 0 {
192			v2 *= -1
193		}
194		dAtA = encodeVarintPopulateIssue330(dAtA, uint64(v2))
195	case 1:
196		dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key))
197		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
198	case 2:
199		dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key))
200		ll := r.Intn(100)
201		dAtA = encodeVarintPopulateIssue330(dAtA, uint64(ll))
202		for j := 0; j < ll; j++ {
203			dAtA = append(dAtA, byte(r.Intn(256)))
204		}
205	default:
206		dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key))
207		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
208	}
209	return dAtA
210}
211func encodeVarintPopulateIssue330(dAtA []byte, v uint64) []byte {
212	for v >= 1<<7 {
213		dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
214		v >>= 7
215	}
216	dAtA = append(dAtA, uint8(v))
217	return dAtA
218}
219func (m *Object) Size() (n int) {
220	var l int
221	_ = l
222	if m.Type != 0 {
223		n += 1 + sovIssue330(uint64(m.Type))
224	}
225	if m.XXX_unrecognized != nil {
226		n += len(m.XXX_unrecognized)
227	}
228	return n
229}
230
231func sovIssue330(x uint64) (n int) {
232	for {
233		n++
234		x >>= 7
235		if x == 0 {
236			break
237		}
238	}
239	return n
240}
241func sozIssue330(x uint64) (n int) {
242	return sovIssue330(uint64((x << 1) ^ uint64((int64(x) >> 63))))
243}
244func (m *Object) Unmarshal(dAtA []byte) error {
245	l := len(dAtA)
246	iNdEx := 0
247	for iNdEx < l {
248		preIndex := iNdEx
249		var wire uint64
250		for shift := uint(0); ; shift += 7 {
251			if shift >= 64 {
252				return ErrIntOverflowIssue330
253			}
254			if iNdEx >= l {
255				return io.ErrUnexpectedEOF
256			}
257			b := dAtA[iNdEx]
258			iNdEx++
259			wire |= (uint64(b) & 0x7F) << shift
260			if b < 0x80 {
261				break
262			}
263		}
264		fieldNum := int32(wire >> 3)
265		wireType := int(wire & 0x7)
266		if wireType == 4 {
267			return fmt.Errorf("proto: Object: wiretype end group for non-group")
268		}
269		if fieldNum <= 0 {
270			return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire)
271		}
272		switch fieldNum {
273		case 1:
274			if wireType != 0 {
275				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
276			}
277			m.Type = 0
278			for shift := uint(0); ; shift += 7 {
279				if shift >= 64 {
280					return ErrIntOverflowIssue330
281				}
282				if iNdEx >= l {
283					return io.ErrUnexpectedEOF
284				}
285				b := dAtA[iNdEx]
286				iNdEx++
287				m.Type |= (TypeIdentifier(b) & 0x7F) << shift
288				if b < 0x80 {
289					break
290				}
291			}
292		default:
293			iNdEx = preIndex
294			skippy, err := skipIssue330(dAtA[iNdEx:])
295			if err != nil {
296				return err
297			}
298			if skippy < 0 {
299				return ErrInvalidLengthIssue330
300			}
301			if (iNdEx + skippy) > l {
302				return io.ErrUnexpectedEOF
303			}
304			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
305			iNdEx += skippy
306		}
307	}
308
309	if iNdEx > l {
310		return io.ErrUnexpectedEOF
311	}
312	return nil
313}
314func skipIssue330(dAtA []byte) (n int, err error) {
315	l := len(dAtA)
316	iNdEx := 0
317	for iNdEx < l {
318		var wire uint64
319		for shift := uint(0); ; shift += 7 {
320			if shift >= 64 {
321				return 0, ErrIntOverflowIssue330
322			}
323			if iNdEx >= l {
324				return 0, io.ErrUnexpectedEOF
325			}
326			b := dAtA[iNdEx]
327			iNdEx++
328			wire |= (uint64(b) & 0x7F) << shift
329			if b < 0x80 {
330				break
331			}
332		}
333		wireType := int(wire & 0x7)
334		switch wireType {
335		case 0:
336			for shift := uint(0); ; shift += 7 {
337				if shift >= 64 {
338					return 0, ErrIntOverflowIssue330
339				}
340				if iNdEx >= l {
341					return 0, io.ErrUnexpectedEOF
342				}
343				iNdEx++
344				if dAtA[iNdEx-1] < 0x80 {
345					break
346				}
347			}
348			return iNdEx, nil
349		case 1:
350			iNdEx += 8
351			return iNdEx, nil
352		case 2:
353			var length int
354			for shift := uint(0); ; shift += 7 {
355				if shift >= 64 {
356					return 0, ErrIntOverflowIssue330
357				}
358				if iNdEx >= l {
359					return 0, io.ErrUnexpectedEOF
360				}
361				b := dAtA[iNdEx]
362				iNdEx++
363				length |= (int(b) & 0x7F) << shift
364				if b < 0x80 {
365					break
366				}
367			}
368			iNdEx += length
369			if length < 0 {
370				return 0, ErrInvalidLengthIssue330
371			}
372			return iNdEx, nil
373		case 3:
374			for {
375				var innerWire uint64
376				var start int = iNdEx
377				for shift := uint(0); ; shift += 7 {
378					if shift >= 64 {
379						return 0, ErrIntOverflowIssue330
380					}
381					if iNdEx >= l {
382						return 0, io.ErrUnexpectedEOF
383					}
384					b := dAtA[iNdEx]
385					iNdEx++
386					innerWire |= (uint64(b) & 0x7F) << shift
387					if b < 0x80 {
388						break
389					}
390				}
391				innerWireType := int(innerWire & 0x7)
392				if innerWireType == 4 {
393					break
394				}
395				next, err := skipIssue330(dAtA[start:])
396				if err != nil {
397					return 0, err
398				}
399				iNdEx = start + next
400			}
401			return iNdEx, nil
402		case 4:
403			return iNdEx, nil
404		case 5:
405			iNdEx += 4
406			return iNdEx, nil
407		default:
408			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
409		}
410	}
411	panic("unreachable")
412}
413
414var (
415	ErrInvalidLengthIssue330 = fmt.Errorf("proto: negative length found during unmarshaling")
416	ErrIntOverflowIssue330   = fmt.Errorf("proto: integer overflow")
417)
418
419func init() { proto.RegisterFile("issue330.proto", fileDescriptor_issue330_8ac709e024292525) }
420
421var fileDescriptor_issue330_8ac709e024292525 = []byte{
422	// 158 bytes of a gzipped FileDescriptorProto
423	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e,
424	0x4d, 0x35, 0x36, 0x36, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74,
425	0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5,
426	0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe0, 0x62,
427	0xf3, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x11, 0x52, 0xe3, 0x62, 0x29, 0xa9, 0x2c, 0x48, 0x95, 0x60,
428	0x54, 0x60, 0xd4, 0xe0, 0x75, 0x12, 0xfa, 0x75, 0x4f, 0x9e, 0x2f, 0xa4, 0xb2, 0x20, 0xd5, 0x33,
429	0x25, 0x35, 0xaf, 0x24, 0x33, 0x2d, 0x33, 0xb5, 0x28, 0x08, 0x2c, 0xef, 0x24, 0xf3, 0xe3, 0xa1,
430	0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2,
431	0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x8d, 0x35,
432	0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x41, 0xc2, 0x37, 0xa1, 0x00, 0x00, 0x00,
433}
434