blob: 2ff27ea713811e03c1f8451387169952df08707e [file] [log] [blame]
David Symondsafbae882012-09-24 13:21:21 +10001// Code generated by protoc-gen-go.
2// source: test.proto
Rob Pikeb7907bf2012-02-13 14:25:20 +11003// DO NOT EDIT!
4
5package testdata
6
7import proto "code.google.com/p/goprotobuf/proto"
David Symondsafbae882012-09-24 13:21:21 +10008import json "encoding/json"
9import math "math"
Rob Pikeb7907bf2012-02-13 14:25:20 +110010
David Symonds62539862012-08-04 10:06:55 +100011// Reference proto, json, and math imports to suppress error if they are not otherwise used.
David Symonds0e084922012-07-02 16:04:40 -070012var _ = proto.Marshal
David Symonds62539862012-08-04 10:06:55 +100013var _ = &json.SyntaxError{}
Rob Pikeb7907bf2012-02-13 14:25:20 +110014var _ = math.Inf
15
16type FOO int32
17
18const (
19 FOO_FOO1 FOO = 1
20)
21
22var FOO_name = map[int32]string{
23 1: "FOO1",
24}
25var FOO_value = map[string]int32{
26 "FOO1": 1,
27}
28
David Symondsefeca9a2012-05-08 10:36:04 +100029func (x FOO) Enum() *FOO {
30 p := new(FOO)
31 *p = x
32 return p
33}
Rob Pikeb7907bf2012-02-13 14:25:20 +110034func (x FOO) String() string {
35 return proto.EnumName(FOO_name, int32(x))
36}
David Symonds62539862012-08-04 10:06:55 +100037func (x FOO) MarshalJSON() ([]byte, error) {
38 return json.Marshal(x.String())
39}
40func (x *FOO) UnmarshalJSON(data []byte) error {
41 value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
42 if err != nil {
43 return err
44 }
45 *x = FOO(value)
46 return nil
47}
Rob Pikeb7907bf2012-02-13 14:25:20 +110048
49type GoTest_KIND int32
50
51const (
52 GoTest_VOID GoTest_KIND = 0
53 GoTest_BOOL GoTest_KIND = 1
54 GoTest_BYTES GoTest_KIND = 2
55 GoTest_FINGERPRINT GoTest_KIND = 3
56 GoTest_FLOAT GoTest_KIND = 4
57 GoTest_INT GoTest_KIND = 5
58 GoTest_STRING GoTest_KIND = 6
59 GoTest_TIME GoTest_KIND = 7
60 GoTest_TUPLE GoTest_KIND = 8
61 GoTest_ARRAY GoTest_KIND = 9
62 GoTest_MAP GoTest_KIND = 10
63 GoTest_TABLE GoTest_KIND = 11
64 GoTest_FUNCTION GoTest_KIND = 12
65)
66
67var GoTest_KIND_name = map[int32]string{
68 0: "VOID",
69 1: "BOOL",
70 2: "BYTES",
71 3: "FINGERPRINT",
72 4: "FLOAT",
73 5: "INT",
74 6: "STRING",
75 7: "TIME",
76 8: "TUPLE",
77 9: "ARRAY",
78 10: "MAP",
79 11: "TABLE",
80 12: "FUNCTION",
81}
82var GoTest_KIND_value = map[string]int32{
83 "VOID": 0,
84 "BOOL": 1,
85 "BYTES": 2,
86 "FINGERPRINT": 3,
87 "FLOAT": 4,
88 "INT": 5,
89 "STRING": 6,
90 "TIME": 7,
91 "TUPLE": 8,
92 "ARRAY": 9,
93 "MAP": 10,
94 "TABLE": 11,
95 "FUNCTION": 12,
96}
97
David Symondsefeca9a2012-05-08 10:36:04 +100098func (x GoTest_KIND) Enum() *GoTest_KIND {
99 p := new(GoTest_KIND)
100 *p = x
101 return p
102}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100103func (x GoTest_KIND) String() string {
104 return proto.EnumName(GoTest_KIND_name, int32(x))
105}
David Symonds62539862012-08-04 10:06:55 +1000106func (x GoTest_KIND) MarshalJSON() ([]byte, error) {
107 return json.Marshal(x.String())
108}
109func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
110 value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
111 if err != nil {
112 return err
113 }
114 *x = GoTest_KIND(value)
115 return nil
116}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100117
118type MyMessage_Color int32
119
120const (
121 MyMessage_RED MyMessage_Color = 0
122 MyMessage_GREEN MyMessage_Color = 1
123 MyMessage_BLUE MyMessage_Color = 2
124)
125
126var MyMessage_Color_name = map[int32]string{
127 0: "RED",
128 1: "GREEN",
129 2: "BLUE",
130}
131var MyMessage_Color_value = map[string]int32{
132 "RED": 0,
133 "GREEN": 1,
134 "BLUE": 2,
135}
136
David Symondsefeca9a2012-05-08 10:36:04 +1000137func (x MyMessage_Color) Enum() *MyMessage_Color {
138 p := new(MyMessage_Color)
139 *p = x
140 return p
141}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100142func (x MyMessage_Color) String() string {
143 return proto.EnumName(MyMessage_Color_name, int32(x))
144}
David Symonds62539862012-08-04 10:06:55 +1000145func (x MyMessage_Color) MarshalJSON() ([]byte, error) {
146 return json.Marshal(x.String())
147}
148func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
149 value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
150 if err != nil {
151 return err
152 }
153 *x = MyMessage_Color(value)
154 return nil
155}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100156
157type Defaults_Color int32
158
159const (
160 Defaults_RED Defaults_Color = 0
161 Defaults_GREEN Defaults_Color = 1
162 Defaults_BLUE Defaults_Color = 2
163)
164
165var Defaults_Color_name = map[int32]string{
166 0: "RED",
167 1: "GREEN",
168 2: "BLUE",
169}
170var Defaults_Color_value = map[string]int32{
171 "RED": 0,
172 "GREEN": 1,
173 "BLUE": 2,
174}
175
David Symondsefeca9a2012-05-08 10:36:04 +1000176func (x Defaults_Color) Enum() *Defaults_Color {
177 p := new(Defaults_Color)
178 *p = x
179 return p
180}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100181func (x Defaults_Color) String() string {
182 return proto.EnumName(Defaults_Color_name, int32(x))
183}
David Symonds62539862012-08-04 10:06:55 +1000184func (x Defaults_Color) MarshalJSON() ([]byte, error) {
185 return json.Marshal(x.String())
186}
187func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
188 value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
189 if err != nil {
190 return err
191 }
192 *x = Defaults_Color(value)
193 return nil
194}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100195
196type RepeatedEnum_Color int32
197
198const (
199 RepeatedEnum_RED RepeatedEnum_Color = 1
200)
201
202var RepeatedEnum_Color_name = map[int32]string{
203 1: "RED",
204}
205var RepeatedEnum_Color_value = map[string]int32{
206 "RED": 1,
207}
208
David Symondsefeca9a2012-05-08 10:36:04 +1000209func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
210 p := new(RepeatedEnum_Color)
211 *p = x
212 return p
213}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100214func (x RepeatedEnum_Color) String() string {
215 return proto.EnumName(RepeatedEnum_Color_name, int32(x))
216}
David Symonds62539862012-08-04 10:06:55 +1000217func (x RepeatedEnum_Color) MarshalJSON() ([]byte, error) {
218 return json.Marshal(x.String())
219}
220func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
221 value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
222 if err != nil {
223 return err
224 }
225 *x = RepeatedEnum_Color(value)
226 return nil
227}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100228
229type GoEnum struct {
230 Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000231 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100232}
233
234func (this *GoEnum) Reset() { *this = GoEnum{} }
235func (this *GoEnum) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000236func (*GoEnum) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100237
David Symonds0e084922012-07-02 16:04:40 -0700238func (this *GoEnum) GetFoo() FOO {
239 if this != nil && this.Foo != nil {
240 return *this.Foo
241 }
242 return 0
243}
244
Rob Pikeb7907bf2012-02-13 14:25:20 +1100245type GoTestField struct {
246 Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"`
247 Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000248 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100249}
250
251func (this *GoTestField) Reset() { *this = GoTestField{} }
252func (this *GoTestField) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000253func (*GoTestField) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100254
David Symonds0e084922012-07-02 16:04:40 -0700255func (this *GoTestField) GetLabel() string {
256 if this != nil && this.Label != nil {
257 return *this.Label
258 }
259 return ""
260}
261
262func (this *GoTestField) GetType() string {
263 if this != nil && this.Type != nil {
264 return *this.Type
265 }
266 return ""
267}
268
Rob Pikeb7907bf2012-02-13 14:25:20 +1100269type GoTest struct {
270 Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
271 Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"`
272 Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"`
273 RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"`
274 RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"`
275 OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"`
276 F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"`
277 F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"`
278 F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"`
279 F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"`
280 F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"`
281 F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"`
282 F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"`
283 F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"`
284 F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"`
285 F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"`
286 F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"`
287 F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"`
288 F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"`
289 F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"`
290 F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"`
291 F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"`
292 F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"`
293 F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"`
294 F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"`
295 F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"`
296 F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"`
297 F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"`
298 F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"`
299 F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"`
300 F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"`
301 F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"`
302 F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"`
303 F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"`
304 F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"`
305 F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"`
306 F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"`
307 F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"`
308 F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"`
309 F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"`
310 F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"`
311 F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"`
312 F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"`
313 F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"`
314 F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"`
315 F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"`
316 F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
317 F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
318 F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
319 F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
320 F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
321 F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
322 F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"`
323 F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"`
324 F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
325 F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
326 F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
327 F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
328 F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"`
329 F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"`
330 F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"`
331 F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"`
332 F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"`
333 F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"`
334 F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"`
335 F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"`
336 F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"`
337 F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"`
338 F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"`
339 Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"`
340 Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"`
341 Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000342 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100343}
344
345func (this *GoTest) Reset() { *this = GoTest{} }
346func (this *GoTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000347func (*GoTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100348
349const Default_GoTest_F_BoolDefaulted bool = true
350const Default_GoTest_F_Int32Defaulted int32 = 32
351const Default_GoTest_F_Int64Defaulted int64 = 64
352const Default_GoTest_F_Fixed32Defaulted uint32 = 320
353const Default_GoTest_F_Fixed64Defaulted uint64 = 640
354const Default_GoTest_F_Uint32Defaulted uint32 = 3200
355const Default_GoTest_F_Uint64Defaulted uint64 = 6400
356const Default_GoTest_F_FloatDefaulted float32 = 314159
357const Default_GoTest_F_DoubleDefaulted float64 = 271828
358const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
359
360var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
361
362const Default_GoTest_F_Sint32Defaulted int32 = -32
363const Default_GoTest_F_Sint64Defaulted int64 = -64
364
David Symonds0e084922012-07-02 16:04:40 -0700365func (this *GoTest) GetKind() GoTest_KIND {
366 if this != nil && this.Kind != nil {
367 return *this.Kind
368 }
369 return 0
370}
371
372func (this *GoTest) GetTable() string {
373 if this != nil && this.Table != nil {
374 return *this.Table
375 }
376 return ""
377}
378
379func (this *GoTest) GetParam() int32 {
380 if this != nil && this.Param != nil {
381 return *this.Param
382 }
383 return 0
384}
385
386func (this *GoTest) GetRequiredField() *GoTestField {
387 if this != nil {
388 return this.RequiredField
389 }
390 return nil
391}
392
393func (this *GoTest) GetOptionalField() *GoTestField {
394 if this != nil {
395 return this.OptionalField
396 }
397 return nil
398}
399
400func (this *GoTest) GetF_BoolRequired() bool {
401 if this != nil && this.F_BoolRequired != nil {
402 return *this.F_BoolRequired
403 }
404 return false
405}
406
407func (this *GoTest) GetF_Int32Required() int32 {
408 if this != nil && this.F_Int32Required != nil {
409 return *this.F_Int32Required
410 }
411 return 0
412}
413
414func (this *GoTest) GetF_Int64Required() int64 {
415 if this != nil && this.F_Int64Required != nil {
416 return *this.F_Int64Required
417 }
418 return 0
419}
420
421func (this *GoTest) GetF_Fixed32Required() uint32 {
422 if this != nil && this.F_Fixed32Required != nil {
423 return *this.F_Fixed32Required
424 }
425 return 0
426}
427
428func (this *GoTest) GetF_Fixed64Required() uint64 {
429 if this != nil && this.F_Fixed64Required != nil {
430 return *this.F_Fixed64Required
431 }
432 return 0
433}
434
435func (this *GoTest) GetF_Uint32Required() uint32 {
436 if this != nil && this.F_Uint32Required != nil {
437 return *this.F_Uint32Required
438 }
439 return 0
440}
441
442func (this *GoTest) GetF_Uint64Required() uint64 {
443 if this != nil && this.F_Uint64Required != nil {
444 return *this.F_Uint64Required
445 }
446 return 0
447}
448
449func (this *GoTest) GetF_FloatRequired() float32 {
450 if this != nil && this.F_FloatRequired != nil {
451 return *this.F_FloatRequired
452 }
453 return 0
454}
455
456func (this *GoTest) GetF_DoubleRequired() float64 {
457 if this != nil && this.F_DoubleRequired != nil {
458 return *this.F_DoubleRequired
459 }
460 return 0
461}
462
463func (this *GoTest) GetF_StringRequired() string {
464 if this != nil && this.F_StringRequired != nil {
465 return *this.F_StringRequired
466 }
467 return ""
468}
469
470func (this *GoTest) GetF_BytesRequired() []byte {
471 if this != nil {
472 return this.F_BytesRequired
473 }
474 return nil
475}
476
477func (this *GoTest) GetF_Sint32Required() int32 {
478 if this != nil && this.F_Sint32Required != nil {
479 return *this.F_Sint32Required
480 }
481 return 0
482}
483
484func (this *GoTest) GetF_Sint64Required() int64 {
485 if this != nil && this.F_Sint64Required != nil {
486 return *this.F_Sint64Required
487 }
488 return 0
489}
490
491func (this *GoTest) GetF_BoolOptional() bool {
492 if this != nil && this.F_BoolOptional != nil {
493 return *this.F_BoolOptional
494 }
495 return false
496}
497
498func (this *GoTest) GetF_Int32Optional() int32 {
499 if this != nil && this.F_Int32Optional != nil {
500 return *this.F_Int32Optional
501 }
502 return 0
503}
504
505func (this *GoTest) GetF_Int64Optional() int64 {
506 if this != nil && this.F_Int64Optional != nil {
507 return *this.F_Int64Optional
508 }
509 return 0
510}
511
512func (this *GoTest) GetF_Fixed32Optional() uint32 {
513 if this != nil && this.F_Fixed32Optional != nil {
514 return *this.F_Fixed32Optional
515 }
516 return 0
517}
518
519func (this *GoTest) GetF_Fixed64Optional() uint64 {
520 if this != nil && this.F_Fixed64Optional != nil {
521 return *this.F_Fixed64Optional
522 }
523 return 0
524}
525
526func (this *GoTest) GetF_Uint32Optional() uint32 {
527 if this != nil && this.F_Uint32Optional != nil {
528 return *this.F_Uint32Optional
529 }
530 return 0
531}
532
533func (this *GoTest) GetF_Uint64Optional() uint64 {
534 if this != nil && this.F_Uint64Optional != nil {
535 return *this.F_Uint64Optional
536 }
537 return 0
538}
539
540func (this *GoTest) GetF_FloatOptional() float32 {
541 if this != nil && this.F_FloatOptional != nil {
542 return *this.F_FloatOptional
543 }
544 return 0
545}
546
547func (this *GoTest) GetF_DoubleOptional() float64 {
548 if this != nil && this.F_DoubleOptional != nil {
549 return *this.F_DoubleOptional
550 }
551 return 0
552}
553
554func (this *GoTest) GetF_StringOptional() string {
555 if this != nil && this.F_StringOptional != nil {
556 return *this.F_StringOptional
557 }
558 return ""
559}
560
561func (this *GoTest) GetF_BytesOptional() []byte {
562 if this != nil {
563 return this.F_BytesOptional
564 }
565 return nil
566}
567
568func (this *GoTest) GetF_Sint32Optional() int32 {
569 if this != nil && this.F_Sint32Optional != nil {
570 return *this.F_Sint32Optional
571 }
572 return 0
573}
574
575func (this *GoTest) GetF_Sint64Optional() int64 {
576 if this != nil && this.F_Sint64Optional != nil {
577 return *this.F_Sint64Optional
578 }
579 return 0
580}
581
582func (this *GoTest) GetF_BoolDefaulted() bool {
583 if this != nil && this.F_BoolDefaulted != nil {
584 return *this.F_BoolDefaulted
585 }
586 return Default_GoTest_F_BoolDefaulted
587}
588
589func (this *GoTest) GetF_Int32Defaulted() int32 {
590 if this != nil && this.F_Int32Defaulted != nil {
591 return *this.F_Int32Defaulted
592 }
593 return Default_GoTest_F_Int32Defaulted
594}
595
596func (this *GoTest) GetF_Int64Defaulted() int64 {
597 if this != nil && this.F_Int64Defaulted != nil {
598 return *this.F_Int64Defaulted
599 }
600 return Default_GoTest_F_Int64Defaulted
601}
602
603func (this *GoTest) GetF_Fixed32Defaulted() uint32 {
604 if this != nil && this.F_Fixed32Defaulted != nil {
605 return *this.F_Fixed32Defaulted
606 }
607 return Default_GoTest_F_Fixed32Defaulted
608}
609
610func (this *GoTest) GetF_Fixed64Defaulted() uint64 {
611 if this != nil && this.F_Fixed64Defaulted != nil {
612 return *this.F_Fixed64Defaulted
613 }
614 return Default_GoTest_F_Fixed64Defaulted
615}
616
617func (this *GoTest) GetF_Uint32Defaulted() uint32 {
618 if this != nil && this.F_Uint32Defaulted != nil {
619 return *this.F_Uint32Defaulted
620 }
621 return Default_GoTest_F_Uint32Defaulted
622}
623
624func (this *GoTest) GetF_Uint64Defaulted() uint64 {
625 if this != nil && this.F_Uint64Defaulted != nil {
626 return *this.F_Uint64Defaulted
627 }
628 return Default_GoTest_F_Uint64Defaulted
629}
630
631func (this *GoTest) GetF_FloatDefaulted() float32 {
632 if this != nil && this.F_FloatDefaulted != nil {
633 return *this.F_FloatDefaulted
634 }
635 return Default_GoTest_F_FloatDefaulted
636}
637
638func (this *GoTest) GetF_DoubleDefaulted() float64 {
639 if this != nil && this.F_DoubleDefaulted != nil {
640 return *this.F_DoubleDefaulted
641 }
642 return Default_GoTest_F_DoubleDefaulted
643}
644
645func (this *GoTest) GetF_StringDefaulted() string {
646 if this != nil && this.F_StringDefaulted != nil {
647 return *this.F_StringDefaulted
648 }
649 return Default_GoTest_F_StringDefaulted
650}
651
652func (this *GoTest) GetF_BytesDefaulted() []byte {
653 if this != nil && this.F_BytesDefaulted != nil {
654 return this.F_BytesDefaulted
655 }
656 return append([]byte(nil), Default_GoTest_F_BytesDefaulted...)
657}
658
659func (this *GoTest) GetF_Sint32Defaulted() int32 {
660 if this != nil && this.F_Sint32Defaulted != nil {
661 return *this.F_Sint32Defaulted
662 }
663 return Default_GoTest_F_Sint32Defaulted
664}
665
666func (this *GoTest) GetF_Sint64Defaulted() int64 {
667 if this != nil && this.F_Sint64Defaulted != nil {
668 return *this.F_Sint64Defaulted
669 }
670 return Default_GoTest_F_Sint64Defaulted
671}
672
673func (this *GoTest) GetRequiredgroup() *GoTest_RequiredGroup {
674 if this != nil {
675 return this.Requiredgroup
676 }
677 return nil
678}
679
680func (this *GoTest) GetOptionalgroup() *GoTest_OptionalGroup {
681 if this != nil {
682 return this.Optionalgroup
683 }
684 return nil
685}
686
Rob Pikeb7907bf2012-02-13 14:25:20 +1100687type GoTest_RequiredGroup struct {
688 RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000689 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100690}
691
692func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
693func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000694func (*GoTest_RequiredGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100695
David Symonds0e084922012-07-02 16:04:40 -0700696func (this *GoTest_RequiredGroup) GetRequiredField() string {
697 if this != nil && this.RequiredField != nil {
698 return *this.RequiredField
699 }
700 return ""
701}
702
Rob Pikeb7907bf2012-02-13 14:25:20 +1100703type GoTest_RepeatedGroup struct {
704 RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000705 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100706}
707
708func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
709func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000710func (*GoTest_RepeatedGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100711
David Symonds0e084922012-07-02 16:04:40 -0700712func (this *GoTest_RepeatedGroup) GetRequiredField() string {
713 if this != nil && this.RequiredField != nil {
714 return *this.RequiredField
715 }
716 return ""
717}
718
Rob Pikeb7907bf2012-02-13 14:25:20 +1100719type GoTest_OptionalGroup struct {
720 RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000721 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100722}
723
724func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
725func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000726func (*GoTest_OptionalGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100727
David Symonds0e084922012-07-02 16:04:40 -0700728func (this *GoTest_OptionalGroup) GetRequiredField() string {
729 if this != nil && this.RequiredField != nil {
730 return *this.RequiredField
731 }
732 return ""
733}
734
Rob Pikeb7907bf2012-02-13 14:25:20 +1100735type GoSkipTest struct {
736 SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"`
737 SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"`
738 SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"`
739 SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"`
740 Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000741 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100742}
743
744func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
745func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000746func (*GoSkipTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100747
David Symonds0e084922012-07-02 16:04:40 -0700748func (this *GoSkipTest) GetSkipInt32() int32 {
749 if this != nil && this.SkipInt32 != nil {
750 return *this.SkipInt32
751 }
752 return 0
753}
754
755func (this *GoSkipTest) GetSkipFixed32() uint32 {
756 if this != nil && this.SkipFixed32 != nil {
757 return *this.SkipFixed32
758 }
759 return 0
760}
761
762func (this *GoSkipTest) GetSkipFixed64() uint64 {
763 if this != nil && this.SkipFixed64 != nil {
764 return *this.SkipFixed64
765 }
766 return 0
767}
768
769func (this *GoSkipTest) GetSkipString() string {
770 if this != nil && this.SkipString != nil {
771 return *this.SkipString
772 }
773 return ""
774}
775
776func (this *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup {
777 if this != nil {
778 return this.Skipgroup
779 }
780 return nil
781}
782
Rob Pikeb7907bf2012-02-13 14:25:20 +1100783type GoSkipTest_SkipGroup struct {
784 GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"`
785 GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000786 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100787}
788
789func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
790func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000791func (*GoSkipTest_SkipGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100792
David Symonds0e084922012-07-02 16:04:40 -0700793func (this *GoSkipTest_SkipGroup) GetGroupInt32() int32 {
794 if this != nil && this.GroupInt32 != nil {
795 return *this.GroupInt32
796 }
797 return 0
798}
799
800func (this *GoSkipTest_SkipGroup) GetGroupString() string {
801 if this != nil && this.GroupString != nil {
802 return *this.GroupString
803 }
804 return ""
805}
806
Rob Pikeb7907bf2012-02-13 14:25:20 +1100807type NonPackedTest struct {
808 A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000809 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100810}
811
812func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
813func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000814func (*NonPackedTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100815
816type PackedTest struct {
817 B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000818 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100819}
820
821func (this *PackedTest) Reset() { *this = PackedTest{} }
822func (this *PackedTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000823func (*PackedTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100824
825type MaxTag struct {
826 LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000827 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100828}
829
830func (this *MaxTag) Reset() { *this = MaxTag{} }
831func (this *MaxTag) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000832func (*MaxTag) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100833
David Symonds0e084922012-07-02 16:04:40 -0700834func (this *MaxTag) GetLastField() string {
835 if this != nil && this.LastField != nil {
836 return *this.LastField
837 }
838 return ""
839}
840
David Symonds10c93ba2012-08-04 16:38:08 +1000841type OldMessage struct {
842 Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
843 XXX_unrecognized []byte `json:"-"`
844}
845
846func (this *OldMessage) Reset() { *this = OldMessage{} }
847func (this *OldMessage) String() string { return proto.CompactTextString(this) }
848func (*OldMessage) ProtoMessage() {}
849
850func (this *OldMessage) GetNested() *OldMessage_Nested {
851 if this != nil {
852 return this.Nested
853 }
854 return nil
855}
856
857type OldMessage_Nested struct {
858 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
859 XXX_unrecognized []byte `json:"-"`
860}
861
862func (this *OldMessage_Nested) Reset() { *this = OldMessage_Nested{} }
863func (this *OldMessage_Nested) String() string { return proto.CompactTextString(this) }
864func (*OldMessage_Nested) ProtoMessage() {}
865
866func (this *OldMessage_Nested) GetName() string {
867 if this != nil && this.Name != nil {
868 return *this.Name
869 }
870 return ""
871}
872
873type NewMessage struct {
874 Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
875 XXX_unrecognized []byte `json:"-"`
876}
877
878func (this *NewMessage) Reset() { *this = NewMessage{} }
879func (this *NewMessage) String() string { return proto.CompactTextString(this) }
880func (*NewMessage) ProtoMessage() {}
881
882func (this *NewMessage) GetNested() *NewMessage_Nested {
883 if this != nil {
884 return this.Nested
885 }
886 return nil
887}
888
889type NewMessage_Nested struct {
890 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
891 FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"`
892 XXX_unrecognized []byte `json:"-"`
893}
894
895func (this *NewMessage_Nested) Reset() { *this = NewMessage_Nested{} }
896func (this *NewMessage_Nested) String() string { return proto.CompactTextString(this) }
897func (*NewMessage_Nested) ProtoMessage() {}
898
899func (this *NewMessage_Nested) GetName() string {
900 if this != nil && this.Name != nil {
901 return *this.Name
902 }
903 return ""
904}
905
906func (this *NewMessage_Nested) GetFoodGroup() string {
907 if this != nil && this.FoodGroup != nil {
908 return *this.FoodGroup
909 }
910 return ""
911}
912
Rob Pikeb7907bf2012-02-13 14:25:20 +1100913type InnerMessage struct {
914 Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
915 Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
916 Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000917 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100918}
919
920func (this *InnerMessage) Reset() { *this = InnerMessage{} }
921func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000922func (*InnerMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100923
924const Default_InnerMessage_Port int32 = 4000
925
David Symonds0e084922012-07-02 16:04:40 -0700926func (this *InnerMessage) GetHost() string {
927 if this != nil && this.Host != nil {
928 return *this.Host
929 }
930 return ""
931}
932
933func (this *InnerMessage) GetPort() int32 {
934 if this != nil && this.Port != nil {
935 return *this.Port
936 }
937 return Default_InnerMessage_Port
938}
939
940func (this *InnerMessage) GetConnected() bool {
941 if this != nil && this.Connected != nil {
942 return *this.Connected
943 }
944 return false
945}
946
Rob Pikeb7907bf2012-02-13 14:25:20 +1100947type OtherMessage struct {
948 Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
949 Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
950 Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
951 Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000952 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100953}
954
955func (this *OtherMessage) Reset() { *this = OtherMessage{} }
956func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000957func (*OtherMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100958
David Symonds0e084922012-07-02 16:04:40 -0700959func (this *OtherMessage) GetKey() int64 {
960 if this != nil && this.Key != nil {
961 return *this.Key
962 }
963 return 0
964}
965
966func (this *OtherMessage) GetValue() []byte {
967 if this != nil {
968 return this.Value
969 }
970 return nil
971}
972
973func (this *OtherMessage) GetWeight() float32 {
974 if this != nil && this.Weight != nil {
975 return *this.Weight
976 }
977 return 0
978}
979
980func (this *OtherMessage) GetInner() *InnerMessage {
981 if this != nil {
982 return this.Inner
983 }
984 return nil
985}
986
Rob Pikeb7907bf2012-02-13 14:25:20 +1100987type MyMessage struct {
988 Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
989 Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
990 Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
991 Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
992 Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
993 Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
994 Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
995 Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"`
996 RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000997 XXX_extensions map[int32]proto.Extension `json:"-"`
998 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100999}
1000
1001func (this *MyMessage) Reset() { *this = MyMessage{} }
1002func (this *MyMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001003func (*MyMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001004
1005var extRange_MyMessage = []proto.ExtensionRange{
1006 {100, 536870911},
1007}
1008
1009func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
1010 return extRange_MyMessage
1011}
1012func (this *MyMessage) ExtensionMap() map[int32]proto.Extension {
1013 if this.XXX_extensions == nil {
1014 this.XXX_extensions = make(map[int32]proto.Extension)
1015 }
1016 return this.XXX_extensions
1017}
1018
David Symonds0e084922012-07-02 16:04:40 -07001019func (this *MyMessage) GetCount() int32 {
1020 if this != nil && this.Count != nil {
1021 return *this.Count
1022 }
1023 return 0
1024}
1025
1026func (this *MyMessage) GetName() string {
1027 if this != nil && this.Name != nil {
1028 return *this.Name
1029 }
1030 return ""
1031}
1032
1033func (this *MyMessage) GetQuote() string {
1034 if this != nil && this.Quote != nil {
1035 return *this.Quote
1036 }
1037 return ""
1038}
1039
1040func (this *MyMessage) GetInner() *InnerMessage {
1041 if this != nil {
1042 return this.Inner
1043 }
1044 return nil
1045}
1046
1047func (this *MyMessage) GetBikeshed() MyMessage_Color {
1048 if this != nil && this.Bikeshed != nil {
1049 return *this.Bikeshed
1050 }
1051 return 0
1052}
1053
1054func (this *MyMessage) GetSomegroup() *MyMessage_SomeGroup {
1055 if this != nil {
1056 return this.Somegroup
1057 }
1058 return nil
1059}
1060
Rob Pikeb7907bf2012-02-13 14:25:20 +11001061type MyMessage_SomeGroup struct {
1062 GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001063 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001064}
1065
1066func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
1067func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001068func (*MyMessage_SomeGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001069
David Symonds0e084922012-07-02 16:04:40 -07001070func (this *MyMessage_SomeGroup) GetGroupField() int32 {
1071 if this != nil && this.GroupField != nil {
1072 return *this.GroupField
1073 }
1074 return 0
1075}
1076
Rob Pikeb7907bf2012-02-13 14:25:20 +11001077type Ext struct {
1078 Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001079 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001080}
1081
1082func (this *Ext) Reset() { *this = Ext{} }
1083func (this *Ext) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001084func (*Ext) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001085
David Symonds0e084922012-07-02 16:04:40 -07001086func (this *Ext) GetData() string {
1087 if this != nil && this.Data != nil {
1088 return *this.Data
1089 }
1090 return ""
1091}
1092
Rob Pikeb7907bf2012-02-13 14:25:20 +11001093var E_Ext_More = &proto.ExtensionDesc{
1094 ExtendedType: (*MyMessage)(nil),
1095 ExtensionType: (*Ext)(nil),
1096 Field: 103,
1097 Name: "testdata.Ext.more",
1098 Tag: "bytes,103,opt,name=more",
1099}
1100
1101var E_Ext_Text = &proto.ExtensionDesc{
1102 ExtendedType: (*MyMessage)(nil),
1103 ExtensionType: (*string)(nil),
1104 Field: 104,
1105 Name: "testdata.Ext.text",
1106 Tag: "bytes,104,opt,name=text",
1107}
1108
1109var E_Ext_Number = &proto.ExtensionDesc{
1110 ExtendedType: (*MyMessage)(nil),
1111 ExtensionType: (*int32)(nil),
1112 Field: 105,
1113 Name: "testdata.Ext.number",
1114 Tag: "varint,105,opt,name=number",
1115}
1116
1117type MessageList struct {
1118 Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001119 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001120}
1121
1122func (this *MessageList) Reset() { *this = MessageList{} }
1123func (this *MessageList) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001124func (*MessageList) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001125
1126type MessageList_Message struct {
1127 Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
1128 Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001129 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001130}
1131
1132func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
1133func (this *MessageList_Message) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001134func (*MessageList_Message) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001135
David Symonds0e084922012-07-02 16:04:40 -07001136func (this *MessageList_Message) GetName() string {
1137 if this != nil && this.Name != nil {
1138 return *this.Name
1139 }
1140 return ""
1141}
1142
1143func (this *MessageList_Message) GetCount() int32 {
1144 if this != nil && this.Count != nil {
1145 return *this.Count
1146 }
1147 return 0
1148}
1149
Rob Pikeb7907bf2012-02-13 14:25:20 +11001150type Strings struct {
1151 StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"`
1152 BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001153 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001154}
1155
1156func (this *Strings) Reset() { *this = Strings{} }
1157func (this *Strings) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001158func (*Strings) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001159
David Symonds0e084922012-07-02 16:04:40 -07001160func (this *Strings) GetStringField() string {
1161 if this != nil && this.StringField != nil {
1162 return *this.StringField
1163 }
1164 return ""
1165}
1166
1167func (this *Strings) GetBytesField() []byte {
1168 if this != nil {
1169 return this.BytesField
1170 }
1171 return nil
1172}
1173
Rob Pikeb7907bf2012-02-13 14:25:20 +11001174type Defaults struct {
1175 F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"`
1176 F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"`
1177 F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"`
1178 F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"`
1179 F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"`
1180 F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"`
1181 F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"`
1182 F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"`
1183 F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"`
1184 F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"`
1185 F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"`
1186 F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"`
1187 F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"`
1188 F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
1189 F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"`
1190 F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"`
1191 F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"`
1192 Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001193 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001194}
1195
1196func (this *Defaults) Reset() { *this = Defaults{} }
1197func (this *Defaults) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001198func (*Defaults) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001199
1200const Default_Defaults_F_Bool bool = true
1201const Default_Defaults_F_Int32 int32 = 32
1202const Default_Defaults_F_Int64 int64 = 64
1203const Default_Defaults_F_Fixed32 uint32 = 320
1204const Default_Defaults_F_Fixed64 uint64 = 640
1205const Default_Defaults_F_Uint32 uint32 = 3200
1206const Default_Defaults_F_Uint64 uint64 = 6400
1207const Default_Defaults_F_Float float32 = 314159
1208const Default_Defaults_F_Double float64 = 271828
1209const Default_Defaults_F_String string = "hello, \"world!\"\n"
1210
1211var Default_Defaults_F_Bytes []byte = []byte("Bignose")
1212
1213const Default_Defaults_F_Sint32 int32 = -32
1214const Default_Defaults_F_Sint64 int64 = -64
1215const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
1216
1217var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
1218var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
1219var Default_Defaults_F_Nan float32 = float32(math.NaN())
1220
David Symonds0e084922012-07-02 16:04:40 -07001221func (this *Defaults) GetF_Bool() bool {
1222 if this != nil && this.F_Bool != nil {
1223 return *this.F_Bool
1224 }
1225 return Default_Defaults_F_Bool
1226}
1227
1228func (this *Defaults) GetF_Int32() int32 {
1229 if this != nil && this.F_Int32 != nil {
1230 return *this.F_Int32
1231 }
1232 return Default_Defaults_F_Int32
1233}
1234
1235func (this *Defaults) GetF_Int64() int64 {
1236 if this != nil && this.F_Int64 != nil {
1237 return *this.F_Int64
1238 }
1239 return Default_Defaults_F_Int64
1240}
1241
1242func (this *Defaults) GetF_Fixed32() uint32 {
1243 if this != nil && this.F_Fixed32 != nil {
1244 return *this.F_Fixed32
1245 }
1246 return Default_Defaults_F_Fixed32
1247}
1248
1249func (this *Defaults) GetF_Fixed64() uint64 {
1250 if this != nil && this.F_Fixed64 != nil {
1251 return *this.F_Fixed64
1252 }
1253 return Default_Defaults_F_Fixed64
1254}
1255
1256func (this *Defaults) GetF_Uint32() uint32 {
1257 if this != nil && this.F_Uint32 != nil {
1258 return *this.F_Uint32
1259 }
1260 return Default_Defaults_F_Uint32
1261}
1262
1263func (this *Defaults) GetF_Uint64() uint64 {
1264 if this != nil && this.F_Uint64 != nil {
1265 return *this.F_Uint64
1266 }
1267 return Default_Defaults_F_Uint64
1268}
1269
1270func (this *Defaults) GetF_Float() float32 {
1271 if this != nil && this.F_Float != nil {
1272 return *this.F_Float
1273 }
1274 return Default_Defaults_F_Float
1275}
1276
1277func (this *Defaults) GetF_Double() float64 {
1278 if this != nil && this.F_Double != nil {
1279 return *this.F_Double
1280 }
1281 return Default_Defaults_F_Double
1282}
1283
1284func (this *Defaults) GetF_String() string {
1285 if this != nil && this.F_String != nil {
1286 return *this.F_String
1287 }
1288 return Default_Defaults_F_String
1289}
1290
1291func (this *Defaults) GetF_Bytes() []byte {
1292 if this != nil && this.F_Bytes != nil {
1293 return this.F_Bytes
1294 }
1295 return append([]byte(nil), Default_Defaults_F_Bytes...)
1296}
1297
1298func (this *Defaults) GetF_Sint32() int32 {
1299 if this != nil && this.F_Sint32 != nil {
1300 return *this.F_Sint32
1301 }
1302 return Default_Defaults_F_Sint32
1303}
1304
1305func (this *Defaults) GetF_Sint64() int64 {
1306 if this != nil && this.F_Sint64 != nil {
1307 return *this.F_Sint64
1308 }
1309 return Default_Defaults_F_Sint64
1310}
1311
1312func (this *Defaults) GetF_Enum() Defaults_Color {
1313 if this != nil && this.F_Enum != nil {
1314 return *this.F_Enum
1315 }
1316 return Default_Defaults_F_Enum
1317}
1318
1319func (this *Defaults) GetF_Pinf() float32 {
1320 if this != nil && this.F_Pinf != nil {
1321 return *this.F_Pinf
1322 }
1323 return Default_Defaults_F_Pinf
1324}
1325
1326func (this *Defaults) GetF_Ninf() float32 {
1327 if this != nil && this.F_Ninf != nil {
1328 return *this.F_Ninf
1329 }
1330 return Default_Defaults_F_Ninf
1331}
1332
1333func (this *Defaults) GetF_Nan() float32 {
1334 if this != nil && this.F_Nan != nil {
1335 return *this.F_Nan
1336 }
1337 return Default_Defaults_F_Nan
1338}
1339
1340func (this *Defaults) GetSub() *SubDefaults {
1341 if this != nil {
1342 return this.Sub
1343 }
1344 return nil
1345}
1346
Rob Pikeb7907bf2012-02-13 14:25:20 +11001347type SubDefaults struct {
1348 N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001349 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001350}
1351
1352func (this *SubDefaults) Reset() { *this = SubDefaults{} }
1353func (this *SubDefaults) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001354func (*SubDefaults) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001355
1356const Default_SubDefaults_N int64 = 7
1357
David Symonds0e084922012-07-02 16:04:40 -07001358func (this *SubDefaults) GetN() int64 {
1359 if this != nil && this.N != nil {
1360 return *this.N
1361 }
1362 return Default_SubDefaults_N
1363}
1364
Rob Pikeb7907bf2012-02-13 14:25:20 +11001365type RepeatedEnum struct {
1366 Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +10001367 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +11001368}
1369
1370func (this *RepeatedEnum) Reset() { *this = RepeatedEnum{} }
1371func (this *RepeatedEnum) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +10001372func (*RepeatedEnum) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +11001373
David Symonds61826da2012-05-05 09:31:28 +10001374var E_Greeting = &proto.ExtensionDesc{
1375 ExtendedType: (*MyMessage)(nil),
1376 ExtensionType: ([]string)(nil),
1377 Field: 106,
1378 Name: "testdata.greeting",
1379 Tag: "bytes,106,rep,name=greeting",
1380}
1381
Rob Pikeb7907bf2012-02-13 14:25:20 +11001382func init() {
1383 proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
1384 proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
1385 proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
1386 proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
1387 proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
1388 proto.RegisterExtension(E_Ext_More)
1389 proto.RegisterExtension(E_Ext_Text)
1390 proto.RegisterExtension(E_Ext_Number)
David Symonds61826da2012-05-05 09:31:28 +10001391 proto.RegisterExtension(E_Greeting)
Rob Pikeb7907bf2012-02-13 14:25:20 +11001392}