blob: 735a2a1d51d4d086ec136d51d63439e9efb64f76 [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
David Symondsefeca9a2012-05-08 10:36:04 +100026// NewFOO is deprecated. Use x.Enum() instead.
Rob Pikeb7907bf2012-02-13 14:25:20 +110027func NewFOO(x FOO) *FOO {
28 e := FOO(x)
29 return &e
30}
David Symondsefeca9a2012-05-08 10:36:04 +100031func (x FOO) Enum() *FOO {
32 p := new(FOO)
33 *p = x
34 return p
35}
Rob Pikeb7907bf2012-02-13 14:25:20 +110036func (x FOO) String() string {
37 return proto.EnumName(FOO_name, int32(x))
38}
39
40type GoTest_KIND int32
41
42const (
43 GoTest_VOID GoTest_KIND = 0
44 GoTest_BOOL GoTest_KIND = 1
45 GoTest_BYTES GoTest_KIND = 2
46 GoTest_FINGERPRINT GoTest_KIND = 3
47 GoTest_FLOAT GoTest_KIND = 4
48 GoTest_INT GoTest_KIND = 5
49 GoTest_STRING GoTest_KIND = 6
50 GoTest_TIME GoTest_KIND = 7
51 GoTest_TUPLE GoTest_KIND = 8
52 GoTest_ARRAY GoTest_KIND = 9
53 GoTest_MAP GoTest_KIND = 10
54 GoTest_TABLE GoTest_KIND = 11
55 GoTest_FUNCTION GoTest_KIND = 12
56)
57
58var GoTest_KIND_name = map[int32]string{
59 0: "VOID",
60 1: "BOOL",
61 2: "BYTES",
62 3: "FINGERPRINT",
63 4: "FLOAT",
64 5: "INT",
65 6: "STRING",
66 7: "TIME",
67 8: "TUPLE",
68 9: "ARRAY",
69 10: "MAP",
70 11: "TABLE",
71 12: "FUNCTION",
72}
73var GoTest_KIND_value = map[string]int32{
74 "VOID": 0,
75 "BOOL": 1,
76 "BYTES": 2,
77 "FINGERPRINT": 3,
78 "FLOAT": 4,
79 "INT": 5,
80 "STRING": 6,
81 "TIME": 7,
82 "TUPLE": 8,
83 "ARRAY": 9,
84 "MAP": 10,
85 "TABLE": 11,
86 "FUNCTION": 12,
87}
88
David Symondsefeca9a2012-05-08 10:36:04 +100089// NewGoTest_KIND is deprecated. Use x.Enum() instead.
Rob Pikeb7907bf2012-02-13 14:25:20 +110090func NewGoTest_KIND(x GoTest_KIND) *GoTest_KIND {
91 e := GoTest_KIND(x)
92 return &e
93}
David Symondsefeca9a2012-05-08 10:36:04 +100094func (x GoTest_KIND) Enum() *GoTest_KIND {
95 p := new(GoTest_KIND)
96 *p = x
97 return p
98}
Rob Pikeb7907bf2012-02-13 14:25:20 +110099func (x GoTest_KIND) String() string {
100 return proto.EnumName(GoTest_KIND_name, int32(x))
101}
102
103type MyMessage_Color int32
104
105const (
106 MyMessage_RED MyMessage_Color = 0
107 MyMessage_GREEN MyMessage_Color = 1
108 MyMessage_BLUE MyMessage_Color = 2
109)
110
111var MyMessage_Color_name = map[int32]string{
112 0: "RED",
113 1: "GREEN",
114 2: "BLUE",
115}
116var MyMessage_Color_value = map[string]int32{
117 "RED": 0,
118 "GREEN": 1,
119 "BLUE": 2,
120}
121
David Symondsefeca9a2012-05-08 10:36:04 +1000122// NewMyMessage_Color is deprecated. Use x.Enum() instead.
Rob Pikeb7907bf2012-02-13 14:25:20 +1100123func NewMyMessage_Color(x MyMessage_Color) *MyMessage_Color {
124 e := MyMessage_Color(x)
125 return &e
126}
David Symondsefeca9a2012-05-08 10:36:04 +1000127func (x MyMessage_Color) Enum() *MyMessage_Color {
128 p := new(MyMessage_Color)
129 *p = x
130 return p
131}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100132func (x MyMessage_Color) String() string {
133 return proto.EnumName(MyMessage_Color_name, int32(x))
134}
135
136type Defaults_Color int32
137
138const (
139 Defaults_RED Defaults_Color = 0
140 Defaults_GREEN Defaults_Color = 1
141 Defaults_BLUE Defaults_Color = 2
142)
143
144var Defaults_Color_name = map[int32]string{
145 0: "RED",
146 1: "GREEN",
147 2: "BLUE",
148}
149var Defaults_Color_value = map[string]int32{
150 "RED": 0,
151 "GREEN": 1,
152 "BLUE": 2,
153}
154
David Symondsefeca9a2012-05-08 10:36:04 +1000155// NewDefaults_Color is deprecated. Use x.Enum() instead.
Rob Pikeb7907bf2012-02-13 14:25:20 +1100156func NewDefaults_Color(x Defaults_Color) *Defaults_Color {
157 e := Defaults_Color(x)
158 return &e
159}
David Symondsefeca9a2012-05-08 10:36:04 +1000160func (x Defaults_Color) Enum() *Defaults_Color {
161 p := new(Defaults_Color)
162 *p = x
163 return p
164}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100165func (x Defaults_Color) String() string {
166 return proto.EnumName(Defaults_Color_name, int32(x))
167}
168
169type RepeatedEnum_Color int32
170
171const (
172 RepeatedEnum_RED RepeatedEnum_Color = 1
173)
174
175var RepeatedEnum_Color_name = map[int32]string{
176 1: "RED",
177}
178var RepeatedEnum_Color_value = map[string]int32{
179 "RED": 1,
180}
181
David Symondsefeca9a2012-05-08 10:36:04 +1000182// NewRepeatedEnum_Color is deprecated. Use x.Enum() instead.
Rob Pikeb7907bf2012-02-13 14:25:20 +1100183func NewRepeatedEnum_Color(x RepeatedEnum_Color) *RepeatedEnum_Color {
184 e := RepeatedEnum_Color(x)
185 return &e
186}
David Symondsefeca9a2012-05-08 10:36:04 +1000187func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
188 p := new(RepeatedEnum_Color)
189 *p = x
190 return p
191}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100192func (x RepeatedEnum_Color) String() string {
193 return proto.EnumName(RepeatedEnum_Color_name, int32(x))
194}
195
196type GoEnum struct {
197 Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000198 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100199}
200
201func (this *GoEnum) Reset() { *this = GoEnum{} }
202func (this *GoEnum) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000203func (*GoEnum) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100204
205type GoTestField struct {
206 Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"`
207 Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000208 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100209}
210
211func (this *GoTestField) Reset() { *this = GoTestField{} }
212func (this *GoTestField) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000213func (*GoTestField) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100214
215type GoTest struct {
216 Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
217 Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"`
218 Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"`
219 RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"`
220 RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"`
221 OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"`
222 F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"`
223 F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"`
224 F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"`
225 F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"`
226 F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"`
227 F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"`
228 F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"`
229 F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"`
230 F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"`
231 F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"`
232 F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"`
233 F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"`
234 F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"`
235 F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"`
236 F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"`
237 F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"`
238 F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"`
239 F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"`
240 F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"`
241 F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"`
242 F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"`
243 F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"`
244 F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"`
245 F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"`
246 F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"`
247 F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"`
248 F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"`
249 F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"`
250 F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"`
251 F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"`
252 F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"`
253 F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"`
254 F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"`
255 F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"`
256 F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"`
257 F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"`
258 F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"`
259 F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"`
260 F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"`
261 F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"`
262 F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
263 F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
264 F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
265 F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
266 F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
267 F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
268 F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"`
269 F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"`
270 F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
271 F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
272 F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
273 F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
274 F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"`
275 F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"`
276 F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"`
277 F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"`
278 F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"`
279 F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"`
280 F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"`
281 F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"`
282 F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"`
283 F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"`
284 F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"`
285 Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"`
286 Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"`
287 Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000288 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100289}
290
291func (this *GoTest) Reset() { *this = GoTest{} }
292func (this *GoTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000293func (*GoTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100294
295const Default_GoTest_F_BoolDefaulted bool = true
296const Default_GoTest_F_Int32Defaulted int32 = 32
297const Default_GoTest_F_Int64Defaulted int64 = 64
298const Default_GoTest_F_Fixed32Defaulted uint32 = 320
299const Default_GoTest_F_Fixed64Defaulted uint64 = 640
300const Default_GoTest_F_Uint32Defaulted uint32 = 3200
301const Default_GoTest_F_Uint64Defaulted uint64 = 6400
302const Default_GoTest_F_FloatDefaulted float32 = 314159
303const Default_GoTest_F_DoubleDefaulted float64 = 271828
304const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
305
306var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
307
308const Default_GoTest_F_Sint32Defaulted int32 = -32
309const Default_GoTest_F_Sint64Defaulted int64 = -64
310
311type GoTest_RequiredGroup struct {
312 RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000313 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100314}
315
316func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
317func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000318func (*GoTest_RequiredGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100319
320type GoTest_RepeatedGroup struct {
321 RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000322 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100323}
324
325func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
326func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000327func (*GoTest_RepeatedGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100328
329type GoTest_OptionalGroup struct {
330 RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000331 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100332}
333
334func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
335func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000336func (*GoTest_OptionalGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100337
338type GoSkipTest struct {
339 SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"`
340 SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"`
341 SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"`
342 SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"`
343 Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000344 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100345}
346
347func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
348func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000349func (*GoSkipTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100350
351type GoSkipTest_SkipGroup struct {
352 GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"`
353 GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000354 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100355}
356
357func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
358func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000359func (*GoSkipTest_SkipGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100360
361type NonPackedTest struct {
362 A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000363 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100364}
365
366func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
367func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000368func (*NonPackedTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100369
370type PackedTest struct {
371 B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000372 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100373}
374
375func (this *PackedTest) Reset() { *this = PackedTest{} }
376func (this *PackedTest) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000377func (*PackedTest) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100378
379type MaxTag struct {
380 LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000381 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100382}
383
384func (this *MaxTag) Reset() { *this = MaxTag{} }
385func (this *MaxTag) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000386func (*MaxTag) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100387
388type InnerMessage struct {
389 Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
390 Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
391 Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000392 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100393}
394
395func (this *InnerMessage) Reset() { *this = InnerMessage{} }
396func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000397func (*InnerMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100398
399const Default_InnerMessage_Port int32 = 4000
400
401type OtherMessage struct {
402 Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
403 Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
404 Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
405 Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000406 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100407}
408
409func (this *OtherMessage) Reset() { *this = OtherMessage{} }
410func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000411func (*OtherMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100412
413type MyMessage struct {
414 Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
415 Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
416 Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
417 Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
418 Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
419 Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
420 Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
421 Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"`
422 RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000423 XXX_extensions map[int32]proto.Extension `json:"-"`
424 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100425}
426
427func (this *MyMessage) Reset() { *this = MyMessage{} }
428func (this *MyMessage) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000429func (*MyMessage) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100430
431var extRange_MyMessage = []proto.ExtensionRange{
432 {100, 536870911},
433}
434
435func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
436 return extRange_MyMessage
437}
438func (this *MyMessage) ExtensionMap() map[int32]proto.Extension {
439 if this.XXX_extensions == nil {
440 this.XXX_extensions = make(map[int32]proto.Extension)
441 }
442 return this.XXX_extensions
443}
444
445type MyMessage_SomeGroup struct {
446 GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000447 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100448}
449
450func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
451func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000452func (*MyMessage_SomeGroup) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100453
454type Ext struct {
455 Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000456 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100457}
458
459func (this *Ext) Reset() { *this = Ext{} }
460func (this *Ext) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000461func (*Ext) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100462
463var E_Ext_More = &proto.ExtensionDesc{
464 ExtendedType: (*MyMessage)(nil),
465 ExtensionType: (*Ext)(nil),
466 Field: 103,
467 Name: "testdata.Ext.more",
468 Tag: "bytes,103,opt,name=more",
469}
470
471var E_Ext_Text = &proto.ExtensionDesc{
472 ExtendedType: (*MyMessage)(nil),
473 ExtensionType: (*string)(nil),
474 Field: 104,
475 Name: "testdata.Ext.text",
476 Tag: "bytes,104,opt,name=text",
477}
478
479var E_Ext_Number = &proto.ExtensionDesc{
480 ExtendedType: (*MyMessage)(nil),
481 ExtensionType: (*int32)(nil),
482 Field: 105,
483 Name: "testdata.Ext.number",
484 Tag: "varint,105,opt,name=number",
485}
486
487type MessageList struct {
488 Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000489 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100490}
491
492func (this *MessageList) Reset() { *this = MessageList{} }
493func (this *MessageList) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000494func (*MessageList) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100495
496type MessageList_Message struct {
497 Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
498 Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000499 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100500}
501
502func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
503func (this *MessageList_Message) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000504func (*MessageList_Message) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100505
506type Strings struct {
507 StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"`
508 BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000509 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100510}
511
512func (this *Strings) Reset() { *this = Strings{} }
513func (this *Strings) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000514func (*Strings) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100515
516type Defaults struct {
517 F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"`
518 F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"`
519 F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"`
520 F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"`
521 F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"`
522 F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"`
523 F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"`
524 F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"`
525 F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"`
526 F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"`
527 F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"`
528 F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"`
529 F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"`
530 F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
531 F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"`
532 F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"`
533 F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"`
534 Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000535 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100536}
537
538func (this *Defaults) Reset() { *this = Defaults{} }
539func (this *Defaults) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000540func (*Defaults) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100541
542const Default_Defaults_F_Bool bool = true
543const Default_Defaults_F_Int32 int32 = 32
544const Default_Defaults_F_Int64 int64 = 64
545const Default_Defaults_F_Fixed32 uint32 = 320
546const Default_Defaults_F_Fixed64 uint64 = 640
547const Default_Defaults_F_Uint32 uint32 = 3200
548const Default_Defaults_F_Uint64 uint64 = 6400
549const Default_Defaults_F_Float float32 = 314159
550const Default_Defaults_F_Double float64 = 271828
551const Default_Defaults_F_String string = "hello, \"world!\"\n"
552
553var Default_Defaults_F_Bytes []byte = []byte("Bignose")
554
555const Default_Defaults_F_Sint32 int32 = -32
556const Default_Defaults_F_Sint64 int64 = -64
557const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
558
559var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
560var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
561var Default_Defaults_F_Nan float32 = float32(math.NaN())
562
563type SubDefaults struct {
564 N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000565 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100566}
567
568func (this *SubDefaults) Reset() { *this = SubDefaults{} }
569func (this *SubDefaults) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000570func (*SubDefaults) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100571
572const Default_SubDefaults_N int64 = 7
573
574type RepeatedEnum struct {
575 Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
David Symonds61826da2012-05-05 09:31:28 +1000576 XXX_unrecognized []byte `json:"-"`
Rob Pikeb7907bf2012-02-13 14:25:20 +1100577}
578
579func (this *RepeatedEnum) Reset() { *this = RepeatedEnum{} }
580func (this *RepeatedEnum) String() string { return proto.CompactTextString(this) }
David Symonds9f60f432012-06-14 09:45:25 +1000581func (*RepeatedEnum) ProtoMessage() {}
Rob Pikeb7907bf2012-02-13 14:25:20 +1100582
David Symonds61826da2012-05-05 09:31:28 +1000583var E_Greeting = &proto.ExtensionDesc{
584 ExtendedType: (*MyMessage)(nil),
585 ExtensionType: ([]string)(nil),
586 Field: 106,
587 Name: "testdata.greeting",
588 Tag: "bytes,106,rep,name=greeting",
589}
590
Rob Pikeb7907bf2012-02-13 14:25:20 +1100591func init() {
592 proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
593 proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
594 proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
595 proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
596 proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
597 proto.RegisterExtension(E_Ext_More)
598 proto.RegisterExtension(E_Ext_Text)
599 proto.RegisterExtension(E_Ext_Number)
David Symonds61826da2012-05-05 09:31:28 +1000600 proto.RegisterExtension(E_Greeting)
Rob Pikeb7907bf2012-02-13 14:25:20 +1100601}