blob: 5f5071d13b35b5c08a9390cd50c5afdf6002007c [file] [log] [blame]
Rob Pikeb7907bf2012-02-13 14:25:20 +11001// Code generated by protoc-gen-go from "test.proto"
2// DO NOT EDIT!
3
4package testdata
5
6import proto "code.google.com/p/goprotobuf/proto"
7import "math"
8
9// Reference proto and math imports to suppress error if they are not otherwise used.
David Symonds0e084922012-07-02 16:04:40 -070010var _ = proto.Marshal
Rob Pikeb7907bf2012-02-13 14:25:20 +110011var _ = math.Inf
12
13type FOO int32
14
15const (
16 FOO_FOO1 FOO = 1
17)
18
19var FOO_name = map[int32]string{
20 1: "FOO1",
21}
22var FOO_value = map[string]int32{
23 "FOO1": 1,
24}
25
David Symondsefeca9a2012-05-08 10:36:04 +100026func (x FOO) Enum() *FOO {
27 p := new(FOO)
28 *p = x
29 return p
30}
Rob Pikeb7907bf2012-02-13 14:25:20 +110031func (x FOO) String() string {
32 return proto.EnumName(FOO_name, int32(x))
33}
34
35type GoTest_KIND int32
36
37const (
38 GoTest_VOID GoTest_KIND = 0
39 GoTest_BOOL GoTest_KIND = 1
40 GoTest_BYTES GoTest_KIND = 2
41 GoTest_FINGERPRINT GoTest_KIND = 3
42 GoTest_FLOAT GoTest_KIND = 4
43 GoTest_INT GoTest_KIND = 5
44 GoTest_STRING GoTest_KIND = 6
45 GoTest_TIME GoTest_KIND = 7
46 GoTest_TUPLE GoTest_KIND = 8
47 GoTest_ARRAY GoTest_KIND = 9
48 GoTest_MAP GoTest_KIND = 10
49 GoTest_TABLE GoTest_KIND = 11
50 GoTest_FUNCTION GoTest_KIND = 12
51)
52
53var GoTest_KIND_name = map[int32]string{
54 0: "VOID",
55 1: "BOOL",
56 2: "BYTES",
57 3: "FINGERPRINT",
58 4: "FLOAT",
59 5: "INT",
60 6: "STRING",
61 7: "TIME",
62 8: "TUPLE",
63 9: "ARRAY",
64 10: "MAP",
65 11: "TABLE",
66 12: "FUNCTION",
67}
68var GoTest_KIND_value = map[string]int32{
69 "VOID": 0,
70 "BOOL": 1,
71 "BYTES": 2,
72 "FINGERPRINT": 3,
73 "FLOAT": 4,
74 "INT": 5,
75 "STRING": 6,
76 "TIME": 7,
77 "TUPLE": 8,
78 "ARRAY": 9,
79 "MAP": 10,
80 "TABLE": 11,
81 "FUNCTION": 12,
82}
83
David Symondsefeca9a2012-05-08 10:36:04 +100084func (x GoTest_KIND) Enum() *GoTest_KIND {
85 p := new(GoTest_KIND)
86 *p = x
87 return p
88}
Rob Pikeb7907bf2012-02-13 14:25:20 +110089func (x GoTest_KIND) String() string {
90 return proto.EnumName(GoTest_KIND_name, int32(x))
91}
92
93type MyMessage_Color int32
94
95const (
96 MyMessage_RED MyMessage_Color = 0
97 MyMessage_GREEN MyMessage_Color = 1
98 MyMessage_BLUE MyMessage_Color = 2
99)
100
101var MyMessage_Color_name = map[int32]string{
102 0: "RED",
103 1: "GREEN",
104 2: "BLUE",
105}
106var MyMessage_Color_value = map[string]int32{
107 "RED": 0,
108 "GREEN": 1,
109 "BLUE": 2,
110}
111
David Symondsefeca9a2012-05-08 10:36:04 +1000112func (x MyMessage_Color) Enum() *MyMessage_Color {
113 p := new(MyMessage_Color)
114 *p = x
115 return p
116}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100117func (x MyMessage_Color) String() string {
118 return proto.EnumName(MyMessage_Color_name, int32(x))
119}
120
121type Defaults_Color int32
122
123const (
124 Defaults_RED Defaults_Color = 0
125 Defaults_GREEN Defaults_Color = 1
126 Defaults_BLUE Defaults_Color = 2
127)
128
129var Defaults_Color_name = map[int32]string{
130 0: "RED",
131 1: "GREEN",
132 2: "BLUE",
133}
134var Defaults_Color_value = map[string]int32{
135 "RED": 0,
136 "GREEN": 1,
137 "BLUE": 2,
138}
139
David Symondsefeca9a2012-05-08 10:36:04 +1000140func (x Defaults_Color) Enum() *Defaults_Color {
141 p := new(Defaults_Color)
142 *p = x
143 return p
144}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100145func (x Defaults_Color) String() string {
146 return proto.EnumName(Defaults_Color_name, int32(x))
147}
148
149type RepeatedEnum_Color int32
150
151const (
152 RepeatedEnum_RED RepeatedEnum_Color = 1
153)
154
155var RepeatedEnum_Color_name = map[int32]string{
156 1: "RED",
157}
158var RepeatedEnum_Color_value = map[string]int32{
159 "RED": 1,
160}
161
David Symondsefeca9a2012-05-08 10:36:04 +1000162func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
163 p := new(RepeatedEnum_Color)
164 *p = x
165 return p
166}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100167func (x RepeatedEnum_Color) String() string {
168 return proto.EnumName(RepeatedEnum_Color_name, int32(x))
169}
170
171type GoEnum struct {
172 Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000173 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100174}
175
176func (this *GoEnum) Reset() { *this = GoEnum{} }
177func (this *GoEnum) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000178func (*GoEnum) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100179
David Symonds0e084922012-07-02 16:04:40 -0700180func (this *GoEnum) GetFoo() FOO {
181 if this != nil && this.Foo != nil {
182 return *this.Foo
183 }
184 return 0
185}
186
Rob Pikeb7907bf2012-02-13 14:25:20 +1100187type GoTestField struct {
188 Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"`
189 Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000190 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100191}
192
193func (this *GoTestField) Reset() { *this = GoTestField{} }
194func (this *GoTestField) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000195func (*GoTestField) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100196
David Symonds0e084922012-07-02 16:04:40 -0700197func (this *GoTestField) GetLabel() string {
198 if this != nil && this.Label != nil {
199 return *this.Label
200 }
201 return ""
202}
203
204func (this *GoTestField) GetType() string {
205 if this != nil && this.Type != nil {
206 return *this.Type
207 }
208 return ""
209}
210
Rob Pikeb7907bf2012-02-13 14:25:20 +1100211type GoTest struct {
212 Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
213 Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"`
214 Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"`
215 RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"`
216 RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"`
217 OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"`
218 F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"`
219 F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"`
220 F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"`
221 F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"`
222 F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"`
223 F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"`
224 F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"`
225 F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"`
226 F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"`
227 F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"`
228 F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"`
229 F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"`
230 F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"`
231 F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"`
232 F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"`
233 F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"`
234 F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"`
235 F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"`
236 F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"`
237 F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"`
238 F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"`
239 F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"`
240 F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"`
241 F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"`
242 F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"`
243 F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"`
244 F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"`
245 F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"`
246 F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"`
247 F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"`
248 F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"`
249 F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"`
250 F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"`
251 F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"`
252 F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"`
253 F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"`
254 F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"`
255 F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"`
256 F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"`
257 F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"`
258 F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
259 F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
260 F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
261 F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
262 F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
263 F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
264 F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"`
265 F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"`
266 F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
267 F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
268 F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
269 F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
270 F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"`
271 F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"`
272 F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"`
273 F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"`
274 F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"`
275 F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"`
276 F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"`
277 F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"`
278 F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"`
279 F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"`
280 F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"`
281 Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"`
282 Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"`
283 Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000284 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100285}
286
287func (this *GoTest) Reset() { *this = GoTest{} }
288func (this *GoTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000289func (*GoTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100290
291const Default_GoTest_F_BoolDefaulted bool = true
292const Default_GoTest_F_Int32Defaulted int32 = 32
293const Default_GoTest_F_Int64Defaulted int64 = 64
294const Default_GoTest_F_Fixed32Defaulted uint32 = 320
295const Default_GoTest_F_Fixed64Defaulted uint64 = 640
296const Default_GoTest_F_Uint32Defaulted uint32 = 3200
297const Default_GoTest_F_Uint64Defaulted uint64 = 6400
298const Default_GoTest_F_FloatDefaulted float32 = 314159
299const Default_GoTest_F_DoubleDefaulted float64 = 271828
300const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
301
302var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
303
304const Default_GoTest_F_Sint32Defaulted int32 = -32
305const Default_GoTest_F_Sint64Defaulted int64 = -64
306
David Symonds0e084922012-07-02 16:04:40 -0700307func (this *GoTest) GetKind() GoTest_KIND {
308 if this != nil && this.Kind != nil {
309 return *this.Kind
310 }
311 return 0
312}
313
314func (this *GoTest) GetTable() string {
315 if this != nil && this.Table != nil {
316 return *this.Table
317 }
318 return ""
319}
320
321func (this *GoTest) GetParam() int32 {
322 if this != nil && this.Param != nil {
323 return *this.Param
324 }
325 return 0
326}
327
328func (this *GoTest) GetRequiredField() *GoTestField {
329 if this != nil {
330 return this.RequiredField
331 }
332 return nil
333}
334
335func (this *GoTest) GetOptionalField() *GoTestField {
336 if this != nil {
337 return this.OptionalField
338 }
339 return nil
340}
341
342func (this *GoTest) GetF_BoolRequired() bool {
343 if this != nil && this.F_BoolRequired != nil {
344 return *this.F_BoolRequired
345 }
346 return false
347}
348
349func (this *GoTest) GetF_Int32Required() int32 {
350 if this != nil && this.F_Int32Required != nil {
351 return *this.F_Int32Required
352 }
353 return 0
354}
355
356func (this *GoTest) GetF_Int64Required() int64 {
357 if this != nil && this.F_Int64Required != nil {
358 return *this.F_Int64Required
359 }
360 return 0
361}
362
363func (this *GoTest) GetF_Fixed32Required() uint32 {
364 if this != nil && this.F_Fixed32Required != nil {
365 return *this.F_Fixed32Required
366 }
367 return 0
368}
369
370func (this *GoTest) GetF_Fixed64Required() uint64 {
371 if this != nil && this.F_Fixed64Required != nil {
372 return *this.F_Fixed64Required
373 }
374 return 0
375}
376
377func (this *GoTest) GetF_Uint32Required() uint32 {
378 if this != nil && this.F_Uint32Required != nil {
379 return *this.F_Uint32Required
380 }
381 return 0
382}
383
384func (this *GoTest) GetF_Uint64Required() uint64 {
385 if this != nil && this.F_Uint64Required != nil {
386 return *this.F_Uint64Required
387 }
388 return 0
389}
390
391func (this *GoTest) GetF_FloatRequired() float32 {
392 if this != nil && this.F_FloatRequired != nil {
393 return *this.F_FloatRequired
394 }
395 return 0
396}
397
398func (this *GoTest) GetF_DoubleRequired() float64 {
399 if this != nil && this.F_DoubleRequired != nil {
400 return *this.F_DoubleRequired
401 }
402 return 0
403}
404
405func (this *GoTest) GetF_StringRequired() string {
406 if this != nil && this.F_StringRequired != nil {
407 return *this.F_StringRequired
408 }
409 return ""
410}
411
412func (this *GoTest) GetF_BytesRequired() []byte {
413 if this != nil {
414 return this.F_BytesRequired
415 }
416 return nil
417}
418
419func (this *GoTest) GetF_Sint32Required() int32 {
420 if this != nil && this.F_Sint32Required != nil {
421 return *this.F_Sint32Required
422 }
423 return 0
424}
425
426func (this *GoTest) GetF_Sint64Required() int64 {
427 if this != nil && this.F_Sint64Required != nil {
428 return *this.F_Sint64Required
429 }
430 return 0
431}
432
433func (this *GoTest) GetF_BoolOptional() bool {
434 if this != nil && this.F_BoolOptional != nil {
435 return *this.F_BoolOptional
436 }
437 return false
438}
439
440func (this *GoTest) GetF_Int32Optional() int32 {
441 if this != nil && this.F_Int32Optional != nil {
442 return *this.F_Int32Optional
443 }
444 return 0
445}
446
447func (this *GoTest) GetF_Int64Optional() int64 {
448 if this != nil && this.F_Int64Optional != nil {
449 return *this.F_Int64Optional
450 }
451 return 0
452}
453
454func (this *GoTest) GetF_Fixed32Optional() uint32 {
455 if this != nil && this.F_Fixed32Optional != nil {
456 return *this.F_Fixed32Optional
457 }
458 return 0
459}
460
461func (this *GoTest) GetF_Fixed64Optional() uint64 {
462 if this != nil && this.F_Fixed64Optional != nil {
463 return *this.F_Fixed64Optional
464 }
465 return 0
466}
467
468func (this *GoTest) GetF_Uint32Optional() uint32 {
469 if this != nil && this.F_Uint32Optional != nil {
470 return *this.F_Uint32Optional
471 }
472 return 0
473}
474
475func (this *GoTest) GetF_Uint64Optional() uint64 {
476 if this != nil && this.F_Uint64Optional != nil {
477 return *this.F_Uint64Optional
478 }
479 return 0
480}
481
482func (this *GoTest) GetF_FloatOptional() float32 {
483 if this != nil && this.F_FloatOptional != nil {
484 return *this.F_FloatOptional
485 }
486 return 0
487}
488
489func (this *GoTest) GetF_DoubleOptional() float64 {
490 if this != nil && this.F_DoubleOptional != nil {
491 return *this.F_DoubleOptional
492 }
493 return 0
494}
495
496func (this *GoTest) GetF_StringOptional() string {
497 if this != nil && this.F_StringOptional != nil {
498 return *this.F_StringOptional
499 }
500 return ""
501}
502
503func (this *GoTest) GetF_BytesOptional() []byte {
504 if this != nil {
505 return this.F_BytesOptional
506 }
507 return nil
508}
509
510func (this *GoTest) GetF_Sint32Optional() int32 {
511 if this != nil && this.F_Sint32Optional != nil {
512 return *this.F_Sint32Optional
513 }
514 return 0
515}
516
517func (this *GoTest) GetF_Sint64Optional() int64 {
518 if this != nil && this.F_Sint64Optional != nil {
519 return *this.F_Sint64Optional
520 }
521 return 0
522}
523
524func (this *GoTest) GetF_BoolDefaulted() bool {
525 if this != nil && this.F_BoolDefaulted != nil {
526 return *this.F_BoolDefaulted
527 }
528 return Default_GoTest_F_BoolDefaulted
529}
530
531func (this *GoTest) GetF_Int32Defaulted() int32 {
532 if this != nil && this.F_Int32Defaulted != nil {
533 return *this.F_Int32Defaulted
534 }
535 return Default_GoTest_F_Int32Defaulted
536}
537
538func (this *GoTest) GetF_Int64Defaulted() int64 {
539 if this != nil && this.F_Int64Defaulted != nil {
540 return *this.F_Int64Defaulted
541 }
542 return Default_GoTest_F_Int64Defaulted
543}
544
545func (this *GoTest) GetF_Fixed32Defaulted() uint32 {
546 if this != nil && this.F_Fixed32Defaulted != nil {
547 return *this.F_Fixed32Defaulted
548 }
549 return Default_GoTest_F_Fixed32Defaulted
550}
551
552func (this *GoTest) GetF_Fixed64Defaulted() uint64 {
553 if this != nil && this.F_Fixed64Defaulted != nil {
554 return *this.F_Fixed64Defaulted
555 }
556 return Default_GoTest_F_Fixed64Defaulted
557}
558
559func (this *GoTest) GetF_Uint32Defaulted() uint32 {
560 if this != nil && this.F_Uint32Defaulted != nil {
561 return *this.F_Uint32Defaulted
562 }
563 return Default_GoTest_F_Uint32Defaulted
564}
565
566func (this *GoTest) GetF_Uint64Defaulted() uint64 {
567 if this != nil && this.F_Uint64Defaulted != nil {
568 return *this.F_Uint64Defaulted
569 }
570 return Default_GoTest_F_Uint64Defaulted
571}
572
573func (this *GoTest) GetF_FloatDefaulted() float32 {
574 if this != nil && this.F_FloatDefaulted != nil {
575 return *this.F_FloatDefaulted
576 }
577 return Default_GoTest_F_FloatDefaulted
578}
579
580func (this *GoTest) GetF_DoubleDefaulted() float64 {
581 if this != nil && this.F_DoubleDefaulted != nil {
582 return *this.F_DoubleDefaulted
583 }
584 return Default_GoTest_F_DoubleDefaulted
585}
586
587func (this *GoTest) GetF_StringDefaulted() string {
588 if this != nil && this.F_StringDefaulted != nil {
589 return *this.F_StringDefaulted
590 }
591 return Default_GoTest_F_StringDefaulted
592}
593
594func (this *GoTest) GetF_BytesDefaulted() []byte {
595 if this != nil && this.F_BytesDefaulted != nil {
596 return this.F_BytesDefaulted
597 }
598 return append([]byte(nil), Default_GoTest_F_BytesDefaulted...)
599}
600
601func (this *GoTest) GetF_Sint32Defaulted() int32 {
602 if this != nil && this.F_Sint32Defaulted != nil {
603 return *this.F_Sint32Defaulted
604 }
605 return Default_GoTest_F_Sint32Defaulted
606}
607
608func (this *GoTest) GetF_Sint64Defaulted() int64 {
609 if this != nil && this.F_Sint64Defaulted != nil {
610 return *this.F_Sint64Defaulted
611 }
612 return Default_GoTest_F_Sint64Defaulted
613}
614
615func (this *GoTest) GetRequiredgroup() *GoTest_RequiredGroup {
616 if this != nil {
617 return this.Requiredgroup
618 }
619 return nil
620}
621
622func (this *GoTest) GetOptionalgroup() *GoTest_OptionalGroup {
623 if this != nil {
624 return this.Optionalgroup
625 }
626 return nil
627}
628
Rob Pikeb7907bf2012-02-13 14:25:20 +1100629type GoTest_RequiredGroup struct {
630 RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000631 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100632}
633
634func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
635func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000636func (*GoTest_RequiredGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100637
David Symonds0e084922012-07-02 16:04:40 -0700638func (this *GoTest_RequiredGroup) GetRequiredField() string {
639 if this != nil && this.RequiredField != nil {
640 return *this.RequiredField
641 }
642 return ""
643}
644
Rob Pikeb7907bf2012-02-13 14:25:20 +1100645type GoTest_RepeatedGroup struct {
646 RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000647 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100648}
649
650func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
651func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000652func (*GoTest_RepeatedGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100653
David Symonds0e084922012-07-02 16:04:40 -0700654func (this *GoTest_RepeatedGroup) GetRequiredField() string {
655 if this != nil && this.RequiredField != nil {
656 return *this.RequiredField
657 }
658 return ""
659}
660
Rob Pikeb7907bf2012-02-13 14:25:20 +1100661type GoTest_OptionalGroup struct {
662 RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000663 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100664}
665
666func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
667func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000668func (*GoTest_OptionalGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100669
David Symonds0e084922012-07-02 16:04:40 -0700670func (this *GoTest_OptionalGroup) GetRequiredField() string {
671 if this != nil && this.RequiredField != nil {
672 return *this.RequiredField
673 }
674 return ""
675}
676
Rob Pikeb7907bf2012-02-13 14:25:20 +1100677type GoSkipTest struct {
678 SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"`
679 SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"`
680 SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"`
681 SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"`
682 Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000683 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100684}
685
686func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
687func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000688func (*GoSkipTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100689
David Symonds0e084922012-07-02 16:04:40 -0700690func (this *GoSkipTest) GetSkipInt32() int32 {
691 if this != nil && this.SkipInt32 != nil {
692 return *this.SkipInt32
693 }
694 return 0
695}
696
697func (this *GoSkipTest) GetSkipFixed32() uint32 {
698 if this != nil && this.SkipFixed32 != nil {
699 return *this.SkipFixed32
700 }
701 return 0
702}
703
704func (this *GoSkipTest) GetSkipFixed64() uint64 {
705 if this != nil && this.SkipFixed64 != nil {
706 return *this.SkipFixed64
707 }
708 return 0
709}
710
711func (this *GoSkipTest) GetSkipString() string {
712 if this != nil && this.SkipString != nil {
713 return *this.SkipString
714 }
715 return ""
716}
717
718func (this *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup {
719 if this != nil {
720 return this.Skipgroup
721 }
722 return nil
723}
724
Rob Pikeb7907bf2012-02-13 14:25:20 +1100725type GoSkipTest_SkipGroup struct {
726 GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"`
727 GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000728 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100729}
730
731func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
732func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000733func (*GoSkipTest_SkipGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100734
David Symonds0e084922012-07-02 16:04:40 -0700735func (this *GoSkipTest_SkipGroup) GetGroupInt32() int32 {
736 if this != nil && this.GroupInt32 != nil {
737 return *this.GroupInt32
738 }
739 return 0
740}
741
742func (this *GoSkipTest_SkipGroup) GetGroupString() string {
743 if this != nil && this.GroupString != nil {
744 return *this.GroupString
745 }
746 return ""
747}
748
Rob Pikeb7907bf2012-02-13 14:25:20 +1100749type NonPackedTest struct {
750 A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000751 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100752}
753
754func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
755func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000756func (*NonPackedTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100757
758type PackedTest struct {
759 B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000760 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100761}
762
763func (this *PackedTest) Reset() { *this = PackedTest{} }
764func (this *PackedTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000765func (*PackedTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100766
767type MaxTag struct {
768 LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000769 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100770}
771
772func (this *MaxTag) Reset() { *this = MaxTag{} }
773func (this *MaxTag) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000774func (*MaxTag) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100775
David Symonds0e084922012-07-02 16:04:40 -0700776func (this *MaxTag) GetLastField() string {
777 if this != nil && this.LastField != nil {
778 return *this.LastField
779 }
780 return ""
781}
782
Rob Pikeb7907bf2012-02-13 14:25:20 +1100783type InnerMessage struct {
784 Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
785 Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
786 Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000787 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100788}
789
790func (this *InnerMessage) Reset() { *this = InnerMessage{} }
791func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000792func (*InnerMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100793
794const Default_InnerMessage_Port int32 = 4000
795
David Symonds0e084922012-07-02 16:04:40 -0700796func (this *InnerMessage) GetHost() string {
797 if this != nil && this.Host != nil {
798 return *this.Host
799 }
800 return ""
801}
802
803func (this *InnerMessage) GetPort() int32 {
804 if this != nil && this.Port != nil {
805 return *this.Port
806 }
807 return Default_InnerMessage_Port
808}
809
810func (this *InnerMessage) GetConnected() bool {
811 if this != nil && this.Connected != nil {
812 return *this.Connected
813 }
814 return false
815}
816
Rob Pikeb7907bf2012-02-13 14:25:20 +1100817type OtherMessage struct {
818 Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
819 Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
820 Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
821 Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000822 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100823}
824
825func (this *OtherMessage) Reset() { *this = OtherMessage{} }
826func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000827func (*OtherMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100828
David Symonds0e084922012-07-02 16:04:40 -0700829func (this *OtherMessage) GetKey() int64 {
830 if this != nil && this.Key != nil {
831 return *this.Key
832 }
833 return 0
834}
835
836func (this *OtherMessage) GetValue() []byte {
837 if this != nil {
838 return this.Value
839 }
840 return nil
841}
842
843func (this *OtherMessage) GetWeight() float32 {
844 if this != nil && this.Weight != nil {
845 return *this.Weight
846 }
847 return 0
848}
849
850func (this *OtherMessage) GetInner() *InnerMessage {
851 if this != nil {
852 return this.Inner
853 }
854 return nil
855}
856
Rob Pikeb7907bf2012-02-13 14:25:20 +1100857type MyMessage struct {
858 Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
859 Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
860 Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
861 Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
862 Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
863 Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
864 Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
865 Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"`
866 RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000867 XXX_extensions map[int32]proto.Extension `json:"-"`
868 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100869}
870
871func (this *MyMessage) Reset() { *this = MyMessage{} }
872func (this *MyMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000873func (*MyMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100874
875var extRange_MyMessage = []proto.ExtensionRange{
876 {100, 536870911},
877}
878
879func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
880 return extRange_MyMessage
881}
882func (this *MyMessage) ExtensionMap() map[int32]proto.Extension {
883 if this.XXX_extensions == nil {
884 this.XXX_extensions = make(map[int32]proto.Extension)
885 }
886 return this.XXX_extensions
887}
888
David Symonds0e084922012-07-02 16:04:40 -0700889func (this *MyMessage) GetCount() int32 {
890 if this != nil && this.Count != nil {
891 return *this.Count
892 }
893 return 0
894}
895
896func (this *MyMessage) GetName() string {
897 if this != nil && this.Name != nil {
898 return *this.Name
899 }
900 return ""
901}
902
903func (this *MyMessage) GetQuote() string {
904 if this != nil && this.Quote != nil {
905 return *this.Quote
906 }
907 return ""
908}
909
910func (this *MyMessage) GetInner() *InnerMessage {
911 if this != nil {
912 return this.Inner
913 }
914 return nil
915}
916
917func (this *MyMessage) GetBikeshed() MyMessage_Color {
918 if this != nil && this.Bikeshed != nil {
919 return *this.Bikeshed
920 }
921 return 0
922}
923
924func (this *MyMessage) GetSomegroup() *MyMessage_SomeGroup {
925 if this != nil {
926 return this.Somegroup
927 }
928 return nil
929}
930
Rob Pikeb7907bf2012-02-13 14:25:20 +1100931type MyMessage_SomeGroup struct {
932 GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000933 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100934}
935
936func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
937func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000938func (*MyMessage_SomeGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100939
David Symonds0e084922012-07-02 16:04:40 -0700940func (this *MyMessage_SomeGroup) GetGroupField() int32 {
941 if this != nil && this.GroupField != nil {
942 return *this.GroupField
943 }
944 return 0
945}
946
Rob Pikeb7907bf2012-02-13 14:25:20 +1100947type Ext struct {
948 Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000949 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100950}
951
952func (this *Ext) Reset() { *this = Ext{} }
953func (this *Ext) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000954func (*Ext) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100955
David Symonds0e084922012-07-02 16:04:40 -0700956func (this *Ext) GetData() string {
957 if this != nil && this.Data != nil {
958 return *this.Data
959 }
960 return ""
961}
962
Rob Pikeb7907bf2012-02-13 14:25:20 +1100963var E_Ext_More = &proto.ExtensionDesc{
964 ExtendedType: (*MyMessage)(nil),
965 ExtensionType: (*Ext)(nil),
966 Field: 103,
967 Name: "testdata.Ext.more",
968 Tag: "bytes,103,opt,name=more",
969}
970
971var E_Ext_Text = &proto.ExtensionDesc{
972 ExtendedType: (*MyMessage)(nil),
973 ExtensionType: (*string)(nil),
974 Field: 104,
975 Name: "testdata.Ext.text",
976 Tag: "bytes,104,opt,name=text",
977}
978
979var E_Ext_Number = &proto.ExtensionDesc{
980 ExtendedType: (*MyMessage)(nil),
981 ExtensionType: (*int32)(nil),
982 Field: 105,
983 Name: "testdata.Ext.number",
984 Tag: "varint,105,opt,name=number",
985}
986
987type MessageList struct {
988 Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000989 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100990}
991
992func (this *MessageList) Reset() { *this = MessageList{} }
993func (this *MessageList) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000994func (*MessageList) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100995
996type MessageList_Message struct {
997 Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
998 Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000999 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001000}
1001
1002func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
1003func (this *MessageList_Message) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001004func (*MessageList_Message) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001005
David Symonds0e084922012-07-02 16:04:40 -07001006func (this *MessageList_Message) GetName() string {
1007 if this != nil && this.Name != nil {
1008 return *this.Name
1009 }
1010 return ""
1011}
1012
1013func (this *MessageList_Message) GetCount() int32 {
1014 if this != nil && this.Count != nil {
1015 return *this.Count
1016 }
1017 return 0
1018}
1019
Rob Pikeb7907bf2012-02-13 14:25:20 +11001020type Strings struct {
1021 StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"`
1022 BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001023 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001024}
1025
1026func (this *Strings) Reset() { *this = Strings{} }
1027func (this *Strings) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001028func (*Strings) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001029
David Symonds0e084922012-07-02 16:04:40 -07001030func (this *Strings) GetStringField() string {
1031 if this != nil && this.StringField != nil {
1032 return *this.StringField
1033 }
1034 return ""
1035}
1036
1037func (this *Strings) GetBytesField() []byte {
1038 if this != nil {
1039 return this.BytesField
1040 }
1041 return nil
1042}
1043
Rob Pikeb7907bf2012-02-13 14:25:20 +11001044type Defaults struct {
1045 F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"`
1046 F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"`
1047 F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"`
1048 F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"`
1049 F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"`
1050 F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"`
1051 F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"`
1052 F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"`
1053 F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"`
1054 F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"`
1055 F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"`
1056 F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"`
1057 F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"`
1058 F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
1059 F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"`
1060 F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"`
1061 F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"`
1062 Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001063 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001064}
1065
1066func (this *Defaults) Reset() { *this = Defaults{} }
1067func (this *Defaults) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001068func (*Defaults) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001069
1070const Default_Defaults_F_Bool bool = true
1071const Default_Defaults_F_Int32 int32 = 32
1072const Default_Defaults_F_Int64 int64 = 64
1073const Default_Defaults_F_Fixed32 uint32 = 320
1074const Default_Defaults_F_Fixed64 uint64 = 640
1075const Default_Defaults_F_Uint32 uint32 = 3200
1076const Default_Defaults_F_Uint64 uint64 = 6400
1077const Default_Defaults_F_Float float32 = 314159
1078const Default_Defaults_F_Double float64 = 271828
1079const Default_Defaults_F_String string = "hello, \"world!\"\n"
1080
1081var Default_Defaults_F_Bytes []byte = []byte("Bignose")
1082
1083const Default_Defaults_F_Sint32 int32 = -32
1084const Default_Defaults_F_Sint64 int64 = -64
1085const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
1086
1087var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
1088var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
1089var Default_Defaults_F_Nan float32 = float32(math.NaN())
1090
David Symonds0e084922012-07-02 16:04:40 -07001091func (this *Defaults) GetF_Bool() bool {
1092 if this != nil && this.F_Bool != nil {
1093 return *this.F_Bool
1094 }
1095 return Default_Defaults_F_Bool
1096}
1097
1098func (this *Defaults) GetF_Int32() int32 {
1099 if this != nil && this.F_Int32 != nil {
1100 return *this.F_Int32
1101 }
1102 return Default_Defaults_F_Int32
1103}
1104
1105func (this *Defaults) GetF_Int64() int64 {
1106 if this != nil && this.F_Int64 != nil {
1107 return *this.F_Int64
1108 }
1109 return Default_Defaults_F_Int64
1110}
1111
1112func (this *Defaults) GetF_Fixed32() uint32 {
1113 if this != nil && this.F_Fixed32 != nil {
1114 return *this.F_Fixed32
1115 }
1116 return Default_Defaults_F_Fixed32
1117}
1118
1119func (this *Defaults) GetF_Fixed64() uint64 {
1120 if this != nil && this.F_Fixed64 != nil {
1121 return *this.F_Fixed64
1122 }
1123 return Default_Defaults_F_Fixed64
1124}
1125
1126func (this *Defaults) GetF_Uint32() uint32 {
1127 if this != nil && this.F_Uint32 != nil {
1128 return *this.F_Uint32
1129 }
1130 return Default_Defaults_F_Uint32
1131}
1132
1133func (this *Defaults) GetF_Uint64() uint64 {
1134 if this != nil && this.F_Uint64 != nil {
1135 return *this.F_Uint64
1136 }
1137 return Default_Defaults_F_Uint64
1138}
1139
1140func (this *Defaults) GetF_Float() float32 {
1141 if this != nil && this.F_Float != nil {
1142 return *this.F_Float
1143 }
1144 return Default_Defaults_F_Float
1145}
1146
1147func (this *Defaults) GetF_Double() float64 {
1148 if this != nil && this.F_Double != nil {
1149 return *this.F_Double
1150 }
1151 return Default_Defaults_F_Double
1152}
1153
1154func (this *Defaults) GetF_String() string {
1155 if this != nil && this.F_String != nil {
1156 return *this.F_String
1157 }
1158 return Default_Defaults_F_String
1159}
1160
1161func (this *Defaults) GetF_Bytes() []byte {
1162 if this != nil && this.F_Bytes != nil {
1163 return this.F_Bytes
1164 }
1165 return append([]byte(nil), Default_Defaults_F_Bytes...)
1166}
1167
1168func (this *Defaults) GetF_Sint32() int32 {
1169 if this != nil && this.F_Sint32 != nil {
1170 return *this.F_Sint32
1171 }
1172 return Default_Defaults_F_Sint32
1173}
1174
1175func (this *Defaults) GetF_Sint64() int64 {
1176 if this != nil && this.F_Sint64 != nil {
1177 return *this.F_Sint64
1178 }
1179 return Default_Defaults_F_Sint64
1180}
1181
1182func (this *Defaults) GetF_Enum() Defaults_Color {
1183 if this != nil && this.F_Enum != nil {
1184 return *this.F_Enum
1185 }
1186 return Default_Defaults_F_Enum
1187}
1188
1189func (this *Defaults) GetF_Pinf() float32 {
1190 if this != nil && this.F_Pinf != nil {
1191 return *this.F_Pinf
1192 }
1193 return Default_Defaults_F_Pinf
1194}
1195
1196func (this *Defaults) GetF_Ninf() float32 {
1197 if this != nil && this.F_Ninf != nil {
1198 return *this.F_Ninf
1199 }
1200 return Default_Defaults_F_Ninf
1201}
1202
1203func (this *Defaults) GetF_Nan() float32 {
1204 if this != nil && this.F_Nan != nil {
1205 return *this.F_Nan
1206 }
1207 return Default_Defaults_F_Nan
1208}
1209
1210func (this *Defaults) GetSub() *SubDefaults {
1211 if this != nil {
1212 return this.Sub
1213 }
1214 return nil
1215}
1216
Rob Pikeb7907bf2012-02-13 14:25:20 +11001217type SubDefaults struct {
1218 N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001219 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001220}
1221
1222func (this *SubDefaults) Reset() { *this = SubDefaults{} }
1223func (this *SubDefaults) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001224func (*SubDefaults) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001225
1226const Default_SubDefaults_N int64 = 7
1227
David Symonds0e084922012-07-02 16:04:40 -07001228func (this *SubDefaults) GetN() int64 {
1229 if this != nil && this.N != nil {
1230 return *this.N
1231 }
1232 return Default_SubDefaults_N
1233}
1234
Rob Pikeb7907bf2012-02-13 14:25:20 +11001235type RepeatedEnum struct {
1236 Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001237 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001238}
1239
1240func (this *RepeatedEnum) Reset() { *this = RepeatedEnum{} }
1241func (this *RepeatedEnum) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001242func (*RepeatedEnum) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001243
David Symonds61826da2012-05-05 09:31:28 +10001244var E_Greeting = &proto.ExtensionDesc{
1245 ExtendedType: (*MyMessage)(nil),
1246 ExtensionType: ([]string)(nil),
1247 Field: 106,
1248 Name: "testdata.greeting",
1249 Tag: "bytes,106,rep,name=greeting",
1250}
1251
Rob Pikeb7907bf2012-02-13 14:25:20 +11001252func init() {
1253 proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
1254 proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
1255 proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
1256 proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
1257 proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
1258 proto.RegisterExtension(E_Ext_More)
1259 proto.RegisterExtension(E_Ext_Text)
1260 proto.RegisterExtension(E_Ext_Number)
David Symonds61826da2012-05-05 09:31:28 +10001261 proto.RegisterExtension(E_Greeting)
Rob Pikeb7907bf2012-02-13 14:25:20 +11001262}