blob: 23c1f0e960c318baf314d65bad9a339dc96afd5d [file] [log] [blame]
Rob Pikeaaa3a622010-03-20 22:32:34 -07001// Code generated by protoc-gen-go from "test.proto"
2// DO NOT EDIT!
3
4package test_proto
5
Rob Pikeab5b8022010-06-21 17:47:58 -07006import proto "goprotobuf.googlecode.com/hg/proto"
7
8// Reference proto import to suppress error if it's not otherwise used.
9var _ = proto.GetString
Rob Pikeaaa3a622010-03-20 22:32:34 -070010
11type FOO int32
12const (
13 FOO_FOO1 = 1
14)
15var FOO_name = map[int32] string {
16 1: "FOO1",
17}
18var FOO_value = map[string] int32 {
19 "FOO1": 1,
20}
21func NewFOO(x int32) *FOO {
22 e := FOO(x)
23 return &e
24}
25
26type GoTest_KIND int32
27const (
28 GoTest_VOID = 0
29 GoTest_BOOL = 1
30 GoTest_BYTES = 2
31 GoTest_FINGERPRINT = 3
32 GoTest_FLOAT = 4
33 GoTest_INT = 5
34 GoTest_STRING = 6
35 GoTest_TIME = 7
36 GoTest_TUPLE = 8
37 GoTest_ARRAY = 9
38 GoTest_MAP = 10
39 GoTest_TABLE = 11
40 GoTest_FUNCTION = 12
41)
42var GoTest_KIND_name = map[int32] string {
43 0: "VOID",
44 1: "BOOL",
45 2: "BYTES",
46 3: "FINGERPRINT",
47 4: "FLOAT",
48 5: "INT",
49 6: "STRING",
50 7: "TIME",
51 8: "TUPLE",
52 9: "ARRAY",
53 10: "MAP",
54 11: "TABLE",
55 12: "FUNCTION",
56}
57var GoTest_KIND_value = map[string] int32 {
58 "VOID": 0,
59 "BOOL": 1,
60 "BYTES": 2,
61 "FINGERPRINT": 3,
62 "FLOAT": 4,
63 "INT": 5,
64 "STRING": 6,
65 "TIME": 7,
66 "TUPLE": 8,
67 "ARRAY": 9,
68 "MAP": 10,
69 "TABLE": 11,
70 "FUNCTION": 12,
71}
72func NewGoTest_KIND(x int32) *GoTest_KIND {
73 e := GoTest_KIND(x)
74 return &e
75}
76
77type MyMessage_Color int32
78const (
79 MyMessage_RED = 0
80 MyMessage_GREEN = 1
81 MyMessage_BLUE = 2
82)
83var MyMessage_Color_name = map[int32] string {
84 0: "RED",
85 1: "GREEN",
86 2: "BLUE",
87}
88var MyMessage_Color_value = map[string] int32 {
89 "RED": 0,
90 "GREEN": 1,
91 "BLUE": 2,
92}
93func NewMyMessage_Color(x int32) *MyMessage_Color {
94 e := MyMessage_Color(x)
95 return &e
96}
97
98type GoEnum struct {
99 Foo *FOO "PB(varint,1,req,name=foo,enum=test_proto.FOO)"
100 XXX_unrecognized []byte
101}
102func (this *GoEnum) Reset() {
103 *this = GoEnum{}
104}
105func NewGoEnum() *GoEnum {
106 return new(GoEnum)
107}
108
109type GoTestField struct {
110 Label *string "PB(bytes,1,req)"
111 Type *string "PB(bytes,2,req)"
112 XXX_unrecognized []byte
113}
114func (this *GoTestField) Reset() {
115 *this = GoTestField{}
116}
117func NewGoTestField() *GoTestField {
118 return new(GoTestField)
119}
120
121type GoTest struct {
122 Kind *int32 "PB(varint,1,req)"
123 Table *string "PB(bytes,2,opt)"
124 Param *int32 "PB(varint,3,opt)"
125 RequiredField *GoTestField "PB(bytes,4,req)"
126 RepeatedField []*GoTestField "PB(bytes,5,rep)"
127 OptionalField *GoTestField "PB(bytes,6,opt)"
128 F_BoolRequired *bool "PB(varint,10,req,name=F_Bool_required)"
129 F_Int32Required *int32 "PB(varint,11,req,name=F_Int32_required)"
130 F_Int64Required *int64 "PB(varint,12,req,name=F_Int64_required)"
131 F_Fixed32Required *uint32 "PB(fixed32,13,req,name=F_Fixed32_required)"
132 F_Fixed64Required *uint64 "PB(fixed64,14,req,name=F_Fixed64_required)"
133 F_Uint32Required *uint32 "PB(varint,15,req,name=F_Uint32_required)"
134 F_Uint64Required *uint64 "PB(varint,16,req,name=F_Uint64_required)"
135 F_FloatRequired *float32 "PB(fixed32,17,req,name=F_Float_required)"
136 F_DoubleRequired *float64 "PB(fixed64,18,req,name=F_Double_required)"
137 F_StringRequired *string "PB(bytes,19,req,name=F_String_required)"
138 F_BytesRequired []byte "PB(bytes,101,req,name=F_Bytes_required)"
139 F_Sint32Required *int32 "PB(zigzag32,102,req,name=F_Sint32_required)"
140 F_Sint64Required *int64 "PB(zigzag64,103,req,name=F_Sint64_required)"
141 F_BoolRepeated []bool "PB(varint,20,rep,name=F_Bool_repeated)"
142 F_Int32Repeated []int32 "PB(varint,21,rep,name=F_Int32_repeated)"
143 F_Int64Repeated []int64 "PB(varint,22,rep,name=F_Int64_repeated)"
144 F_Fixed32Repeated []uint32 "PB(fixed32,23,rep,name=F_Fixed32_repeated)"
145 F_Fixed64Repeated []uint64 "PB(fixed64,24,rep,name=F_Fixed64_repeated)"
146 F_Uint32Repeated []uint32 "PB(varint,25,rep,name=F_Uint32_repeated)"
147 F_Uint64Repeated []uint64 "PB(varint,26,rep,name=F_Uint64_repeated)"
148 F_FloatRepeated []float32 "PB(fixed32,27,rep,name=F_Float_repeated)"
149 F_DoubleRepeated []float64 "PB(fixed64,28,rep,name=F_Double_repeated)"
150 F_StringRepeated []string "PB(bytes,29,rep,name=F_String_repeated)"
151 F_BytesRepeated [][]byte "PB(bytes,201,rep,name=F_Bytes_repeated)"
152 F_Sint32Repeated []int32 "PB(zigzag32,202,rep,name=F_Sint32_repeated)"
153 F_Sint64Repeated []int64 "PB(zigzag64,203,rep,name=F_Sint64_repeated)"
154 F_BoolOptional *bool "PB(varint,30,opt,name=F_Bool_optional)"
155 F_Int32Optional *int32 "PB(varint,31,opt,name=F_Int32_optional)"
156 F_Int64Optional *int64 "PB(varint,32,opt,name=F_Int64_optional)"
157 F_Fixed32Optional *uint32 "PB(fixed32,33,opt,name=F_Fixed32_optional)"
158 F_Fixed64Optional *uint64 "PB(fixed64,34,opt,name=F_Fixed64_optional)"
159 F_Uint32Optional *uint32 "PB(varint,35,opt,name=F_Uint32_optional)"
160 F_Uint64Optional *uint64 "PB(varint,36,opt,name=F_Uint64_optional)"
161 F_FloatOptional *float32 "PB(fixed32,37,opt,name=F_Float_optional)"
162 F_DoubleOptional *float64 "PB(fixed64,38,opt,name=F_Double_optional)"
163 F_StringOptional *string "PB(bytes,39,opt,name=F_String_optional)"
164 F_BytesOptional []byte "PB(bytes,301,opt,name=F_Bytes_optional)"
165 F_Sint32Optional *int32 "PB(zigzag32,302,opt,name=F_Sint32_optional)"
166 F_Sint64Optional *int64 "PB(zigzag64,303,opt,name=F_Sint64_optional)"
167 F_BoolDefaulted *bool "PB(varint,40,opt,name=F_Bool_defaulted,def=1)"
168 F_Int32Defaulted *int32 "PB(varint,41,opt,name=F_Int32_defaulted,def=32)"
169 F_Int64Defaulted *int64 "PB(varint,42,opt,name=F_Int64_defaulted,def=64)"
170 F_Fixed32Defaulted *uint32 "PB(fixed32,43,opt,name=F_Fixed32_defaulted,def=320)"
171 F_Fixed64Defaulted *uint64 "PB(fixed64,44,opt,name=F_Fixed64_defaulted,def=640)"
172 F_Uint32Defaulted *uint32 "PB(varint,45,opt,name=F_Uint32_defaulted,def=3200)"
173 F_Uint64Defaulted *uint64 "PB(varint,46,opt,name=F_Uint64_defaulted,def=6400)"
174 F_FloatDefaulted *float32 "PB(fixed32,47,opt,name=F_Float_defaulted,def=314159)"
175 F_DoubleDefaulted *float64 "PB(fixed64,48,opt,name=F_Double_defaulted,def=271828)"
176 F_StringDefaulted *string "PB(bytes,49,opt,name=F_String_defaulted,def=hello, \\\"world!\\\"\\n)"
177 F_BytesDefaulted []byte "PB(bytes,401,opt,name=F_Bytes_defaulted,def=Bignose)"
178 F_Sint32Defaulted *int32 "PB(zigzag32,402,opt,name=F_Sint32_defaulted,def=-32)"
179 F_Sint64Defaulted *int64 "PB(zigzag64,403,opt,name=F_Sint64_defaulted,def=-64)"
180 Requiredgroup *GoTest_RequiredGroup "PB(group,70,req,name=requiredgroup)"
181 Repeatedgroup []*GoTest_RepeatedGroup "PB(group,80,rep,name=repeatedgroup)"
182 Optionalgroup *GoTest_OptionalGroup "PB(group,90,opt,name=optionalgroup)"
183 XXX_unrecognized []byte
184}
185func (this *GoTest) Reset() {
186 *this = GoTest{}
187}
188func NewGoTest() *GoTest {
189 return new(GoTest)
190}
191const Default_GoTest_F_BoolDefaulted bool = true
192const Default_GoTest_F_Int32Defaulted int32 = 32
193const Default_GoTest_F_Int64Defaulted int64 = 64
194const Default_GoTest_F_Fixed32Defaulted uint32 = 320
195const Default_GoTest_F_Fixed64Defaulted uint64 = 640
196const Default_GoTest_F_Uint32Defaulted uint32 = 3200
197const Default_GoTest_F_Uint64Defaulted uint64 = 6400
198const Default_GoTest_F_FloatDefaulted float32 = 314159
199const Default_GoTest_F_DoubleDefaulted float64 = 271828
200const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
201var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
202const Default_GoTest_F_Sint32Defaulted int32 = -32
203const Default_GoTest_F_Sint64Defaulted int64 = -64
204
205type GoTest_RequiredGroup struct {
206 RequiredField *string "PB(bytes,71,req)"
207 XXX_unrecognized []byte
208}
209func (this *GoTest_RequiredGroup) Reset() {
210 *this = GoTest_RequiredGroup{}
211}
212func NewGoTest_RequiredGroup() *GoTest_RequiredGroup {
213 return new(GoTest_RequiredGroup)
214}
215
216type GoTest_RepeatedGroup struct {
217 RequiredField *string "PB(bytes,81,req)"
218 XXX_unrecognized []byte
219}
220func (this *GoTest_RepeatedGroup) Reset() {
221 *this = GoTest_RepeatedGroup{}
222}
223func NewGoTest_RepeatedGroup() *GoTest_RepeatedGroup {
224 return new(GoTest_RepeatedGroup)
225}
226
227type GoTest_OptionalGroup struct {
228 RequiredField *string "PB(bytes,91,req)"
229 XXX_unrecognized []byte
230}
231func (this *GoTest_OptionalGroup) Reset() {
232 *this = GoTest_OptionalGroup{}
233}
234func NewGoTest_OptionalGroup() *GoTest_OptionalGroup {
235 return new(GoTest_OptionalGroup)
236}
237
238type GoSkipTest struct {
239 SkipInt32 *int32 "PB(varint,11,req,name=skip_int32)"
240 SkipFixed32 *uint32 "PB(fixed32,12,req,name=skip_fixed32)"
241 SkipFixed64 *uint64 "PB(fixed64,13,req,name=skip_fixed64)"
242 SkipString *string "PB(bytes,14,req,name=skip_string)"
243 Skipgroup *GoSkipTest_SkipGroup "PB(group,15,req,name=skipgroup)"
244 XXX_unrecognized []byte
245}
246func (this *GoSkipTest) Reset() {
247 *this = GoSkipTest{}
248}
249func NewGoSkipTest() *GoSkipTest {
250 return new(GoSkipTest)
251}
252
253type GoSkipTest_SkipGroup struct {
254 GroupInt32 *int32 "PB(varint,16,req,name=group_int32)"
255 GroupString *string "PB(bytes,17,req,name=group_string)"
256 XXX_unrecognized []byte
257}
258func (this *GoSkipTest_SkipGroup) Reset() {
259 *this = GoSkipTest_SkipGroup{}
260}
261func NewGoSkipTest_SkipGroup() *GoSkipTest_SkipGroup {
262 return new(GoSkipTest_SkipGroup)
263}
264
265type InnerMessage struct {
266 Host *string "PB(bytes,1,req,name=host)"
267 Port *int32 "PB(varint,2,opt,name=port,def=4000)"
268 Connected *bool "PB(varint,3,opt,name=connected)"
269 XXX_unrecognized []byte
270}
271func (this *InnerMessage) Reset() {
272 *this = InnerMessage{}
273}
274func NewInnerMessage() *InnerMessage {
275 return new(InnerMessage)
276}
277const Default_InnerMessage_Port int32 = 4000
278
279type OtherMessage struct {
280 Key *int64 "PB(varint,1,opt,name=key)"
281 Value []byte "PB(bytes,2,opt,name=value)"
282 Weight *float32 "PB(fixed32,3,opt,name=weight)"
283 Inner *InnerMessage "PB(bytes,4,opt,name=inner)"
284 XXX_unrecognized []byte
285}
286func (this *OtherMessage) Reset() {
287 *this = OtherMessage{}
288}
289func NewOtherMessage() *OtherMessage {
290 return new(OtherMessage)
291}
292
293type MyMessage struct {
294 Count *int32 "PB(varint,1,req,name=count)"
295 Name *string "PB(bytes,2,opt,name=name)"
296 Quote *string "PB(bytes,3,opt,name=quote)"
297 Pet []string "PB(bytes,4,rep,name=pet)"
298 Inner *InnerMessage "PB(bytes,5,opt,name=inner)"
299 Others []*OtherMessage "PB(bytes,6,rep,name=others)"
300 Bikeshed *MyMessage_Color "PB(varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color)"
301 XXX_unrecognized []byte
302}
303func (this *MyMessage) Reset() {
304 *this = MyMessage{}
305}
306func NewMyMessage() *MyMessage {
307 return new(MyMessage)
308}
309
310type MessageList struct {
311 Message []*MessageList_Message "PB(group,1,rep,name=message)"
312 XXX_unrecognized []byte
313}
314func (this *MessageList) Reset() {
315 *this = MessageList{}
316}
317func NewMessageList() *MessageList {
318 return new(MessageList)
319}
320
321type MessageList_Message struct {
322 Name *string "PB(bytes,2,req,name=name)"
323 Count *int32 "PB(varint,3,req,name=count)"
324 XXX_unrecognized []byte
325}
326func (this *MessageList_Message) Reset() {
327 *this = MessageList_Message{}
328}
329func NewMessageList_Message() *MessageList_Message {
330 return new(MessageList_Message)
331}
332
333func init() {
334 proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
335 proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
336 proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
337}