blob: d2a2c1663a3be817e1866ca86f000dc324902101 [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.
10var _ = proto.GetString
11var _ = 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
26func NewFOO(x FOO) *FOO {
27 e := FOO(x)
28 return &e
29}
30func (x FOO) String() string {
31 return proto.EnumName(FOO_name, int32(x))
32}
33
34type GoTest_KIND int32
35
36const (
37 GoTest_VOID GoTest_KIND = 0
38 GoTest_BOOL GoTest_KIND = 1
39 GoTest_BYTES GoTest_KIND = 2
40 GoTest_FINGERPRINT GoTest_KIND = 3
41 GoTest_FLOAT GoTest_KIND = 4
42 GoTest_INT GoTest_KIND = 5
43 GoTest_STRING GoTest_KIND = 6
44 GoTest_TIME GoTest_KIND = 7
45 GoTest_TUPLE GoTest_KIND = 8
46 GoTest_ARRAY GoTest_KIND = 9
47 GoTest_MAP GoTest_KIND = 10
48 GoTest_TABLE GoTest_KIND = 11
49 GoTest_FUNCTION GoTest_KIND = 12
50)
51
52var GoTest_KIND_name = map[int32]string{
53 0: "VOID",
54 1: "BOOL",
55 2: "BYTES",
56 3: "FINGERPRINT",
57 4: "FLOAT",
58 5: "INT",
59 6: "STRING",
60 7: "TIME",
61 8: "TUPLE",
62 9: "ARRAY",
63 10: "MAP",
64 11: "TABLE",
65 12: "FUNCTION",
66}
67var GoTest_KIND_value = map[string]int32{
68 "VOID": 0,
69 "BOOL": 1,
70 "BYTES": 2,
71 "FINGERPRINT": 3,
72 "FLOAT": 4,
73 "INT": 5,
74 "STRING": 6,
75 "TIME": 7,
76 "TUPLE": 8,
77 "ARRAY": 9,
78 "MAP": 10,
79 "TABLE": 11,
80 "FUNCTION": 12,
81}
82
83func NewGoTest_KIND(x GoTest_KIND) *GoTest_KIND {
84 e := GoTest_KIND(x)
85 return &e
86}
87func (x GoTest_KIND) String() string {
88 return proto.EnumName(GoTest_KIND_name, int32(x))
89}
90
91type MyMessage_Color int32
92
93const (
94 MyMessage_RED MyMessage_Color = 0
95 MyMessage_GREEN MyMessage_Color = 1
96 MyMessage_BLUE MyMessage_Color = 2
97)
98
99var MyMessage_Color_name = map[int32]string{
100 0: "RED",
101 1: "GREEN",
102 2: "BLUE",
103}
104var MyMessage_Color_value = map[string]int32{
105 "RED": 0,
106 "GREEN": 1,
107 "BLUE": 2,
108}
109
110func NewMyMessage_Color(x MyMessage_Color) *MyMessage_Color {
111 e := MyMessage_Color(x)
112 return &e
113}
114func (x MyMessage_Color) String() string {
115 return proto.EnumName(MyMessage_Color_name, int32(x))
116}
117
118type Defaults_Color int32
119
120const (
121 Defaults_RED Defaults_Color = 0
122 Defaults_GREEN Defaults_Color = 1
123 Defaults_BLUE Defaults_Color = 2
124)
125
126var Defaults_Color_name = map[int32]string{
127 0: "RED",
128 1: "GREEN",
129 2: "BLUE",
130}
131var Defaults_Color_value = map[string]int32{
132 "RED": 0,
133 "GREEN": 1,
134 "BLUE": 2,
135}
136
137func NewDefaults_Color(x Defaults_Color) *Defaults_Color {
138 e := Defaults_Color(x)
139 return &e
140}
141func (x Defaults_Color) String() string {
142 return proto.EnumName(Defaults_Color_name, int32(x))
143}
144
145type RepeatedEnum_Color int32
146
147const (
148 RepeatedEnum_RED RepeatedEnum_Color = 1
149)
150
151var RepeatedEnum_Color_name = map[int32]string{
152 1: "RED",
153}
154var RepeatedEnum_Color_value = map[string]int32{
155 "RED": 1,
156}
157
158func NewRepeatedEnum_Color(x RepeatedEnum_Color) *RepeatedEnum_Color {
159 e := RepeatedEnum_Color(x)
160 return &e
161}
162func (x RepeatedEnum_Color) String() string {
163 return proto.EnumName(RepeatedEnum_Color_name, int32(x))
164}
165
166type GoEnum struct {
167 Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
168 XXX_unrecognized []byte `json:",omitempty"`
169}
170
171func (this *GoEnum) Reset() { *this = GoEnum{} }
172func (this *GoEnum) String() string { return proto.CompactTextString(this) }
173
174type GoTestField struct {
175 Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"`
176 Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"`
177 XXX_unrecognized []byte `json:",omitempty"`
178}
179
180func (this *GoTestField) Reset() { *this = GoTestField{} }
181func (this *GoTestField) String() string { return proto.CompactTextString(this) }
182
183type GoTest struct {
184 Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
185 Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"`
186 Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"`
187 RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"`
188 RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"`
189 OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"`
190 F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"`
191 F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"`
192 F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"`
193 F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"`
194 F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"`
195 F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"`
196 F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"`
197 F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"`
198 F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"`
199 F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"`
200 F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"`
201 F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"`
202 F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"`
203 F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"`
204 F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"`
205 F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"`
206 F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"`
207 F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"`
208 F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"`
209 F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"`
210 F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"`
211 F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"`
212 F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"`
213 F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"`
214 F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"`
215 F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"`
216 F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"`
217 F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"`
218 F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"`
219 F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"`
220 F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"`
221 F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"`
222 F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"`
223 F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"`
224 F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"`
225 F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"`
226 F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"`
227 F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"`
228 F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"`
229 F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"`
230 F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
231 F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
232 F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
233 F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
234 F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
235 F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
236 F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"`
237 F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"`
238 F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
239 F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
240 F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
241 F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
242 F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"`
243 F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"`
244 F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"`
245 F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"`
246 F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"`
247 F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"`
248 F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"`
249 F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"`
250 F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"`
251 F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"`
252 F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"`
253 Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"`
254 Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"`
255 Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
256 XXX_unrecognized []byte `json:",omitempty"`
257}
258
259func (this *GoTest) Reset() { *this = GoTest{} }
260func (this *GoTest) String() string { return proto.CompactTextString(this) }
261
262const Default_GoTest_F_BoolDefaulted bool = true
263const Default_GoTest_F_Int32Defaulted int32 = 32
264const Default_GoTest_F_Int64Defaulted int64 = 64
265const Default_GoTest_F_Fixed32Defaulted uint32 = 320
266const Default_GoTest_F_Fixed64Defaulted uint64 = 640
267const Default_GoTest_F_Uint32Defaulted uint32 = 3200
268const Default_GoTest_F_Uint64Defaulted uint64 = 6400
269const Default_GoTest_F_FloatDefaulted float32 = 314159
270const Default_GoTest_F_DoubleDefaulted float64 = 271828
271const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
272
273var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
274
275const Default_GoTest_F_Sint32Defaulted int32 = -32
276const Default_GoTest_F_Sint64Defaulted int64 = -64
277
278type GoTest_RequiredGroup struct {
279 RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"`
280 XXX_unrecognized []byte `json:",omitempty"`
281}
282
283func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
284func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) }
285
286type GoTest_RepeatedGroup struct {
287 RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"`
288 XXX_unrecognized []byte `json:",omitempty"`
289}
290
291func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
292func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) }
293
294type GoTest_OptionalGroup struct {
295 RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"`
296 XXX_unrecognized []byte `json:",omitempty"`
297}
298
299func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
300func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) }
301
302type GoSkipTest struct {
303 SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"`
304 SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"`
305 SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"`
306 SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"`
307 Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"`
308 XXX_unrecognized []byte `json:",omitempty"`
309}
310
311func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
312func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
313
314type GoSkipTest_SkipGroup struct {
315 GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"`
316 GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"`
317 XXX_unrecognized []byte `json:",omitempty"`
318}
319
320func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
321func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) }
322
323type NonPackedTest struct {
324 A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
325 XXX_unrecognized []byte `json:",omitempty"`
326}
327
328func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
329func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
330
331type PackedTest struct {
332 B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
333 XXX_unrecognized []byte `json:",omitempty"`
334}
335
336func (this *PackedTest) Reset() { *this = PackedTest{} }
337func (this *PackedTest) String() string { return proto.CompactTextString(this) }
338
339type MaxTag struct {
340 LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"`
341 XXX_unrecognized []byte `json:",omitempty"`
342}
343
344func (this *MaxTag) Reset() { *this = MaxTag{} }
345func (this *MaxTag) String() string { return proto.CompactTextString(this) }
346
347type InnerMessage struct {
348 Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
349 Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
350 Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
351 XXX_unrecognized []byte `json:",omitempty"`
352}
353
354func (this *InnerMessage) Reset() { *this = InnerMessage{} }
355func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
356
357const Default_InnerMessage_Port int32 = 4000
358
359type OtherMessage struct {
360 Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
361 Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
362 Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
363 Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
364 XXX_unrecognized []byte `json:",omitempty"`
365}
366
367func (this *OtherMessage) Reset() { *this = OtherMessage{} }
368func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
369
370type MyMessage struct {
371 Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
372 Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
373 Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
374 Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
375 Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
376 Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
377 Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
378 Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"`
379 RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"`
380 XXX_extensions map[int32]proto.Extension `json:",omitempty"`
381 XXX_unrecognized []byte `json:",omitempty"`
382}
383
384func (this *MyMessage) Reset() { *this = MyMessage{} }
385func (this *MyMessage) String() string { return proto.CompactTextString(this) }
386
387var extRange_MyMessage = []proto.ExtensionRange{
388 {100, 536870911},
389}
390
391func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
392 return extRange_MyMessage
393}
394func (this *MyMessage) ExtensionMap() map[int32]proto.Extension {
395 if this.XXX_extensions == nil {
396 this.XXX_extensions = make(map[int32]proto.Extension)
397 }
398 return this.XXX_extensions
399}
400
401type MyMessage_SomeGroup struct {
402 GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"`
403 XXX_unrecognized []byte `json:",omitempty"`
404}
405
406func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
407func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) }
408
409type Ext struct {
410 Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
411 XXX_unrecognized []byte `json:",omitempty"`
412}
413
414func (this *Ext) Reset() { *this = Ext{} }
415func (this *Ext) String() string { return proto.CompactTextString(this) }
416
417var E_Ext_More = &proto.ExtensionDesc{
418 ExtendedType: (*MyMessage)(nil),
419 ExtensionType: (*Ext)(nil),
420 Field: 103,
421 Name: "testdata.Ext.more",
422 Tag: "bytes,103,opt,name=more",
423}
424
425var E_Ext_Text = &proto.ExtensionDesc{
426 ExtendedType: (*MyMessage)(nil),
427 ExtensionType: (*string)(nil),
428 Field: 104,
429 Name: "testdata.Ext.text",
430 Tag: "bytes,104,opt,name=text",
431}
432
433var E_Ext_Number = &proto.ExtensionDesc{
434 ExtendedType: (*MyMessage)(nil),
435 ExtensionType: (*int32)(nil),
436 Field: 105,
437 Name: "testdata.Ext.number",
438 Tag: "varint,105,opt,name=number",
439}
440
441type MessageList struct {
442 Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"`
443 XXX_unrecognized []byte `json:",omitempty"`
444}
445
446func (this *MessageList) Reset() { *this = MessageList{} }
447func (this *MessageList) String() string { return proto.CompactTextString(this) }
448
449type MessageList_Message struct {
450 Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
451 Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
452 XXX_unrecognized []byte `json:",omitempty"`
453}
454
455func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
456func (this *MessageList_Message) String() string { return proto.CompactTextString(this) }
457
458type Strings struct {
459 StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"`
460 BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"`
461 XXX_unrecognized []byte `json:",omitempty"`
462}
463
464func (this *Strings) Reset() { *this = Strings{} }
465func (this *Strings) String() string { return proto.CompactTextString(this) }
466
467type Defaults struct {
468 F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"`
469 F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"`
470 F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"`
471 F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"`
472 F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"`
473 F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"`
474 F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"`
475 F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"`
476 F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"`
477 F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"`
478 F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"`
479 F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"`
480 F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"`
481 F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
482 F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"`
483 F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"`
484 F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"`
485 Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
486 XXX_unrecognized []byte `json:",omitempty"`
487}
488
489func (this *Defaults) Reset() { *this = Defaults{} }
490func (this *Defaults) String() string { return proto.CompactTextString(this) }
491
492const Default_Defaults_F_Bool bool = true
493const Default_Defaults_F_Int32 int32 = 32
494const Default_Defaults_F_Int64 int64 = 64
495const Default_Defaults_F_Fixed32 uint32 = 320
496const Default_Defaults_F_Fixed64 uint64 = 640
497const Default_Defaults_F_Uint32 uint32 = 3200
498const Default_Defaults_F_Uint64 uint64 = 6400
499const Default_Defaults_F_Float float32 = 314159
500const Default_Defaults_F_Double float64 = 271828
501const Default_Defaults_F_String string = "hello, \"world!\"\n"
502
503var Default_Defaults_F_Bytes []byte = []byte("Bignose")
504
505const Default_Defaults_F_Sint32 int32 = -32
506const Default_Defaults_F_Sint64 int64 = -64
507const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
508
509var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
510var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
511var Default_Defaults_F_Nan float32 = float32(math.NaN())
512
513type SubDefaults struct {
514 N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
515 XXX_unrecognized []byte `json:",omitempty"`
516}
517
518func (this *SubDefaults) Reset() { *this = SubDefaults{} }
519func (this *SubDefaults) String() string { return proto.CompactTextString(this) }
520
521const Default_SubDefaults_N int64 = 7
522
523type RepeatedEnum struct {
524 Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
525 XXX_unrecognized []byte `json:",omitempty"`
526}
527
528func (this *RepeatedEnum) Reset() { *this = RepeatedEnum{} }
529func (this *RepeatedEnum) String() string { return proto.CompactTextString(this) }
530
531func init() {
532 proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
533 proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
534 proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
535 proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
536 proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
537 proto.RegisterExtension(E_Ext_More)
538 proto.RegisterExtension(E_Ext_Text)
539 proto.RegisterExtension(E_Ext_Number)
540}