1
2
3
4 package required
5
6 import (
7 encoding_binary "encoding/binary"
8 fmt "fmt"
9 _ "github.com/gogo/protobuf/gogoproto"
10 github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
11 proto "github.com/gogo/protobuf/proto"
12 io "io"
13 math "math"
14 math_bits "math/bits"
15 )
16
17
18 var _ = proto.Marshal
19 var _ = fmt.Errorf
20 var _ = math.Inf
21
22
23
24
25
26 const _ = proto.GoGoProtoPackageIsVersion3
27
28 type RequiredExample struct {
29 TheRequiredString *string `protobuf:"bytes,1,req,name=theRequiredString" json:"theRequiredString,omitempty"`
30 TheOptionalString *string `protobuf:"bytes,2,opt,name=theOptionalString" json:"theOptionalString,omitempty"`
31 TheRepeatedStrings []string `protobuf:"bytes,3,rep,name=theRepeatedStrings" json:"theRepeatedStrings,omitempty"`
32 XXX_NoUnkeyedLiteral struct{} `json:"-"`
33 XXX_unrecognized []byte `json:"-"`
34 XXX_sizecache int32 `json:"-"`
35 }
36
37 func (m *RequiredExample) Reset() { *m = RequiredExample{} }
38 func (m *RequiredExample) String() string { return proto.CompactTextString(m) }
39 func (*RequiredExample) ProtoMessage() {}
40 func (*RequiredExample) Descriptor() ([]byte, []int) {
41 return fileDescriptor_96043524afb2ed2f, []int{0}
42 }
43 func (m *RequiredExample) XXX_Unmarshal(b []byte) error {
44 return m.Unmarshal(b)
45 }
46 func (m *RequiredExample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
47 if deterministic {
48 return xxx_messageInfo_RequiredExample.Marshal(b, m, deterministic)
49 } else {
50 b = b[:cap(b)]
51 n, err := m.MarshalToSizedBuffer(b)
52 if err != nil {
53 return nil, err
54 }
55 return b[:n], nil
56 }
57 }
58 func (m *RequiredExample) XXX_Merge(src proto.Message) {
59 xxx_messageInfo_RequiredExample.Merge(m, src)
60 }
61 func (m *RequiredExample) XXX_Size() int {
62 return m.Size()
63 }
64 func (m *RequiredExample) XXX_DiscardUnknown() {
65 xxx_messageInfo_RequiredExample.DiscardUnknown(m)
66 }
67
68 var xxx_messageInfo_RequiredExample proto.InternalMessageInfo
69
70 func (m *RequiredExample) GetTheRequiredString() string {
71 if m != nil && m.TheRequiredString != nil {
72 return *m.TheRequiredString
73 }
74 return ""
75 }
76
77 func (m *RequiredExample) GetTheOptionalString() string {
78 if m != nil && m.TheOptionalString != nil {
79 return *m.TheOptionalString
80 }
81 return ""
82 }
83
84 func (m *RequiredExample) GetTheRepeatedStrings() []string {
85 if m != nil {
86 return m.TheRepeatedStrings
87 }
88 return nil
89 }
90
91 type NidOptNative struct {
92 Field1 float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1"`
93 Field2 float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2"`
94 Field3 int32 `protobuf:"varint,3,req,name=Field3" json:"Field3"`
95 Field4 int64 `protobuf:"varint,4,req,name=Field4" json:"Field4"`
96 Field5 uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5"`
97 Field6 uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6"`
98 Field7 int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7"`
99 Field8 int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8"`
100 Field9 uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9"`
101 Field10 int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10"`
102 Field11 uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11"`
103 Field12 int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12"`
104 Field13 bool `protobuf:"varint,13,req,name=Field13" json:"Field13"`
105 Field14 string `protobuf:"bytes,14,req,name=Field14" json:"Field14"`
106 Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15"`
107 XXX_NoUnkeyedLiteral struct{} `json:"-"`
108 XXX_unrecognized []byte `json:"-"`
109 XXX_sizecache int32 `json:"-"`
110 }
111
112 func (m *NidOptNative) Reset() { *m = NidOptNative{} }
113 func (m *NidOptNative) String() string { return proto.CompactTextString(m) }
114 func (*NidOptNative) ProtoMessage() {}
115 func (*NidOptNative) Descriptor() ([]byte, []int) {
116 return fileDescriptor_96043524afb2ed2f, []int{1}
117 }
118 func (m *NidOptNative) XXX_Unmarshal(b []byte) error {
119 return m.Unmarshal(b)
120 }
121 func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
122 if deterministic {
123 return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic)
124 } else {
125 b = b[:cap(b)]
126 n, err := m.MarshalToSizedBuffer(b)
127 if err != nil {
128 return nil, err
129 }
130 return b[:n], nil
131 }
132 }
133 func (m *NidOptNative) XXX_Merge(src proto.Message) {
134 xxx_messageInfo_NidOptNative.Merge(m, src)
135 }
136 func (m *NidOptNative) XXX_Size() int {
137 return m.Size()
138 }
139 func (m *NidOptNative) XXX_DiscardUnknown() {
140 xxx_messageInfo_NidOptNative.DiscardUnknown(m)
141 }
142
143 var xxx_messageInfo_NidOptNative proto.InternalMessageInfo
144
145 func (m *NidOptNative) GetField1() float64 {
146 if m != nil {
147 return m.Field1
148 }
149 return 0
150 }
151
152 func (m *NidOptNative) GetField2() float32 {
153 if m != nil {
154 return m.Field2
155 }
156 return 0
157 }
158
159 func (m *NidOptNative) GetField3() int32 {
160 if m != nil {
161 return m.Field3
162 }
163 return 0
164 }
165
166 func (m *NidOptNative) GetField4() int64 {
167 if m != nil {
168 return m.Field4
169 }
170 return 0
171 }
172
173 func (m *NidOptNative) GetField5() uint32 {
174 if m != nil {
175 return m.Field5
176 }
177 return 0
178 }
179
180 func (m *NidOptNative) GetField6() uint64 {
181 if m != nil {
182 return m.Field6
183 }
184 return 0
185 }
186
187 func (m *NidOptNative) GetField7() int32 {
188 if m != nil {
189 return m.Field7
190 }
191 return 0
192 }
193
194 func (m *NidOptNative) GetField8() int64 {
195 if m != nil {
196 return m.Field8
197 }
198 return 0
199 }
200
201 func (m *NidOptNative) GetField9() uint32 {
202 if m != nil {
203 return m.Field9
204 }
205 return 0
206 }
207
208 func (m *NidOptNative) GetField10() int32 {
209 if m != nil {
210 return m.Field10
211 }
212 return 0
213 }
214
215 func (m *NidOptNative) GetField11() uint64 {
216 if m != nil {
217 return m.Field11
218 }
219 return 0
220 }
221
222 func (m *NidOptNative) GetField12() int64 {
223 if m != nil {
224 return m.Field12
225 }
226 return 0
227 }
228
229 func (m *NidOptNative) GetField13() bool {
230 if m != nil {
231 return m.Field13
232 }
233 return false
234 }
235
236 func (m *NidOptNative) GetField14() string {
237 if m != nil {
238 return m.Field14
239 }
240 return ""
241 }
242
243 func (m *NidOptNative) GetField15() []byte {
244 if m != nil {
245 return m.Field15
246 }
247 return nil
248 }
249
250 type NinOptNative struct {
251 Field1 *float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1,omitempty"`
252 Field2 *float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2,omitempty"`
253 Field3 *int32 `protobuf:"varint,3,req,name=Field3" json:"Field3,omitempty"`
254 Field4 *int64 `protobuf:"varint,4,req,name=Field4" json:"Field4,omitempty"`
255 Field5 *uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5,omitempty"`
256 Field6 *uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6,omitempty"`
257 Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7,omitempty"`
258 Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8,omitempty"`
259 Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9,omitempty"`
260 Field10 *int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10,omitempty"`
261 Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11,omitempty"`
262 Field12 *int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12,omitempty"`
263 Field13 *bool `protobuf:"varint,13,req,name=Field13" json:"Field13,omitempty"`
264 Field14 *string `protobuf:"bytes,14,req,name=Field14" json:"Field14,omitempty"`
265 Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15,omitempty"`
266 XXX_NoUnkeyedLiteral struct{} `json:"-"`
267 XXX_unrecognized []byte `json:"-"`
268 XXX_sizecache int32 `json:"-"`
269 }
270
271 func (m *NinOptNative) Reset() { *m = NinOptNative{} }
272 func (m *NinOptNative) String() string { return proto.CompactTextString(m) }
273 func (*NinOptNative) ProtoMessage() {}
274 func (*NinOptNative) Descriptor() ([]byte, []int) {
275 return fileDescriptor_96043524afb2ed2f, []int{2}
276 }
277 func (m *NinOptNative) XXX_Unmarshal(b []byte) error {
278 return m.Unmarshal(b)
279 }
280 func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
281 if deterministic {
282 return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic)
283 } else {
284 b = b[:cap(b)]
285 n, err := m.MarshalToSizedBuffer(b)
286 if err != nil {
287 return nil, err
288 }
289 return b[:n], nil
290 }
291 }
292 func (m *NinOptNative) XXX_Merge(src proto.Message) {
293 xxx_messageInfo_NinOptNative.Merge(m, src)
294 }
295 func (m *NinOptNative) XXX_Size() int {
296 return m.Size()
297 }
298 func (m *NinOptNative) XXX_DiscardUnknown() {
299 xxx_messageInfo_NinOptNative.DiscardUnknown(m)
300 }
301
302 var xxx_messageInfo_NinOptNative proto.InternalMessageInfo
303
304 func (m *NinOptNative) GetField1() float64 {
305 if m != nil && m.Field1 != nil {
306 return *m.Field1
307 }
308 return 0
309 }
310
311 func (m *NinOptNative) GetField2() float32 {
312 if m != nil && m.Field2 != nil {
313 return *m.Field2
314 }
315 return 0
316 }
317
318 func (m *NinOptNative) GetField3() int32 {
319 if m != nil && m.Field3 != nil {
320 return *m.Field3
321 }
322 return 0
323 }
324
325 func (m *NinOptNative) GetField4() int64 {
326 if m != nil && m.Field4 != nil {
327 return *m.Field4
328 }
329 return 0
330 }
331
332 func (m *NinOptNative) GetField5() uint32 {
333 if m != nil && m.Field5 != nil {
334 return *m.Field5
335 }
336 return 0
337 }
338
339 func (m *NinOptNative) GetField6() uint64 {
340 if m != nil && m.Field6 != nil {
341 return *m.Field6
342 }
343 return 0
344 }
345
346 func (m *NinOptNative) GetField7() int32 {
347 if m != nil && m.Field7 != nil {
348 return *m.Field7
349 }
350 return 0
351 }
352
353 func (m *NinOptNative) GetField8() int64 {
354 if m != nil && m.Field8 != nil {
355 return *m.Field8
356 }
357 return 0
358 }
359
360 func (m *NinOptNative) GetField9() uint32 {
361 if m != nil && m.Field9 != nil {
362 return *m.Field9
363 }
364 return 0
365 }
366
367 func (m *NinOptNative) GetField10() int32 {
368 if m != nil && m.Field10 != nil {
369 return *m.Field10
370 }
371 return 0
372 }
373
374 func (m *NinOptNative) GetField11() uint64 {
375 if m != nil && m.Field11 != nil {
376 return *m.Field11
377 }
378 return 0
379 }
380
381 func (m *NinOptNative) GetField12() int64 {
382 if m != nil && m.Field12 != nil {
383 return *m.Field12
384 }
385 return 0
386 }
387
388 func (m *NinOptNative) GetField13() bool {
389 if m != nil && m.Field13 != nil {
390 return *m.Field13
391 }
392 return false
393 }
394
395 func (m *NinOptNative) GetField14() string {
396 if m != nil && m.Field14 != nil {
397 return *m.Field14
398 }
399 return ""
400 }
401
402 func (m *NinOptNative) GetField15() []byte {
403 if m != nil {
404 return m.Field15
405 }
406 return nil
407 }
408
409 type NestedNinOptNative struct {
410 NestedNinOpts []*NinOptNative `protobuf:"bytes,1,rep,name=NestedNinOpts" json:"NestedNinOpts,omitempty"`
411 XXX_NoUnkeyedLiteral struct{} `json:"-"`
412 XXX_unrecognized []byte `json:"-"`
413 XXX_sizecache int32 `json:"-"`
414 }
415
416 func (m *NestedNinOptNative) Reset() { *m = NestedNinOptNative{} }
417 func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) }
418 func (*NestedNinOptNative) ProtoMessage() {}
419 func (*NestedNinOptNative) Descriptor() ([]byte, []int) {
420 return fileDescriptor_96043524afb2ed2f, []int{3}
421 }
422 func (m *NestedNinOptNative) XXX_Unmarshal(b []byte) error {
423 return m.Unmarshal(b)
424 }
425 func (m *NestedNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
426 if deterministic {
427 return xxx_messageInfo_NestedNinOptNative.Marshal(b, m, deterministic)
428 } else {
429 b = b[:cap(b)]
430 n, err := m.MarshalToSizedBuffer(b)
431 if err != nil {
432 return nil, err
433 }
434 return b[:n], nil
435 }
436 }
437 func (m *NestedNinOptNative) XXX_Merge(src proto.Message) {
438 xxx_messageInfo_NestedNinOptNative.Merge(m, src)
439 }
440 func (m *NestedNinOptNative) XXX_Size() int {
441 return m.Size()
442 }
443 func (m *NestedNinOptNative) XXX_DiscardUnknown() {
444 xxx_messageInfo_NestedNinOptNative.DiscardUnknown(m)
445 }
446
447 var xxx_messageInfo_NestedNinOptNative proto.InternalMessageInfo
448
449 func (m *NestedNinOptNative) GetNestedNinOpts() []*NinOptNative {
450 if m != nil {
451 return m.NestedNinOpts
452 }
453 return nil
454 }
455
456 func init() {
457 proto.RegisterType((*RequiredExample)(nil), "required.RequiredExample")
458 proto.RegisterType((*NidOptNative)(nil), "required.NidOptNative")
459 proto.RegisterType((*NinOptNative)(nil), "required.NinOptNative")
460 proto.RegisterType((*NestedNinOptNative)(nil), "required.NestedNinOptNative")
461 }
462
463 func init() { proto.RegisterFile("requiredexample.proto", fileDescriptor_96043524afb2ed2f) }
464
465 var fileDescriptor_96043524afb2ed2f = []byte{
466
467 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd4, 0xdd, 0x8e, 0xd2, 0x40,
468 0x14, 0xc0, 0x71, 0x3b, 0x65, 0xf9, 0x98, 0x05, 0xd9, 0x6d, 0xe2, 0xe4, 0xc4, 0x98, 0x7a, 0xc2,
469 0xd5, 0x5c, 0x68, 0x57, 0x0a, 0xec, 0x47, 0xe2, 0xd5, 0x26, 0x7a, 0xc9, 0x26, 0xf5, 0x09, 0x58,
470 0x19, 0xd9, 0x26, 0x2c, 0xad, 0x30, 0x18, 0xaf, 0x7d, 0x0f, 0xdf, 0x67, 0x2f, 0x7d, 0x00, 0x63,
471 0x94, 0xa7, 0xf0, 0xd2, 0x58, 0xda, 0x33, 0x9c, 0xea, 0x1d, 0x3d, 0xff, 0x33, 0x13, 0xc8, 0x8f,
472 0x54, 0x3e, 0x59, 0x9b, 0x8f, 0xdb, 0x74, 0x6d, 0xe6, 0xe6, 0xf3, 0xec, 0x3e, 0x5f, 0x9a, 0x28,
473 0x5f, 0x67, 0x36, 0x0b, 0xda, 0xd5, 0xf8, 0xe9, 0xcb, 0x45, 0x6a, 0xef, 0xb6, 0xb7, 0xd1, 0xfb,
474 0xec, 0xfe, 0x6c, 0x91, 0x2d, 0xb2, 0xb3, 0x62, 0xe1, 0x76, 0xfb, 0xa1, 0x78, 0x2a, 0x1e, 0x8a,
475 0x4f, 0xfb, 0x83, 0x83, 0xaf, 0x9e, 0xec, 0x27, 0xe5, 0xd9, 0x37, 0xfb, 0x2b, 0x83, 0x17, 0xf2,
476 0xd4, 0xde, 0x99, 0x6a, 0xfa, 0xce, 0xae, 0xd3, 0xd5, 0x02, 0x3c, 0x14, 0xba, 0x93, 0xfc, 0x1b,
477 0xca, 0xed, 0x9b, 0xdc, 0xa6, 0xd9, 0x6a, 0xb6, 0x2c, 0xb7, 0x05, 0x7a, 0xe5, 0x36, 0x0f, 0x41,
478 0x24, 0x83, 0xe2, 0x8a, 0xdc, 0xcc, 0x6c, 0x75, 0xc5, 0x06, 0x7c, 0xf4, 0x75, 0x27, 0xf9, 0x4f,
479 0x19, 0x7c, 0xf7, 0x65, 0x77, 0x9a, 0xce, 0x6f, 0x72, 0x3b, 0x9d, 0xd9, 0xf4, 0x93, 0x09, 0x9e,
480 0xc9, 0xe6, 0xdb, 0xd4, 0x2c, 0xe7, 0xc3, 0xe2, 0x1b, 0x79, 0xd7, 0x8d, 0x87, 0x1f, 0xcf, 0x1f,
481 0x25, 0xe5, 0x8c, 0x6a, 0x0c, 0x02, 0x85, 0x16, 0xac, 0xc6, 0x54, 0x47, 0xe0, 0xa3, 0xd0, 0x47,
482 0xac, 0x8e, 0xa8, 0x8e, 0xa1, 0x81, 0x42, 0xfb, 0xac, 0x8e, 0xa9, 0x4e, 0xe0, 0x08, 0x85, 0xee,
483 0xb1, 0x3a, 0xa1, 0x7a, 0x0e, 0x4d, 0x14, 0xba, 0xc1, 0xea, 0x39, 0xd5, 0x0b, 0x68, 0xa1, 0xd0,
484 0xa7, 0xac, 0x5e, 0x50, 0xbd, 0x84, 0x36, 0x0a, 0x1d, 0xb0, 0x7a, 0x49, 0xf5, 0x0a, 0x3a, 0x28,
485 0x74, 0x8b, 0xd5, 0xab, 0x20, 0x94, 0xad, 0xfd, 0x2f, 0x7f, 0x05, 0x12, 0x85, 0xee, 0x97, 0xb9,
486 0x1a, 0xba, 0x3e, 0x84, 0x63, 0x14, 0xba, 0xc9, 0xfb, 0xd0, 0xf5, 0x18, 0xba, 0x28, 0xf4, 0x09,
487 0xef, 0xb1, 0xeb, 0x23, 0xe8, 0xa1, 0xd0, 0x6d, 0xde, 0x47, 0xae, 0x8f, 0xe1, 0xf1, 0xdf, 0x3f,
488 0x08, 0xef, 0x63, 0xd7, 0x27, 0xd0, 0x47, 0xa1, 0xbb, 0xbc, 0x4f, 0x06, 0x5f, 0x0a, 0xde, 0x95,
489 0xe3, 0x55, 0x9c, 0x97, 0x60, 0x15, 0x87, 0x25, 0x52, 0xc5, 0x49, 0x09, 0x53, 0x71, 0x4c, 0x62,
490 0x54, 0x9c, 0x91, 0x00, 0x15, 0x07, 0x24, 0x3a, 0xc5, 0xe9, 0x08, 0x4d, 0x71, 0x34, 0xe2, 0x52,
491 0x9c, 0x8b, 0xa0, 0xa0, 0x06, 0xe5, 0x88, 0xa0, 0x46, 0xe4, 0x70, 0xa0, 0x86, 0xe3, 0x58, 0xa0,
492 0xc6, 0xe2, 0x40, 0xa0, 0x06, 0xe2, 0x28, 0xa0, 0x46, 0xe1, 0x10, 0x12, 0x19, 0x4c, 0xcd, 0xc6,
493 0x9a, 0x39, 0x93, 0x78, 0x2d, 0x7b, 0x87, 0xd3, 0x0d, 0x78, 0xe8, 0xeb, 0xe3, 0x58, 0x45, 0xd5,
494 0xab, 0x26, 0x3a, 0x5c, 0x4f, 0xf8, 0xf2, 0xf5, 0xc9, 0xef, 0x5f, 0xa1, 0xf7, 0xb0, 0x0b, 0xbd,
495 0x6f, 0xbb, 0xd0, 0xfb, 0xb9, 0x0b, 0xbd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x03, 0x9e, 0xae,
496 0x5f, 0xba, 0x04, 0x00, 0x00,
497 }
498
499 func (m *RequiredExample) Marshal() (dAtA []byte, err error) {
500 size := m.Size()
501 dAtA = make([]byte, size)
502 n, err := m.MarshalToSizedBuffer(dAtA[:size])
503 if err != nil {
504 return nil, err
505 }
506 return dAtA[:n], nil
507 }
508
509 func (m *RequiredExample) MarshalTo(dAtA []byte) (int, error) {
510 size := m.Size()
511 return m.MarshalToSizedBuffer(dAtA[:size])
512 }
513
514 func (m *RequiredExample) MarshalToSizedBuffer(dAtA []byte) (int, error) {
515 i := len(dAtA)
516 _ = i
517 var l int
518 _ = l
519 if m.XXX_unrecognized != nil {
520 i -= len(m.XXX_unrecognized)
521 copy(dAtA[i:], m.XXX_unrecognized)
522 }
523 if len(m.TheRepeatedStrings) > 0 {
524 for iNdEx := len(m.TheRepeatedStrings) - 1; iNdEx >= 0; iNdEx-- {
525 i -= len(m.TheRepeatedStrings[iNdEx])
526 copy(dAtA[i:], m.TheRepeatedStrings[iNdEx])
527 i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.TheRepeatedStrings[iNdEx])))
528 i--
529 dAtA[i] = 0x1a
530 }
531 }
532 if m.TheOptionalString != nil {
533 i -= len(*m.TheOptionalString)
534 copy(dAtA[i:], *m.TheOptionalString)
535 i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.TheOptionalString)))
536 i--
537 dAtA[i] = 0x12
538 }
539 if m.TheRequiredString == nil {
540 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString")
541 } else {
542 i -= len(*m.TheRequiredString)
543 copy(dAtA[i:], *m.TheRequiredString)
544 i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.TheRequiredString)))
545 i--
546 dAtA[i] = 0xa
547 }
548 return len(dAtA) - i, nil
549 }
550
551 func (m *NidOptNative) Marshal() (dAtA []byte, err error) {
552 size := m.Size()
553 dAtA = make([]byte, size)
554 n, err := m.MarshalToSizedBuffer(dAtA[:size])
555 if err != nil {
556 return nil, err
557 }
558 return dAtA[:n], nil
559 }
560
561 func (m *NidOptNative) MarshalTo(dAtA []byte) (int, error) {
562 size := m.Size()
563 return m.MarshalToSizedBuffer(dAtA[:size])
564 }
565
566 func (m *NidOptNative) MarshalToSizedBuffer(dAtA []byte) (int, error) {
567 i := len(dAtA)
568 _ = i
569 var l int
570 _ = l
571 if m.XXX_unrecognized != nil {
572 i -= len(m.XXX_unrecognized)
573 copy(dAtA[i:], m.XXX_unrecognized)
574 }
575 if m.Field15 != nil {
576 i -= len(m.Field15)
577 copy(dAtA[i:], m.Field15)
578 i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field15)))
579 i--
580 dAtA[i] = 0x7a
581 }
582 i -= len(m.Field14)
583 copy(dAtA[i:], m.Field14)
584 i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field14)))
585 i--
586 dAtA[i] = 0x72
587 i--
588 if m.Field13 {
589 dAtA[i] = 1
590 } else {
591 dAtA[i] = 0
592 }
593 i--
594 dAtA[i] = 0x68
595 i -= 8
596 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12))
597 i--
598 dAtA[i] = 0x61
599 i -= 8
600 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11))
601 i--
602 dAtA[i] = 0x59
603 i -= 4
604 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10))
605 i--
606 dAtA[i] = 0x55
607 i -= 4
608 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9))
609 i--
610 dAtA[i] = 0x4d
611 i = encodeVarintRequiredexample(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63))))
612 i--
613 dAtA[i] = 0x40
614 i = encodeVarintRequiredexample(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31))))
615 i--
616 dAtA[i] = 0x38
617 i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field6))
618 i--
619 dAtA[i] = 0x30
620 i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field5))
621 i--
622 dAtA[i] = 0x28
623 i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field4))
624 i--
625 dAtA[i] = 0x20
626 i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field3))
627 i--
628 dAtA[i] = 0x18
629 i -= 4
630 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2))))
631 i--
632 dAtA[i] = 0x15
633 i -= 8
634 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1))))
635 i--
636 dAtA[i] = 0x9
637 return len(dAtA) - i, nil
638 }
639
640 func (m *NinOptNative) Marshal() (dAtA []byte, err error) {
641 size := m.Size()
642 dAtA = make([]byte, size)
643 n, err := m.MarshalToSizedBuffer(dAtA[:size])
644 if err != nil {
645 return nil, err
646 }
647 return dAtA[:n], nil
648 }
649
650 func (m *NinOptNative) MarshalTo(dAtA []byte) (int, error) {
651 size := m.Size()
652 return m.MarshalToSizedBuffer(dAtA[:size])
653 }
654
655 func (m *NinOptNative) MarshalToSizedBuffer(dAtA []byte) (int, error) {
656 i := len(dAtA)
657 _ = i
658 var l int
659 _ = l
660 if m.XXX_unrecognized != nil {
661 i -= len(m.XXX_unrecognized)
662 copy(dAtA[i:], m.XXX_unrecognized)
663 }
664 if m.Field15 == nil {
665 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15")
666 } else {
667 i -= len(m.Field15)
668 copy(dAtA[i:], m.Field15)
669 i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field15)))
670 i--
671 dAtA[i] = 0x7a
672 }
673 if m.Field14 == nil {
674 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14")
675 } else {
676 i -= len(*m.Field14)
677 copy(dAtA[i:], *m.Field14)
678 i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.Field14)))
679 i--
680 dAtA[i] = 0x72
681 }
682 if m.Field13 == nil {
683 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13")
684 } else {
685 i--
686 if *m.Field13 {
687 dAtA[i] = 1
688 } else {
689 dAtA[i] = 0
690 }
691 i--
692 dAtA[i] = 0x68
693 }
694 if m.Field12 == nil {
695 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12")
696 } else {
697 i -= 8
698 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12))
699 i--
700 dAtA[i] = 0x61
701 }
702 if m.Field11 == nil {
703 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11")
704 } else {
705 i -= 8
706 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11))
707 i--
708 dAtA[i] = 0x59
709 }
710 if m.Field10 == nil {
711 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10")
712 } else {
713 i -= 4
714 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10))
715 i--
716 dAtA[i] = 0x55
717 }
718 if m.Field9 == nil {
719 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9")
720 } else {
721 i -= 4
722 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9))
723 i--
724 dAtA[i] = 0x4d
725 }
726 if m.Field8 == nil {
727 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8")
728 } else {
729 i = encodeVarintRequiredexample(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63))))
730 i--
731 dAtA[i] = 0x40
732 }
733 if m.Field7 == nil {
734 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7")
735 } else {
736 i = encodeVarintRequiredexample(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31))))
737 i--
738 dAtA[i] = 0x38
739 }
740 if m.Field6 == nil {
741 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6")
742 } else {
743 i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field6))
744 i--
745 dAtA[i] = 0x30
746 }
747 if m.Field5 == nil {
748 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5")
749 } else {
750 i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field5))
751 i--
752 dAtA[i] = 0x28
753 }
754 if m.Field4 == nil {
755 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4")
756 } else {
757 i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field4))
758 i--
759 dAtA[i] = 0x20
760 }
761 if m.Field3 == nil {
762 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3")
763 } else {
764 i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field3))
765 i--
766 dAtA[i] = 0x18
767 }
768 if m.Field2 == nil {
769 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2")
770 } else {
771 i -= 4
772 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2))))
773 i--
774 dAtA[i] = 0x15
775 }
776 if m.Field1 == nil {
777 return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1")
778 } else {
779 i -= 8
780 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1))))
781 i--
782 dAtA[i] = 0x9
783 }
784 return len(dAtA) - i, nil
785 }
786
787 func (m *NestedNinOptNative) Marshal() (dAtA []byte, err error) {
788 size := m.Size()
789 dAtA = make([]byte, size)
790 n, err := m.MarshalToSizedBuffer(dAtA[:size])
791 if err != nil {
792 return nil, err
793 }
794 return dAtA[:n], nil
795 }
796
797 func (m *NestedNinOptNative) MarshalTo(dAtA []byte) (int, error) {
798 size := m.Size()
799 return m.MarshalToSizedBuffer(dAtA[:size])
800 }
801
802 func (m *NestedNinOptNative) MarshalToSizedBuffer(dAtA []byte) (int, error) {
803 i := len(dAtA)
804 _ = i
805 var l int
806 _ = l
807 if m.XXX_unrecognized != nil {
808 i -= len(m.XXX_unrecognized)
809 copy(dAtA[i:], m.XXX_unrecognized)
810 }
811 if len(m.NestedNinOpts) > 0 {
812 for iNdEx := len(m.NestedNinOpts) - 1; iNdEx >= 0; iNdEx-- {
813 {
814 size, err := m.NestedNinOpts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
815 if err != nil {
816 return 0, err
817 }
818 i -= size
819 i = encodeVarintRequiredexample(dAtA, i, uint64(size))
820 }
821 i--
822 dAtA[i] = 0xa
823 }
824 }
825 return len(dAtA) - i, nil
826 }
827
828 func encodeVarintRequiredexample(dAtA []byte, offset int, v uint64) int {
829 offset -= sovRequiredexample(v)
830 base := offset
831 for v >= 1<<7 {
832 dAtA[offset] = uint8(v&0x7f | 0x80)
833 v >>= 7
834 offset++
835 }
836 dAtA[offset] = uint8(v)
837 return base
838 }
839 func NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample {
840 this := &RequiredExample{}
841 v1 := string(randStringRequiredexample(r))
842 this.TheRequiredString = &v1
843 if r.Intn(5) != 0 {
844 v2 := string(randStringRequiredexample(r))
845 this.TheOptionalString = &v2
846 }
847 if r.Intn(5) != 0 {
848 v3 := r.Intn(10)
849 this.TheRepeatedStrings = make([]string, v3)
850 for i := 0; i < v3; i++ {
851 this.TheRepeatedStrings[i] = string(randStringRequiredexample(r))
852 }
853 }
854 if !easy && r.Intn(10) != 0 {
855 this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4)
856 }
857 return this
858 }
859
860 func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative {
861 this := &NidOptNative{}
862 this.Field1 = float64(r.Float64())
863 if r.Intn(2) == 0 {
864 this.Field1 *= -1
865 }
866 this.Field2 = float32(r.Float32())
867 if r.Intn(2) == 0 {
868 this.Field2 *= -1
869 }
870 this.Field3 = int32(r.Int31())
871 if r.Intn(2) == 0 {
872 this.Field3 *= -1
873 }
874 this.Field4 = int64(r.Int63())
875 if r.Intn(2) == 0 {
876 this.Field4 *= -1
877 }
878 this.Field5 = uint32(r.Uint32())
879 this.Field6 = uint64(uint64(r.Uint32()))
880 this.Field7 = int32(r.Int31())
881 if r.Intn(2) == 0 {
882 this.Field7 *= -1
883 }
884 this.Field8 = int64(r.Int63())
885 if r.Intn(2) == 0 {
886 this.Field8 *= -1
887 }
888 this.Field9 = uint32(r.Uint32())
889 this.Field10 = int32(r.Int31())
890 if r.Intn(2) == 0 {
891 this.Field10 *= -1
892 }
893 this.Field11 = uint64(uint64(r.Uint32()))
894 this.Field12 = int64(r.Int63())
895 if r.Intn(2) == 0 {
896 this.Field12 *= -1
897 }
898 this.Field13 = bool(bool(r.Intn(2) == 0))
899 this.Field14 = string(randStringRequiredexample(r))
900 v4 := r.Intn(100)
901 this.Field15 = make([]byte, v4)
902 for i := 0; i < v4; i++ {
903 this.Field15[i] = byte(r.Intn(256))
904 }
905 if !easy && r.Intn(10) != 0 {
906 this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16)
907 }
908 return this
909 }
910
911 func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative {
912 this := &NinOptNative{}
913 v5 := float64(r.Float64())
914 if r.Intn(2) == 0 {
915 v5 *= -1
916 }
917 this.Field1 = &v5
918 v6 := float32(r.Float32())
919 if r.Intn(2) == 0 {
920 v6 *= -1
921 }
922 this.Field2 = &v6
923 v7 := int32(r.Int31())
924 if r.Intn(2) == 0 {
925 v7 *= -1
926 }
927 this.Field3 = &v7
928 v8 := int64(r.Int63())
929 if r.Intn(2) == 0 {
930 v8 *= -1
931 }
932 this.Field4 = &v8
933 v9 := uint32(r.Uint32())
934 this.Field5 = &v9
935 v10 := uint64(uint64(r.Uint32()))
936 this.Field6 = &v10
937 v11 := int32(r.Int31())
938 if r.Intn(2) == 0 {
939 v11 *= -1
940 }
941 this.Field7 = &v11
942 v12 := int64(r.Int63())
943 if r.Intn(2) == 0 {
944 v12 *= -1
945 }
946 this.Field8 = &v12
947 v13 := uint32(r.Uint32())
948 this.Field9 = &v13
949 v14 := int32(r.Int31())
950 if r.Intn(2) == 0 {
951 v14 *= -1
952 }
953 this.Field10 = &v14
954 v15 := uint64(uint64(r.Uint32()))
955 this.Field11 = &v15
956 v16 := int64(r.Int63())
957 if r.Intn(2) == 0 {
958 v16 *= -1
959 }
960 this.Field12 = &v16
961 v17 := bool(bool(r.Intn(2) == 0))
962 this.Field13 = &v17
963 v18 := string(randStringRequiredexample(r))
964 this.Field14 = &v18
965 v19 := r.Intn(100)
966 this.Field15 = make([]byte, v19)
967 for i := 0; i < v19; i++ {
968 this.Field15[i] = byte(r.Intn(256))
969 }
970 if !easy && r.Intn(10) != 0 {
971 this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16)
972 }
973 return this
974 }
975
976 func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative {
977 this := &NestedNinOptNative{}
978 if r.Intn(5) != 0 {
979 v20 := r.Intn(5)
980 this.NestedNinOpts = make([]*NinOptNative, v20)
981 for i := 0; i < v20; i++ {
982 this.NestedNinOpts[i] = NewPopulatedNinOptNative(r, easy)
983 }
984 }
985 if !easy && r.Intn(10) != 0 {
986 this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 2)
987 }
988 return this
989 }
990
991 type randyRequiredexample interface {
992 Float32() float32
993 Float64() float64
994 Int63() int64
995 Int31() int32
996 Uint32() uint32
997 Intn(n int) int
998 }
999
1000 func randUTF8RuneRequiredexample(r randyRequiredexample) rune {
1001 ru := r.Intn(62)
1002 if ru < 10 {
1003 return rune(ru + 48)
1004 } else if ru < 36 {
1005 return rune(ru + 55)
1006 }
1007 return rune(ru + 61)
1008 }
1009 func randStringRequiredexample(r randyRequiredexample) string {
1010 v21 := r.Intn(100)
1011 tmps := make([]rune, v21)
1012 for i := 0; i < v21; i++ {
1013 tmps[i] = randUTF8RuneRequiredexample(r)
1014 }
1015 return string(tmps)
1016 }
1017 func randUnrecognizedRequiredexample(r randyRequiredexample, maxFieldNumber int) (dAtA []byte) {
1018 l := r.Intn(5)
1019 for i := 0; i < l; i++ {
1020 wire := r.Intn(4)
1021 if wire == 3 {
1022 wire = 5
1023 }
1024 fieldNumber := maxFieldNumber + r.Intn(100)
1025 dAtA = randFieldRequiredexample(dAtA, r, fieldNumber, wire)
1026 }
1027 return dAtA
1028 }
1029 func randFieldRequiredexample(dAtA []byte, r randyRequiredexample, fieldNumber int, wire int) []byte {
1030 key := uint32(fieldNumber)<<3 | uint32(wire)
1031 switch wire {
1032 case 0:
1033 dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key))
1034 v22 := r.Int63()
1035 if r.Intn(2) == 0 {
1036 v22 *= -1
1037 }
1038 dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(v22))
1039 case 1:
1040 dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key))
1041 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)))
1042 case 2:
1043 dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key))
1044 ll := r.Intn(100)
1045 dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(ll))
1046 for j := 0; j < ll; j++ {
1047 dAtA = append(dAtA, byte(r.Intn(256)))
1048 }
1049 default:
1050 dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key))
1051 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
1052 }
1053 return dAtA
1054 }
1055 func encodeVarintPopulateRequiredexample(dAtA []byte, v uint64) []byte {
1056 for v >= 1<<7 {
1057 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
1058 v >>= 7
1059 }
1060 dAtA = append(dAtA, uint8(v))
1061 return dAtA
1062 }
1063 func (m *RequiredExample) Size() (n int) {
1064 if m == nil {
1065 return 0
1066 }
1067 var l int
1068 _ = l
1069 if m.TheRequiredString != nil {
1070 l = len(*m.TheRequiredString)
1071 n += 1 + l + sovRequiredexample(uint64(l))
1072 }
1073 if m.TheOptionalString != nil {
1074 l = len(*m.TheOptionalString)
1075 n += 1 + l + sovRequiredexample(uint64(l))
1076 }
1077 if len(m.TheRepeatedStrings) > 0 {
1078 for _, s := range m.TheRepeatedStrings {
1079 l = len(s)
1080 n += 1 + l + sovRequiredexample(uint64(l))
1081 }
1082 }
1083 if m.XXX_unrecognized != nil {
1084 n += len(m.XXX_unrecognized)
1085 }
1086 return n
1087 }
1088
1089 func (m *NidOptNative) Size() (n int) {
1090 if m == nil {
1091 return 0
1092 }
1093 var l int
1094 _ = l
1095 n += 9
1096 n += 5
1097 n += 1 + sovRequiredexample(uint64(m.Field3))
1098 n += 1 + sovRequiredexample(uint64(m.Field4))
1099 n += 1 + sovRequiredexample(uint64(m.Field5))
1100 n += 1 + sovRequiredexample(uint64(m.Field6))
1101 n += 1 + sozRequiredexample(uint64(m.Field7))
1102 n += 1 + sozRequiredexample(uint64(m.Field8))
1103 n += 5
1104 n += 5
1105 n += 9
1106 n += 9
1107 n += 2
1108 l = len(m.Field14)
1109 n += 1 + l + sovRequiredexample(uint64(l))
1110 if m.Field15 != nil {
1111 l = len(m.Field15)
1112 n += 1 + l + sovRequiredexample(uint64(l))
1113 }
1114 if m.XXX_unrecognized != nil {
1115 n += len(m.XXX_unrecognized)
1116 }
1117 return n
1118 }
1119
1120 func (m *NinOptNative) Size() (n int) {
1121 if m == nil {
1122 return 0
1123 }
1124 var l int
1125 _ = l
1126 if m.Field1 != nil {
1127 n += 9
1128 }
1129 if m.Field2 != nil {
1130 n += 5
1131 }
1132 if m.Field3 != nil {
1133 n += 1 + sovRequiredexample(uint64(*m.Field3))
1134 }
1135 if m.Field4 != nil {
1136 n += 1 + sovRequiredexample(uint64(*m.Field4))
1137 }
1138 if m.Field5 != nil {
1139 n += 1 + sovRequiredexample(uint64(*m.Field5))
1140 }
1141 if m.Field6 != nil {
1142 n += 1 + sovRequiredexample(uint64(*m.Field6))
1143 }
1144 if m.Field7 != nil {
1145 n += 1 + sozRequiredexample(uint64(*m.Field7))
1146 }
1147 if m.Field8 != nil {
1148 n += 1 + sozRequiredexample(uint64(*m.Field8))
1149 }
1150 if m.Field9 != nil {
1151 n += 5
1152 }
1153 if m.Field10 != nil {
1154 n += 5
1155 }
1156 if m.Field11 != nil {
1157 n += 9
1158 }
1159 if m.Field12 != nil {
1160 n += 9
1161 }
1162 if m.Field13 != nil {
1163 n += 2
1164 }
1165 if m.Field14 != nil {
1166 l = len(*m.Field14)
1167 n += 1 + l + sovRequiredexample(uint64(l))
1168 }
1169 if m.Field15 != nil {
1170 l = len(m.Field15)
1171 n += 1 + l + sovRequiredexample(uint64(l))
1172 }
1173 if m.XXX_unrecognized != nil {
1174 n += len(m.XXX_unrecognized)
1175 }
1176 return n
1177 }
1178
1179 func (m *NestedNinOptNative) Size() (n int) {
1180 if m == nil {
1181 return 0
1182 }
1183 var l int
1184 _ = l
1185 if len(m.NestedNinOpts) > 0 {
1186 for _, e := range m.NestedNinOpts {
1187 l = e.Size()
1188 n += 1 + l + sovRequiredexample(uint64(l))
1189 }
1190 }
1191 if m.XXX_unrecognized != nil {
1192 n += len(m.XXX_unrecognized)
1193 }
1194 return n
1195 }
1196
1197 func sovRequiredexample(x uint64) (n int) {
1198 return (math_bits.Len64(x|1) + 6) / 7
1199 }
1200 func sozRequiredexample(x uint64) (n int) {
1201 return sovRequiredexample(uint64((x << 1) ^ uint64((int64(x) >> 63))))
1202 }
1203 func (m *RequiredExample) Unmarshal(dAtA []byte) error {
1204 var hasFields [1]uint64
1205 l := len(dAtA)
1206 iNdEx := 0
1207 for iNdEx < l {
1208 preIndex := iNdEx
1209 var wire uint64
1210 for shift := uint(0); ; shift += 7 {
1211 if shift >= 64 {
1212 return ErrIntOverflowRequiredexample
1213 }
1214 if iNdEx >= l {
1215 return io.ErrUnexpectedEOF
1216 }
1217 b := dAtA[iNdEx]
1218 iNdEx++
1219 wire |= uint64(b&0x7F) << shift
1220 if b < 0x80 {
1221 break
1222 }
1223 }
1224 fieldNum := int32(wire >> 3)
1225 wireType := int(wire & 0x7)
1226 if wireType == 4 {
1227 return fmt.Errorf("proto: RequiredExample: wiretype end group for non-group")
1228 }
1229 if fieldNum <= 0 {
1230 return fmt.Errorf("proto: RequiredExample: illegal tag %d (wire type %d)", fieldNum, wire)
1231 }
1232 switch fieldNum {
1233 case 1:
1234 if wireType != 2 {
1235 return fmt.Errorf("proto: wrong wireType = %d for field TheRequiredString", wireType)
1236 }
1237 var stringLen uint64
1238 for shift := uint(0); ; shift += 7 {
1239 if shift >= 64 {
1240 return ErrIntOverflowRequiredexample
1241 }
1242 if iNdEx >= l {
1243 return io.ErrUnexpectedEOF
1244 }
1245 b := dAtA[iNdEx]
1246 iNdEx++
1247 stringLen |= uint64(b&0x7F) << shift
1248 if b < 0x80 {
1249 break
1250 }
1251 }
1252 intStringLen := int(stringLen)
1253 if intStringLen < 0 {
1254 return ErrInvalidLengthRequiredexample
1255 }
1256 postIndex := iNdEx + intStringLen
1257 if postIndex < 0 {
1258 return ErrInvalidLengthRequiredexample
1259 }
1260 if postIndex > l {
1261 return io.ErrUnexpectedEOF
1262 }
1263 s := string(dAtA[iNdEx:postIndex])
1264 m.TheRequiredString = &s
1265 iNdEx = postIndex
1266 hasFields[0] |= uint64(0x00000001)
1267 case 2:
1268 if wireType != 2 {
1269 return fmt.Errorf("proto: wrong wireType = %d for field TheOptionalString", wireType)
1270 }
1271 var stringLen uint64
1272 for shift := uint(0); ; shift += 7 {
1273 if shift >= 64 {
1274 return ErrIntOverflowRequiredexample
1275 }
1276 if iNdEx >= l {
1277 return io.ErrUnexpectedEOF
1278 }
1279 b := dAtA[iNdEx]
1280 iNdEx++
1281 stringLen |= uint64(b&0x7F) << shift
1282 if b < 0x80 {
1283 break
1284 }
1285 }
1286 intStringLen := int(stringLen)
1287 if intStringLen < 0 {
1288 return ErrInvalidLengthRequiredexample
1289 }
1290 postIndex := iNdEx + intStringLen
1291 if postIndex < 0 {
1292 return ErrInvalidLengthRequiredexample
1293 }
1294 if postIndex > l {
1295 return io.ErrUnexpectedEOF
1296 }
1297 s := string(dAtA[iNdEx:postIndex])
1298 m.TheOptionalString = &s
1299 iNdEx = postIndex
1300 case 3:
1301 if wireType != 2 {
1302 return fmt.Errorf("proto: wrong wireType = %d for field TheRepeatedStrings", wireType)
1303 }
1304 var stringLen uint64
1305 for shift := uint(0); ; shift += 7 {
1306 if shift >= 64 {
1307 return ErrIntOverflowRequiredexample
1308 }
1309 if iNdEx >= l {
1310 return io.ErrUnexpectedEOF
1311 }
1312 b := dAtA[iNdEx]
1313 iNdEx++
1314 stringLen |= uint64(b&0x7F) << shift
1315 if b < 0x80 {
1316 break
1317 }
1318 }
1319 intStringLen := int(stringLen)
1320 if intStringLen < 0 {
1321 return ErrInvalidLengthRequiredexample
1322 }
1323 postIndex := iNdEx + intStringLen
1324 if postIndex < 0 {
1325 return ErrInvalidLengthRequiredexample
1326 }
1327 if postIndex > l {
1328 return io.ErrUnexpectedEOF
1329 }
1330 m.TheRepeatedStrings = append(m.TheRepeatedStrings, string(dAtA[iNdEx:postIndex]))
1331 iNdEx = postIndex
1332 default:
1333 iNdEx = preIndex
1334 skippy, err := skipRequiredexample(dAtA[iNdEx:])
1335 if err != nil {
1336 return err
1337 }
1338 if (skippy < 0) || (iNdEx+skippy) < 0 {
1339 return ErrInvalidLengthRequiredexample
1340 }
1341 if (iNdEx + skippy) > l {
1342 return io.ErrUnexpectedEOF
1343 }
1344 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
1345 iNdEx += skippy
1346 }
1347 }
1348 if hasFields[0]&uint64(0x00000001) == 0 {
1349 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString")
1350 }
1351
1352 if iNdEx > l {
1353 return io.ErrUnexpectedEOF
1354 }
1355 return nil
1356 }
1357 func (m *NidOptNative) Unmarshal(dAtA []byte) error {
1358 var hasFields [1]uint64
1359 l := len(dAtA)
1360 iNdEx := 0
1361 for iNdEx < l {
1362 preIndex := iNdEx
1363 var wire uint64
1364 for shift := uint(0); ; shift += 7 {
1365 if shift >= 64 {
1366 return ErrIntOverflowRequiredexample
1367 }
1368 if iNdEx >= l {
1369 return io.ErrUnexpectedEOF
1370 }
1371 b := dAtA[iNdEx]
1372 iNdEx++
1373 wire |= uint64(b&0x7F) << shift
1374 if b < 0x80 {
1375 break
1376 }
1377 }
1378 fieldNum := int32(wire >> 3)
1379 wireType := int(wire & 0x7)
1380 if wireType == 4 {
1381 return fmt.Errorf("proto: NidOptNative: wiretype end group for non-group")
1382 }
1383 if fieldNum <= 0 {
1384 return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire)
1385 }
1386 switch fieldNum {
1387 case 1:
1388 if wireType != 1 {
1389 return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType)
1390 }
1391 var v uint64
1392 if (iNdEx + 8) > l {
1393 return io.ErrUnexpectedEOF
1394 }
1395 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
1396 iNdEx += 8
1397 m.Field1 = float64(math.Float64frombits(v))
1398 hasFields[0] |= uint64(0x00000001)
1399 case 2:
1400 if wireType != 5 {
1401 return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType)
1402 }
1403 var v uint32
1404 if (iNdEx + 4) > l {
1405 return io.ErrUnexpectedEOF
1406 }
1407 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
1408 iNdEx += 4
1409 m.Field2 = float32(math.Float32frombits(v))
1410 hasFields[0] |= uint64(0x00000002)
1411 case 3:
1412 if wireType != 0 {
1413 return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType)
1414 }
1415 m.Field3 = 0
1416 for shift := uint(0); ; shift += 7 {
1417 if shift >= 64 {
1418 return ErrIntOverflowRequiredexample
1419 }
1420 if iNdEx >= l {
1421 return io.ErrUnexpectedEOF
1422 }
1423 b := dAtA[iNdEx]
1424 iNdEx++
1425 m.Field3 |= int32(b&0x7F) << shift
1426 if b < 0x80 {
1427 break
1428 }
1429 }
1430 hasFields[0] |= uint64(0x00000004)
1431 case 4:
1432 if wireType != 0 {
1433 return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType)
1434 }
1435 m.Field4 = 0
1436 for shift := uint(0); ; shift += 7 {
1437 if shift >= 64 {
1438 return ErrIntOverflowRequiredexample
1439 }
1440 if iNdEx >= l {
1441 return io.ErrUnexpectedEOF
1442 }
1443 b := dAtA[iNdEx]
1444 iNdEx++
1445 m.Field4 |= int64(b&0x7F) << shift
1446 if b < 0x80 {
1447 break
1448 }
1449 }
1450 hasFields[0] |= uint64(0x00000008)
1451 case 5:
1452 if wireType != 0 {
1453 return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType)
1454 }
1455 m.Field5 = 0
1456 for shift := uint(0); ; shift += 7 {
1457 if shift >= 64 {
1458 return ErrIntOverflowRequiredexample
1459 }
1460 if iNdEx >= l {
1461 return io.ErrUnexpectedEOF
1462 }
1463 b := dAtA[iNdEx]
1464 iNdEx++
1465 m.Field5 |= uint32(b&0x7F) << shift
1466 if b < 0x80 {
1467 break
1468 }
1469 }
1470 hasFields[0] |= uint64(0x00000010)
1471 case 6:
1472 if wireType != 0 {
1473 return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType)
1474 }
1475 m.Field6 = 0
1476 for shift := uint(0); ; shift += 7 {
1477 if shift >= 64 {
1478 return ErrIntOverflowRequiredexample
1479 }
1480 if iNdEx >= l {
1481 return io.ErrUnexpectedEOF
1482 }
1483 b := dAtA[iNdEx]
1484 iNdEx++
1485 m.Field6 |= uint64(b&0x7F) << shift
1486 if b < 0x80 {
1487 break
1488 }
1489 }
1490 hasFields[0] |= uint64(0x00000020)
1491 case 7:
1492 if wireType != 0 {
1493 return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType)
1494 }
1495 var v int32
1496 for shift := uint(0); ; shift += 7 {
1497 if shift >= 64 {
1498 return ErrIntOverflowRequiredexample
1499 }
1500 if iNdEx >= l {
1501 return io.ErrUnexpectedEOF
1502 }
1503 b := dAtA[iNdEx]
1504 iNdEx++
1505 v |= int32(b&0x7F) << shift
1506 if b < 0x80 {
1507 break
1508 }
1509 }
1510 v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))
1511 m.Field7 = v
1512 hasFields[0] |= uint64(0x00000040)
1513 case 8:
1514 if wireType != 0 {
1515 return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType)
1516 }
1517 var v uint64
1518 for shift := uint(0); ; shift += 7 {
1519 if shift >= 64 {
1520 return ErrIntOverflowRequiredexample
1521 }
1522 if iNdEx >= l {
1523 return io.ErrUnexpectedEOF
1524 }
1525 b := dAtA[iNdEx]
1526 iNdEx++
1527 v |= uint64(b&0x7F) << shift
1528 if b < 0x80 {
1529 break
1530 }
1531 }
1532 v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)
1533 m.Field8 = int64(v)
1534 hasFields[0] |= uint64(0x00000080)
1535 case 9:
1536 if wireType != 5 {
1537 return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType)
1538 }
1539 m.Field9 = 0
1540 if (iNdEx + 4) > l {
1541 return io.ErrUnexpectedEOF
1542 }
1543 m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
1544 iNdEx += 4
1545 hasFields[0] |= uint64(0x00000100)
1546 case 10:
1547 if wireType != 5 {
1548 return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType)
1549 }
1550 m.Field10 = 0
1551 if (iNdEx + 4) > l {
1552 return io.ErrUnexpectedEOF
1553 }
1554 m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
1555 iNdEx += 4
1556 hasFields[0] |= uint64(0x00000200)
1557 case 11:
1558 if wireType != 1 {
1559 return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType)
1560 }
1561 m.Field11 = 0
1562 if (iNdEx + 8) > l {
1563 return io.ErrUnexpectedEOF
1564 }
1565 m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
1566 iNdEx += 8
1567 hasFields[0] |= uint64(0x00000400)
1568 case 12:
1569 if wireType != 1 {
1570 return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType)
1571 }
1572 m.Field12 = 0
1573 if (iNdEx + 8) > l {
1574 return io.ErrUnexpectedEOF
1575 }
1576 m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
1577 iNdEx += 8
1578 hasFields[0] |= uint64(0x00000800)
1579 case 13:
1580 if wireType != 0 {
1581 return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType)
1582 }
1583 var v int
1584 for shift := uint(0); ; shift += 7 {
1585 if shift >= 64 {
1586 return ErrIntOverflowRequiredexample
1587 }
1588 if iNdEx >= l {
1589 return io.ErrUnexpectedEOF
1590 }
1591 b := dAtA[iNdEx]
1592 iNdEx++
1593 v |= int(b&0x7F) << shift
1594 if b < 0x80 {
1595 break
1596 }
1597 }
1598 m.Field13 = bool(v != 0)
1599 hasFields[0] |= uint64(0x00001000)
1600 case 14:
1601 if wireType != 2 {
1602 return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType)
1603 }
1604 var stringLen uint64
1605 for shift := uint(0); ; shift += 7 {
1606 if shift >= 64 {
1607 return ErrIntOverflowRequiredexample
1608 }
1609 if iNdEx >= l {
1610 return io.ErrUnexpectedEOF
1611 }
1612 b := dAtA[iNdEx]
1613 iNdEx++
1614 stringLen |= uint64(b&0x7F) << shift
1615 if b < 0x80 {
1616 break
1617 }
1618 }
1619 intStringLen := int(stringLen)
1620 if intStringLen < 0 {
1621 return ErrInvalidLengthRequiredexample
1622 }
1623 postIndex := iNdEx + intStringLen
1624 if postIndex < 0 {
1625 return ErrInvalidLengthRequiredexample
1626 }
1627 if postIndex > l {
1628 return io.ErrUnexpectedEOF
1629 }
1630 m.Field14 = string(dAtA[iNdEx:postIndex])
1631 iNdEx = postIndex
1632 hasFields[0] |= uint64(0x00002000)
1633 case 15:
1634 if wireType != 2 {
1635 return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType)
1636 }
1637 var byteLen int
1638 for shift := uint(0); ; shift += 7 {
1639 if shift >= 64 {
1640 return ErrIntOverflowRequiredexample
1641 }
1642 if iNdEx >= l {
1643 return io.ErrUnexpectedEOF
1644 }
1645 b := dAtA[iNdEx]
1646 iNdEx++
1647 byteLen |= int(b&0x7F) << shift
1648 if b < 0x80 {
1649 break
1650 }
1651 }
1652 if byteLen < 0 {
1653 return ErrInvalidLengthRequiredexample
1654 }
1655 postIndex := iNdEx + byteLen
1656 if postIndex < 0 {
1657 return ErrInvalidLengthRequiredexample
1658 }
1659 if postIndex > l {
1660 return io.ErrUnexpectedEOF
1661 }
1662 m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...)
1663 if m.Field15 == nil {
1664 m.Field15 = []byte{}
1665 }
1666 iNdEx = postIndex
1667 hasFields[0] |= uint64(0x00004000)
1668 default:
1669 iNdEx = preIndex
1670 skippy, err := skipRequiredexample(dAtA[iNdEx:])
1671 if err != nil {
1672 return err
1673 }
1674 if (skippy < 0) || (iNdEx+skippy) < 0 {
1675 return ErrInvalidLengthRequiredexample
1676 }
1677 if (iNdEx + skippy) > l {
1678 return io.ErrUnexpectedEOF
1679 }
1680 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
1681 iNdEx += skippy
1682 }
1683 }
1684 if hasFields[0]&uint64(0x00000001) == 0 {
1685 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1")
1686 }
1687 if hasFields[0]&uint64(0x00000002) == 0 {
1688 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2")
1689 }
1690 if hasFields[0]&uint64(0x00000004) == 0 {
1691 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3")
1692 }
1693 if hasFields[0]&uint64(0x00000008) == 0 {
1694 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4")
1695 }
1696 if hasFields[0]&uint64(0x00000010) == 0 {
1697 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5")
1698 }
1699 if hasFields[0]&uint64(0x00000020) == 0 {
1700 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6")
1701 }
1702 if hasFields[0]&uint64(0x00000040) == 0 {
1703 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7")
1704 }
1705 if hasFields[0]&uint64(0x00000080) == 0 {
1706 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8")
1707 }
1708 if hasFields[0]&uint64(0x00000100) == 0 {
1709 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9")
1710 }
1711 if hasFields[0]&uint64(0x00000200) == 0 {
1712 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10")
1713 }
1714 if hasFields[0]&uint64(0x00000400) == 0 {
1715 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11")
1716 }
1717 if hasFields[0]&uint64(0x00000800) == 0 {
1718 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12")
1719 }
1720 if hasFields[0]&uint64(0x00001000) == 0 {
1721 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13")
1722 }
1723 if hasFields[0]&uint64(0x00002000) == 0 {
1724 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14")
1725 }
1726 if hasFields[0]&uint64(0x00004000) == 0 {
1727 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15")
1728 }
1729
1730 if iNdEx > l {
1731 return io.ErrUnexpectedEOF
1732 }
1733 return nil
1734 }
1735 func (m *NinOptNative) Unmarshal(dAtA []byte) error {
1736 var hasFields [1]uint64
1737 l := len(dAtA)
1738 iNdEx := 0
1739 for iNdEx < l {
1740 preIndex := iNdEx
1741 var wire uint64
1742 for shift := uint(0); ; shift += 7 {
1743 if shift >= 64 {
1744 return ErrIntOverflowRequiredexample
1745 }
1746 if iNdEx >= l {
1747 return io.ErrUnexpectedEOF
1748 }
1749 b := dAtA[iNdEx]
1750 iNdEx++
1751 wire |= uint64(b&0x7F) << shift
1752 if b < 0x80 {
1753 break
1754 }
1755 }
1756 fieldNum := int32(wire >> 3)
1757 wireType := int(wire & 0x7)
1758 if wireType == 4 {
1759 return fmt.Errorf("proto: NinOptNative: wiretype end group for non-group")
1760 }
1761 if fieldNum <= 0 {
1762 return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire)
1763 }
1764 switch fieldNum {
1765 case 1:
1766 if wireType != 1 {
1767 return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType)
1768 }
1769 var v uint64
1770 if (iNdEx + 8) > l {
1771 return io.ErrUnexpectedEOF
1772 }
1773 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
1774 iNdEx += 8
1775 v2 := float64(math.Float64frombits(v))
1776 m.Field1 = &v2
1777 hasFields[0] |= uint64(0x00000001)
1778 case 2:
1779 if wireType != 5 {
1780 return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType)
1781 }
1782 var v uint32
1783 if (iNdEx + 4) > l {
1784 return io.ErrUnexpectedEOF
1785 }
1786 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
1787 iNdEx += 4
1788 v2 := float32(math.Float32frombits(v))
1789 m.Field2 = &v2
1790 hasFields[0] |= uint64(0x00000002)
1791 case 3:
1792 if wireType != 0 {
1793 return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType)
1794 }
1795 var v int32
1796 for shift := uint(0); ; shift += 7 {
1797 if shift >= 64 {
1798 return ErrIntOverflowRequiredexample
1799 }
1800 if iNdEx >= l {
1801 return io.ErrUnexpectedEOF
1802 }
1803 b := dAtA[iNdEx]
1804 iNdEx++
1805 v |= int32(b&0x7F) << shift
1806 if b < 0x80 {
1807 break
1808 }
1809 }
1810 m.Field3 = &v
1811 hasFields[0] |= uint64(0x00000004)
1812 case 4:
1813 if wireType != 0 {
1814 return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType)
1815 }
1816 var v int64
1817 for shift := uint(0); ; shift += 7 {
1818 if shift >= 64 {
1819 return ErrIntOverflowRequiredexample
1820 }
1821 if iNdEx >= l {
1822 return io.ErrUnexpectedEOF
1823 }
1824 b := dAtA[iNdEx]
1825 iNdEx++
1826 v |= int64(b&0x7F) << shift
1827 if b < 0x80 {
1828 break
1829 }
1830 }
1831 m.Field4 = &v
1832 hasFields[0] |= uint64(0x00000008)
1833 case 5:
1834 if wireType != 0 {
1835 return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType)
1836 }
1837 var v uint32
1838 for shift := uint(0); ; shift += 7 {
1839 if shift >= 64 {
1840 return ErrIntOverflowRequiredexample
1841 }
1842 if iNdEx >= l {
1843 return io.ErrUnexpectedEOF
1844 }
1845 b := dAtA[iNdEx]
1846 iNdEx++
1847 v |= uint32(b&0x7F) << shift
1848 if b < 0x80 {
1849 break
1850 }
1851 }
1852 m.Field5 = &v
1853 hasFields[0] |= uint64(0x00000010)
1854 case 6:
1855 if wireType != 0 {
1856 return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType)
1857 }
1858 var v uint64
1859 for shift := uint(0); ; shift += 7 {
1860 if shift >= 64 {
1861 return ErrIntOverflowRequiredexample
1862 }
1863 if iNdEx >= l {
1864 return io.ErrUnexpectedEOF
1865 }
1866 b := dAtA[iNdEx]
1867 iNdEx++
1868 v |= uint64(b&0x7F) << shift
1869 if b < 0x80 {
1870 break
1871 }
1872 }
1873 m.Field6 = &v
1874 hasFields[0] |= uint64(0x00000020)
1875 case 7:
1876 if wireType != 0 {
1877 return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType)
1878 }
1879 var v int32
1880 for shift := uint(0); ; shift += 7 {
1881 if shift >= 64 {
1882 return ErrIntOverflowRequiredexample
1883 }
1884 if iNdEx >= l {
1885 return io.ErrUnexpectedEOF
1886 }
1887 b := dAtA[iNdEx]
1888 iNdEx++
1889 v |= int32(b&0x7F) << shift
1890 if b < 0x80 {
1891 break
1892 }
1893 }
1894 v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))
1895 m.Field7 = &v
1896 hasFields[0] |= uint64(0x00000040)
1897 case 8:
1898 if wireType != 0 {
1899 return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType)
1900 }
1901 var v uint64
1902 for shift := uint(0); ; shift += 7 {
1903 if shift >= 64 {
1904 return ErrIntOverflowRequiredexample
1905 }
1906 if iNdEx >= l {
1907 return io.ErrUnexpectedEOF
1908 }
1909 b := dAtA[iNdEx]
1910 iNdEx++
1911 v |= uint64(b&0x7F) << shift
1912 if b < 0x80 {
1913 break
1914 }
1915 }
1916 v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)
1917 v2 := int64(v)
1918 m.Field8 = &v2
1919 hasFields[0] |= uint64(0x00000080)
1920 case 9:
1921 if wireType != 5 {
1922 return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType)
1923 }
1924 var v uint32
1925 if (iNdEx + 4) > l {
1926 return io.ErrUnexpectedEOF
1927 }
1928 v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
1929 iNdEx += 4
1930 m.Field9 = &v
1931 hasFields[0] |= uint64(0x00000100)
1932 case 10:
1933 if wireType != 5 {
1934 return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType)
1935 }
1936 var v int32
1937 if (iNdEx + 4) > l {
1938 return io.ErrUnexpectedEOF
1939 }
1940 v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
1941 iNdEx += 4
1942 m.Field10 = &v
1943 hasFields[0] |= uint64(0x00000200)
1944 case 11:
1945 if wireType != 1 {
1946 return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType)
1947 }
1948 var v uint64
1949 if (iNdEx + 8) > l {
1950 return io.ErrUnexpectedEOF
1951 }
1952 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
1953 iNdEx += 8
1954 m.Field11 = &v
1955 hasFields[0] |= uint64(0x00000400)
1956 case 12:
1957 if wireType != 1 {
1958 return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType)
1959 }
1960 var v int64
1961 if (iNdEx + 8) > l {
1962 return io.ErrUnexpectedEOF
1963 }
1964 v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
1965 iNdEx += 8
1966 m.Field12 = &v
1967 hasFields[0] |= uint64(0x00000800)
1968 case 13:
1969 if wireType != 0 {
1970 return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType)
1971 }
1972 var v int
1973 for shift := uint(0); ; shift += 7 {
1974 if shift >= 64 {
1975 return ErrIntOverflowRequiredexample
1976 }
1977 if iNdEx >= l {
1978 return io.ErrUnexpectedEOF
1979 }
1980 b := dAtA[iNdEx]
1981 iNdEx++
1982 v |= int(b&0x7F) << shift
1983 if b < 0x80 {
1984 break
1985 }
1986 }
1987 b := bool(v != 0)
1988 m.Field13 = &b
1989 hasFields[0] |= uint64(0x00001000)
1990 case 14:
1991 if wireType != 2 {
1992 return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType)
1993 }
1994 var stringLen uint64
1995 for shift := uint(0); ; shift += 7 {
1996 if shift >= 64 {
1997 return ErrIntOverflowRequiredexample
1998 }
1999 if iNdEx >= l {
2000 return io.ErrUnexpectedEOF
2001 }
2002 b := dAtA[iNdEx]
2003 iNdEx++
2004 stringLen |= uint64(b&0x7F) << shift
2005 if b < 0x80 {
2006 break
2007 }
2008 }
2009 intStringLen := int(stringLen)
2010 if intStringLen < 0 {
2011 return ErrInvalidLengthRequiredexample
2012 }
2013 postIndex := iNdEx + intStringLen
2014 if postIndex < 0 {
2015 return ErrInvalidLengthRequiredexample
2016 }
2017 if postIndex > l {
2018 return io.ErrUnexpectedEOF
2019 }
2020 s := string(dAtA[iNdEx:postIndex])
2021 m.Field14 = &s
2022 iNdEx = postIndex
2023 hasFields[0] |= uint64(0x00002000)
2024 case 15:
2025 if wireType != 2 {
2026 return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType)
2027 }
2028 var byteLen int
2029 for shift := uint(0); ; shift += 7 {
2030 if shift >= 64 {
2031 return ErrIntOverflowRequiredexample
2032 }
2033 if iNdEx >= l {
2034 return io.ErrUnexpectedEOF
2035 }
2036 b := dAtA[iNdEx]
2037 iNdEx++
2038 byteLen |= int(b&0x7F) << shift
2039 if b < 0x80 {
2040 break
2041 }
2042 }
2043 if byteLen < 0 {
2044 return ErrInvalidLengthRequiredexample
2045 }
2046 postIndex := iNdEx + byteLen
2047 if postIndex < 0 {
2048 return ErrInvalidLengthRequiredexample
2049 }
2050 if postIndex > l {
2051 return io.ErrUnexpectedEOF
2052 }
2053 m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...)
2054 if m.Field15 == nil {
2055 m.Field15 = []byte{}
2056 }
2057 iNdEx = postIndex
2058 hasFields[0] |= uint64(0x00004000)
2059 default:
2060 iNdEx = preIndex
2061 skippy, err := skipRequiredexample(dAtA[iNdEx:])
2062 if err != nil {
2063 return err
2064 }
2065 if (skippy < 0) || (iNdEx+skippy) < 0 {
2066 return ErrInvalidLengthRequiredexample
2067 }
2068 if (iNdEx + skippy) > l {
2069 return io.ErrUnexpectedEOF
2070 }
2071 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
2072 iNdEx += skippy
2073 }
2074 }
2075 if hasFields[0]&uint64(0x00000001) == 0 {
2076 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1")
2077 }
2078 if hasFields[0]&uint64(0x00000002) == 0 {
2079 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2")
2080 }
2081 if hasFields[0]&uint64(0x00000004) == 0 {
2082 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3")
2083 }
2084 if hasFields[0]&uint64(0x00000008) == 0 {
2085 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4")
2086 }
2087 if hasFields[0]&uint64(0x00000010) == 0 {
2088 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5")
2089 }
2090 if hasFields[0]&uint64(0x00000020) == 0 {
2091 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6")
2092 }
2093 if hasFields[0]&uint64(0x00000040) == 0 {
2094 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7")
2095 }
2096 if hasFields[0]&uint64(0x00000080) == 0 {
2097 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8")
2098 }
2099 if hasFields[0]&uint64(0x00000100) == 0 {
2100 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9")
2101 }
2102 if hasFields[0]&uint64(0x00000200) == 0 {
2103 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10")
2104 }
2105 if hasFields[0]&uint64(0x00000400) == 0 {
2106 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11")
2107 }
2108 if hasFields[0]&uint64(0x00000800) == 0 {
2109 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12")
2110 }
2111 if hasFields[0]&uint64(0x00001000) == 0 {
2112 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13")
2113 }
2114 if hasFields[0]&uint64(0x00002000) == 0 {
2115 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14")
2116 }
2117 if hasFields[0]&uint64(0x00004000) == 0 {
2118 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15")
2119 }
2120
2121 if iNdEx > l {
2122 return io.ErrUnexpectedEOF
2123 }
2124 return nil
2125 }
2126 func (m *NestedNinOptNative) Unmarshal(dAtA []byte) error {
2127 l := len(dAtA)
2128 iNdEx := 0
2129 for iNdEx < l {
2130 preIndex := iNdEx
2131 var wire uint64
2132 for shift := uint(0); ; shift += 7 {
2133 if shift >= 64 {
2134 return ErrIntOverflowRequiredexample
2135 }
2136 if iNdEx >= l {
2137 return io.ErrUnexpectedEOF
2138 }
2139 b := dAtA[iNdEx]
2140 iNdEx++
2141 wire |= uint64(b&0x7F) << shift
2142 if b < 0x80 {
2143 break
2144 }
2145 }
2146 fieldNum := int32(wire >> 3)
2147 wireType := int(wire & 0x7)
2148 if wireType == 4 {
2149 return fmt.Errorf("proto: NestedNinOptNative: wiretype end group for non-group")
2150 }
2151 if fieldNum <= 0 {
2152 return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire)
2153 }
2154 switch fieldNum {
2155 case 1:
2156 if wireType != 2 {
2157 return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType)
2158 }
2159 var msglen int
2160 for shift := uint(0); ; shift += 7 {
2161 if shift >= 64 {
2162 return ErrIntOverflowRequiredexample
2163 }
2164 if iNdEx >= l {
2165 return io.ErrUnexpectedEOF
2166 }
2167 b := dAtA[iNdEx]
2168 iNdEx++
2169 msglen |= int(b&0x7F) << shift
2170 if b < 0x80 {
2171 break
2172 }
2173 }
2174 if msglen < 0 {
2175 return ErrInvalidLengthRequiredexample
2176 }
2177 postIndex := iNdEx + msglen
2178 if postIndex < 0 {
2179 return ErrInvalidLengthRequiredexample
2180 }
2181 if postIndex > l {
2182 return io.ErrUnexpectedEOF
2183 }
2184 m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{})
2185 if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2186 return err
2187 }
2188 iNdEx = postIndex
2189 default:
2190 iNdEx = preIndex
2191 skippy, err := skipRequiredexample(dAtA[iNdEx:])
2192 if err != nil {
2193 return err
2194 }
2195 if (skippy < 0) || (iNdEx+skippy) < 0 {
2196 return ErrInvalidLengthRequiredexample
2197 }
2198 if (iNdEx + skippy) > l {
2199 return io.ErrUnexpectedEOF
2200 }
2201 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
2202 iNdEx += skippy
2203 }
2204 }
2205
2206 if iNdEx > l {
2207 return io.ErrUnexpectedEOF
2208 }
2209 return nil
2210 }
2211 func skipRequiredexample(dAtA []byte) (n int, err error) {
2212 l := len(dAtA)
2213 iNdEx := 0
2214 depth := 0
2215 for iNdEx < l {
2216 var wire uint64
2217 for shift := uint(0); ; shift += 7 {
2218 if shift >= 64 {
2219 return 0, ErrIntOverflowRequiredexample
2220 }
2221 if iNdEx >= l {
2222 return 0, io.ErrUnexpectedEOF
2223 }
2224 b := dAtA[iNdEx]
2225 iNdEx++
2226 wire |= (uint64(b) & 0x7F) << shift
2227 if b < 0x80 {
2228 break
2229 }
2230 }
2231 wireType := int(wire & 0x7)
2232 switch wireType {
2233 case 0:
2234 for shift := uint(0); ; shift += 7 {
2235 if shift >= 64 {
2236 return 0, ErrIntOverflowRequiredexample
2237 }
2238 if iNdEx >= l {
2239 return 0, io.ErrUnexpectedEOF
2240 }
2241 iNdEx++
2242 if dAtA[iNdEx-1] < 0x80 {
2243 break
2244 }
2245 }
2246 case 1:
2247 iNdEx += 8
2248 case 2:
2249 var length int
2250 for shift := uint(0); ; shift += 7 {
2251 if shift >= 64 {
2252 return 0, ErrIntOverflowRequiredexample
2253 }
2254 if iNdEx >= l {
2255 return 0, io.ErrUnexpectedEOF
2256 }
2257 b := dAtA[iNdEx]
2258 iNdEx++
2259 length |= (int(b) & 0x7F) << shift
2260 if b < 0x80 {
2261 break
2262 }
2263 }
2264 if length < 0 {
2265 return 0, ErrInvalidLengthRequiredexample
2266 }
2267 iNdEx += length
2268 case 3:
2269 depth++
2270 case 4:
2271 if depth == 0 {
2272 return 0, ErrUnexpectedEndOfGroupRequiredexample
2273 }
2274 depth--
2275 case 5:
2276 iNdEx += 4
2277 default:
2278 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
2279 }
2280 if iNdEx < 0 {
2281 return 0, ErrInvalidLengthRequiredexample
2282 }
2283 if depth == 0 {
2284 return iNdEx, nil
2285 }
2286 }
2287 return 0, io.ErrUnexpectedEOF
2288 }
2289
2290 var (
2291 ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling")
2292 ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow")
2293 ErrUnexpectedEndOfGroupRequiredexample = fmt.Errorf("proto: unexpected end of group")
2294 )
2295
View as plain text