blob: 5a325258729065d39855ccda75028838863c8a31 [file] [log] [blame]
Damien Neil46abb572018-09-07 12:45:37 -07001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: proto2/enum.proto
3
4package proto2
5
6import proto "github.com/golang/protobuf/proto"
7
Damien Neild4127922018-09-12 11:13:49 -07008// This is a compile-time assertion to ensure that this generated file
9// is compatible with the proto package it is being compiled against.
10// A compilation error at this line likely means your copy of the
11// proto package needs to be updated.
12const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
13
Damien Neil46abb572018-09-07 12:45:37 -070014// EnumType1 comment.
15type EnumType1 int32
16
17const (
18 // EnumType1_ONE comment.
19 EnumType1_ONE EnumType1 = 1
20 // EnumType1_TWO comment.
21 EnumType1_TWO EnumType1 = 2
22)
23
24var EnumType1_name = map[int32]string{
25 1: "ONE",
26 2: "TWO",
27}
28
29var EnumType1_value = map[string]int32{
30 "ONE": 1,
31 "TWO": 2,
32}
33
34func (x EnumType1) Enum() *EnumType1 {
35 p := new(EnumType1)
36 *p = x
37 return p
38}
39
40func (x EnumType1) String() string {
41 return proto.EnumName(EnumType1_name, int32(x))
42}
43
44func (x *EnumType1) UnmarshalJSON(data []byte) error {
45 value, err := proto.UnmarshalJSONEnum(EnumType1_value, data, "EnumType1")
46 if err != nil {
47 return err
48 }
49 *x = EnumType1(value)
50 return nil
51}
52
53func (EnumType1) EnumDescriptor() ([]byte, []int) {
54 return fileDescriptor_de9f68860d540858, []int{0}
55}
56
57type EnumType2 int32
58
59const (
60 EnumType2_duplicate1 EnumType2 = 1
61 EnumType2_duplicate2 EnumType2 = 1
62)
63
64var EnumType2_name = map[int32]string{
65 1: "duplicate1",
66 // Duplicate value: 1: "duplicate2",
67}
68
69var EnumType2_value = map[string]int32{
70 "duplicate1": 1,
71 "duplicate2": 1,
72}
73
74func (x EnumType2) Enum() *EnumType2 {
75 p := new(EnumType2)
76 *p = x
77 return p
78}
79
80func (x EnumType2) String() string {
81 return proto.EnumName(EnumType2_name, int32(x))
82}
83
84func (x *EnumType2) UnmarshalJSON(data []byte) error {
85 value, err := proto.UnmarshalJSONEnum(EnumType2_value, data, "EnumType2")
86 if err != nil {
87 return err
88 }
89 *x = EnumType2(value)
90 return nil
91}
92
93func (EnumType2) EnumDescriptor() ([]byte, []int) {
94 return fileDescriptor_de9f68860d540858, []int{1}
95}
96
97// NestedEnumType1A comment.
98type EnumContainerMessage1_NestedEnumType1A int32
99
100const (
101 // NestedEnumType1A_VALUE comment.
102 EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
103)
104
105var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
106 0: "NESTED_1A_VALUE",
107}
108
109var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{
110 "NESTED_1A_VALUE": 0,
111}
112
113func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A {
114 p := new(EnumContainerMessage1_NestedEnumType1A)
115 *p = x
116 return p
117}
118
119func (x EnumContainerMessage1_NestedEnumType1A) String() string {
120 return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x))
121}
122
123func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(data []byte) error {
124 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1A_value, data, "EnumContainerMessage1_NestedEnumType1A")
125 if err != nil {
126 return err
127 }
128 *x = EnumContainerMessage1_NestedEnumType1A(value)
129 return nil
130}
131
132func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) {
133 return fileDescriptor_de9f68860d540858, []int{0, 0}
134}
135
136type EnumContainerMessage1_NestedEnumType1B int32
137
138const (
139 EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
140)
141
142var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
143 0: "NESTED_1B_VALUE",
144}
145
146var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{
147 "NESTED_1B_VALUE": 0,
148}
149
150func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B {
151 p := new(EnumContainerMessage1_NestedEnumType1B)
152 *p = x
153 return p
154}
155
156func (x EnumContainerMessage1_NestedEnumType1B) String() string {
157 return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x))
158}
159
160func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(data []byte) error {
161 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1B_value, data, "EnumContainerMessage1_NestedEnumType1B")
162 if err != nil {
163 return err
164 }
165 *x = EnumContainerMessage1_NestedEnumType1B(value)
166 return nil
167}
168
169func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) {
170 return fileDescriptor_de9f68860d540858, []int{0, 1}
171}
172
173type EnumContainerMessage1 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700174 XXX_NoUnkeyedLiteral struct{} `json:"-"`
175 XXX_unrecognized []byte `json:"-"`
176 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700177}
178
Damien Neila1c6abc2018-09-12 13:36:34 -0700179func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} }
180func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) }
181func (*EnumContainerMessage1) ProtoMessage() {}
182func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
183 return fileDescriptor_de9f68860d540858, []int{0}
184}
185func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error {
186 return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b)
187}
188func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
189 return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic)
190}
191func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) {
192 xxx_messageInfo_EnumContainerMessage1.Merge(m, src)
193}
194func (m *EnumContainerMessage1) XXX_Size() int {
195 return xxx_messageInfo_EnumContainerMessage1.Size(m)
196}
197func (m *EnumContainerMessage1) XXX_DiscardUnknown() {
198 xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m)
199}
200
201var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo
202
Damien Neil46abb572018-09-07 12:45:37 -0700203// NestedEnumType2A comment.
204type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
205
206const (
207 // NestedEnumType2A_VALUE comment.
208 EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
209)
210
211var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
212 0: "NESTED_2A_VALUE",
213}
214
215var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
216 "NESTED_2A_VALUE": 0,
217}
218
219func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
220 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
221 *p = x
222 return p
223}
224
225func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
226 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x))
227}
228
229func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error {
230 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A")
231 if err != nil {
232 return err
233 }
234 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value)
235 return nil
236}
237
238func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
239 return fileDescriptor_de9f68860d540858, []int{0, 0, 0}
240}
241
242type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
243
244const (
245 EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
246)
247
248var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
249 0: "NESTED_2B_VALUE",
250}
251
252var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
253 "NESTED_2B_VALUE": 0,
254}
255
256func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
257 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
258 *p = x
259 return p
260}
261
262func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
263 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x))
264}
265
266func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error {
267 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B")
268 if err != nil {
269 return err
270 }
271 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value)
272 return nil
273}
274
275func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
276 return fileDescriptor_de9f68860d540858, []int{0, 0, 1}
277}
278
279type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700280 XXX_NoUnkeyedLiteral struct{} `json:"-"`
281 XXX_unrecognized []byte `json:"-"`
282 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700283}
284
Damien Neila1c6abc2018-09-12 13:36:34 -0700285func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() {
286 *m = EnumContainerMessage1_EnumContainerMessage2{}
287}
288func (m *EnumContainerMessage1_EnumContainerMessage2) String() string {
289 return proto.CompactTextString(m)
290}
291func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
292func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
293 return fileDescriptor_de9f68860d540858, []int{0, 0}
294}
295func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error {
296 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b)
297}
298func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
299 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic)
300}
301func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) {
302 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src)
303}
304func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int {
305 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m)
306}
307func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() {
308 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m)
309}
310
311var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo
312
Damien Neil46abb572018-09-07 12:45:37 -0700313func init() {
314 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
315 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
316 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
317 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
318 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
319 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
320}
321
322func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
323
324var fileDescriptor_de9f68860d540858 = []byte{
325 // 242 bytes of a gzipped FileDescriptorProto
326 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
327 0x14, 0xc6, 0xcd, 0x39, 0x88, 0x19, 0x34, 0x56, 0x6e, 0x39, 0x70, 0xb9, 0x45, 0x38, 0xb8, 0x86,
328 0x64, 0x13, 0xa7, 0x56, 0xb3, 0x69, 0x6f, 0xb0, 0x2a, 0xb8, 0x1c, 0xa1, 0x7d, 0x3c, 0x0a, 0x6d,
329 0x5e, 0x69, 0xd3, 0xc1, 0xff, 0xd3, 0x3f, 0x48, 0xae, 0x81, 0xb3, 0x42, 0x75, 0xca, 0xf7, 0xe5,
330 0xfb, 0xf1, 0x1b, 0x1e, 0xbf, 0x6a, 0x3b, 0xf2, 0xa4, 0x25, 0xb8, 0xa1, 0x89, 0xc7, 0x1c, 0x2d,
331 0x91, 0xc6, 0x10, 0x6a, 0x11, 0x1e, 0xbd, 0xfe, 0x62, 0x7c, 0x69, 0xdc, 0xd0, 0x3c, 0x90, 0xf3,
332 0xb6, 0x72, 0xd0, 0x3d, 0x43, 0xdf, 0x5b, 0x04, 0xb5, 0xaa, 0xe6, 0x07, 0xbd, 0xbe, 0xe5, 0x22,
333 0x83, 0xde, 0x43, 0x79, 0x98, 0xf3, 0xcf, 0x16, 0x74, 0x12, 0x5d, 0xf3, 0xcb, 0xcc, 0xbc, 0xe4,
334 0xe6, 0x71, 0xaf, 0x93, 0xfd, 0x5b, 0xf2, 0xf4, 0x6a, 0xc4, 0xc9, 0x0c, 0x98, 0x4e, 0xc1, 0xf4,
335 0x6f, 0x50, 0x4d, 0x8d, 0xea, 0x1f, 0xa3, 0x9a, 0x1a, 0xd5, 0xd1, 0xb8, 0xb9, 0xe1, 0xe7, 0x47,
336 0x24, 0x3a, 0xe3, 0xa7, 0xbb, 0xcc, 0x08, 0x76, 0x08, 0xf9, 0xfb, 0x4e, 0x2c, 0x36, 0xf2, 0x67,
337 0xd6, 0xd1, 0x05, 0xe7, 0xe5, 0xd0, 0xd6, 0x55, 0x61, 0x3d, 0x28, 0xc1, 0x7e, 0x75, 0x2d, 0xd8,
338 0x6a, 0x21, 0x58, 0x7a, 0xff, 0x71, 0x87, 0x44, 0x58, 0x43, 0x8c, 0x54, 0x5b, 0x87, 0x31, 0x75,
339 0x28, 0xc7, 0x13, 0xca, 0xa2, 0x29, 0x43, 0x2a, 0xb6, 0x08, 0x6e, 0x8b, 0x24, 0x3d, 0xf4, 0xbe,
340 0xb4, 0xde, 0x86, 0x6f, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x53, 0xf7, 0xde, 0x8e, 0x01,
341 0x00, 0x00,
342}