blob: 67c60a0b3f6e3ea49726402f19604b0454ebc10c [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
Damien Neil1ec33152018-09-13 13:12:36 -07006import (
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
Joe Tsaib6405bd2018-11-15 14:44:37 -08009 protoreflect "github.com/golang/protobuf/v2/reflect/protoreflect"
10 prototype "github.com/golang/protobuf/v2/reflect/prototype"
11 protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl"
Damien Neil1ec33152018-09-13 13:12:36 -070012 math "math"
13)
14
15// Reference imports to suppress errors if they are not otherwise used.
16var _ = proto.Marshal
17var _ = fmt.Errorf
18var _ = math.Inf
Damien Neil46abb572018-09-07 12:45:37 -070019
Damien Neild4127922018-09-12 11:13:49 -070020// This is a compile-time assertion to ensure that this generated file
21// is compatible with the proto package it is being compiled against.
22// A compilation error at this line likely means your copy of the
23// proto package needs to be updated.
Joe Tsaid7e97bc2018-11-26 12:57:27 -080024const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
Damien Neild4127922018-09-12 11:13:49 -070025
Damien Neil46abb572018-09-07 12:45:37 -070026// EnumType1 comment.
27type EnumType1 int32
28
29const (
30 // EnumType1_ONE comment.
31 EnumType1_ONE EnumType1 = 1
32 // EnumType1_TWO comment.
33 EnumType1_TWO EnumType1 = 2
34)
35
Joe Tsaib6405bd2018-11-15 14:44:37 -080036type xxx_EnumType1 EnumType1
37
38func (e EnumType1) ProtoReflect() protoreflect.Enum {
39 return (xxx_EnumType1)(e)
40}
41func (e xxx_EnumType1) Type() protoreflect.EnumType {
42 return xxx_Enum_ProtoFile_EnumTypes[0]
43}
44func (e xxx_EnumType1) Number() protoreflect.EnumNumber {
45 return protoreflect.EnumNumber(e)
46}
47
Damien Neil46abb572018-09-07 12:45:37 -070048var EnumType1_name = map[int32]string{
49 1: "ONE",
50 2: "TWO",
51}
52
53var EnumType1_value = map[string]int32{
54 "ONE": 1,
55 "TWO": 2,
56}
57
58func (x EnumType1) Enum() *EnumType1 {
59 p := new(EnumType1)
60 *p = x
61 return p
62}
63
64func (x EnumType1) String() string {
65 return proto.EnumName(EnumType1_name, int32(x))
66}
67
68func (x *EnumType1) UnmarshalJSON(data []byte) error {
69 value, err := proto.UnmarshalJSONEnum(EnumType1_value, data, "EnumType1")
70 if err != nil {
71 return err
72 }
73 *x = EnumType1(value)
74 return nil
75}
76
77func (EnumType1) EnumDescriptor() ([]byte, []int) {
78 return fileDescriptor_de9f68860d540858, []int{0}
79}
80
81type EnumType2 int32
82
83const (
84 EnumType2_duplicate1 EnumType2 = 1
85 EnumType2_duplicate2 EnumType2 = 1
86)
87
Joe Tsaib6405bd2018-11-15 14:44:37 -080088type xxx_EnumType2 EnumType2
89
90func (e EnumType2) ProtoReflect() protoreflect.Enum {
91 return (xxx_EnumType2)(e)
92}
93func (e xxx_EnumType2) Type() protoreflect.EnumType {
94 return xxx_Enum_ProtoFile_EnumTypes[1]
95}
96func (e xxx_EnumType2) Number() protoreflect.EnumNumber {
97 return protoreflect.EnumNumber(e)
98}
99
Damien Neil46abb572018-09-07 12:45:37 -0700100var EnumType2_name = map[int32]string{
101 1: "duplicate1",
102 // Duplicate value: 1: "duplicate2",
103}
104
105var EnumType2_value = map[string]int32{
106 "duplicate1": 1,
107 "duplicate2": 1,
108}
109
110func (x EnumType2) Enum() *EnumType2 {
111 p := new(EnumType2)
112 *p = x
113 return p
114}
115
116func (x EnumType2) String() string {
117 return proto.EnumName(EnumType2_name, int32(x))
118}
119
120func (x *EnumType2) UnmarshalJSON(data []byte) error {
121 value, err := proto.UnmarshalJSONEnum(EnumType2_value, data, "EnumType2")
122 if err != nil {
123 return err
124 }
125 *x = EnumType2(value)
126 return nil
127}
128
129func (EnumType2) EnumDescriptor() ([]byte, []int) {
130 return fileDescriptor_de9f68860d540858, []int{1}
131}
132
133// NestedEnumType1A comment.
134type EnumContainerMessage1_NestedEnumType1A int32
135
136const (
137 // NestedEnumType1A_VALUE comment.
138 EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
139)
140
Joe Tsaib6405bd2018-11-15 14:44:37 -0800141type xxx_EnumContainerMessage1_NestedEnumType1A EnumContainerMessage1_NestedEnumType1A
142
143func (e EnumContainerMessage1_NestedEnumType1A) ProtoReflect() protoreflect.Enum {
144 return (xxx_EnumContainerMessage1_NestedEnumType1A)(e)
145}
146func (e xxx_EnumContainerMessage1_NestedEnumType1A) Type() protoreflect.EnumType {
147 return xxx_Enum_ProtoFile_EnumTypes[2]
148}
149func (e xxx_EnumContainerMessage1_NestedEnumType1A) Number() protoreflect.EnumNumber {
150 return protoreflect.EnumNumber(e)
151}
152
Damien Neil46abb572018-09-07 12:45:37 -0700153var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
154 0: "NESTED_1A_VALUE",
155}
156
157var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{
158 "NESTED_1A_VALUE": 0,
159}
160
161func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A {
162 p := new(EnumContainerMessage1_NestedEnumType1A)
163 *p = x
164 return p
165}
166
167func (x EnumContainerMessage1_NestedEnumType1A) String() string {
168 return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x))
169}
170
171func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(data []byte) error {
172 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1A_value, data, "EnumContainerMessage1_NestedEnumType1A")
173 if err != nil {
174 return err
175 }
176 *x = EnumContainerMessage1_NestedEnumType1A(value)
177 return nil
178}
179
180func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) {
181 return fileDescriptor_de9f68860d540858, []int{0, 0}
182}
183
184type EnumContainerMessage1_NestedEnumType1B int32
185
186const (
187 EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
188)
189
Joe Tsaib6405bd2018-11-15 14:44:37 -0800190type xxx_EnumContainerMessage1_NestedEnumType1B EnumContainerMessage1_NestedEnumType1B
191
192func (e EnumContainerMessage1_NestedEnumType1B) ProtoReflect() protoreflect.Enum {
193 return (xxx_EnumContainerMessage1_NestedEnumType1B)(e)
194}
195func (e xxx_EnumContainerMessage1_NestedEnumType1B) Type() protoreflect.EnumType {
196 return xxx_Enum_ProtoFile_EnumTypes[3]
197}
198func (e xxx_EnumContainerMessage1_NestedEnumType1B) Number() protoreflect.EnumNumber {
199 return protoreflect.EnumNumber(e)
200}
201
Damien Neil46abb572018-09-07 12:45:37 -0700202var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
203 0: "NESTED_1B_VALUE",
204}
205
206var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{
207 "NESTED_1B_VALUE": 0,
208}
209
210func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B {
211 p := new(EnumContainerMessage1_NestedEnumType1B)
212 *p = x
213 return p
214}
215
216func (x EnumContainerMessage1_NestedEnumType1B) String() string {
217 return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x))
218}
219
220func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(data []byte) error {
221 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1B_value, data, "EnumContainerMessage1_NestedEnumType1B")
222 if err != nil {
223 return err
224 }
225 *x = EnumContainerMessage1_NestedEnumType1B(value)
226 return nil
227}
228
229func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) {
230 return fileDescriptor_de9f68860d540858, []int{0, 1}
231}
232
Damien Neil46abb572018-09-07 12:45:37 -0700233// NestedEnumType2A comment.
234type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
235
236const (
237 // NestedEnumType2A_VALUE comment.
238 EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
239)
240
Joe Tsaib6405bd2018-11-15 14:44:37 -0800241type xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A
242
243func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) ProtoReflect() protoreflect.Enum {
244 return (xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)(e)
245}
246func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Type() protoreflect.EnumType {
247 return xxx_Enum_ProtoFile_EnumTypes[4]
248}
249func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Number() protoreflect.EnumNumber {
250 return protoreflect.EnumNumber(e)
251}
252
Damien Neil46abb572018-09-07 12:45:37 -0700253var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
254 0: "NESTED_2A_VALUE",
255}
256
257var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
258 "NESTED_2A_VALUE": 0,
259}
260
261func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
262 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
263 *p = x
264 return p
265}
266
267func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
268 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x))
269}
270
271func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error {
272 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A")
273 if err != nil {
274 return err
275 }
276 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value)
277 return nil
278}
279
280func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
281 return fileDescriptor_de9f68860d540858, []int{0, 0, 0}
282}
283
284type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
285
286const (
287 EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
288)
289
Joe Tsaib6405bd2018-11-15 14:44:37 -0800290type xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B
291
292func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) ProtoReflect() protoreflect.Enum {
293 return (xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)(e)
294}
295func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Type() protoreflect.EnumType {
296 return xxx_Enum_ProtoFile_EnumTypes[5]
297}
298func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Number() protoreflect.EnumNumber {
299 return protoreflect.EnumNumber(e)
300}
301
Damien Neil46abb572018-09-07 12:45:37 -0700302var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
303 0: "NESTED_2B_VALUE",
304}
305
306var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
307 "NESTED_2B_VALUE": 0,
308}
309
310func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
311 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
312 *p = x
313 return p
314}
315
316func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
317 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x))
318}
319
320func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error {
321 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B")
322 if err != nil {
323 return err
324 }
325 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value)
326 return nil
327}
328
329func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
330 return fileDescriptor_de9f68860d540858, []int{0, 0, 1}
331}
332
Damien Neilce36f8d2018-09-13 15:19:08 -0700333type EnumContainerMessage1 struct {
Damien Neila485fbd2018-10-26 13:28:37 -0700334 DefaultDuplicate1 *EnumType2 `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate1,omitempty"`
335 DefaultDuplicate2 *EnumType2 `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate2,omitempty"`
336 XXX_NoUnkeyedLiteral struct{} `json:"-"`
337 XXX_unrecognized []byte `json:"-"`
338 XXX_sizecache int32 `json:"-"`
Damien Neilce36f8d2018-09-13 15:19:08 -0700339}
340
Joe Tsaib6405bd2018-11-15 14:44:37 -0800341type xxx_EnumContainerMessage1 struct{ m *EnumContainerMessage1 }
342
343func (m *EnumContainerMessage1) ProtoReflect() protoreflect.Message {
344 return xxx_EnumContainerMessage1{m}
345}
346func (m xxx_EnumContainerMessage1) Type() protoreflect.MessageType {
347 return xxx_Enum_ProtoFile_MessageTypes[0].Type
348}
349func (m xxx_EnumContainerMessage1) KnownFields() protoreflect.KnownFields {
350 return xxx_Enum_ProtoFile_MessageTypes[0].KnownFieldsOf(m.m)
351}
352func (m xxx_EnumContainerMessage1) UnknownFields() protoreflect.UnknownFields {
353 return xxx_Enum_ProtoFile_MessageTypes[0].UnknownFieldsOf(m.m)
354}
355func (m xxx_EnumContainerMessage1) Interface() protoreflect.ProtoMessage {
356 return m.m
357}
358func (m xxx_EnumContainerMessage1) ProtoMutable() {}
359
Damien Neilce36f8d2018-09-13 15:19:08 -0700360func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} }
361func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) }
362func (*EnumContainerMessage1) ProtoMessage() {}
363func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
364 return fileDescriptor_de9f68860d540858, []int{0}
365}
Damien Neil993c04d2018-09-14 15:41:11 -0700366
Damien Neilce36f8d2018-09-13 15:19:08 -0700367func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error {
368 return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b)
369}
370func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
371 return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic)
372}
373func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) {
374 xxx_messageInfo_EnumContainerMessage1.Merge(m, src)
375}
376func (m *EnumContainerMessage1) XXX_Size() int {
377 return xxx_messageInfo_EnumContainerMessage1.Size(m)
378}
379func (m *EnumContainerMessage1) XXX_DiscardUnknown() {
380 xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m)
381}
382
383var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo
384
Damien Neila485fbd2018-10-26 13:28:37 -0700385const Default_EnumContainerMessage1_DefaultDuplicate1 EnumType2 = EnumType2_duplicate1
386const Default_EnumContainerMessage1_DefaultDuplicate2 EnumType2 = EnumType2_duplicate2
387
388func (m *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 {
389 if m != nil && m.DefaultDuplicate1 != nil {
390 return *m.DefaultDuplicate1
391 }
392 return Default_EnumContainerMessage1_DefaultDuplicate1
393}
394
395func (m *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 {
396 if m != nil && m.DefaultDuplicate2 != nil {
397 return *m.DefaultDuplicate2
398 }
399 return Default_EnumContainerMessage1_DefaultDuplicate2
400}
401
Damien Neil46abb572018-09-07 12:45:37 -0700402type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700403 XXX_NoUnkeyedLiteral struct{} `json:"-"`
404 XXX_unrecognized []byte `json:"-"`
405 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700406}
407
Joe Tsaib6405bd2018-11-15 14:44:37 -0800408type xxx_EnumContainerMessage1_EnumContainerMessage2 struct {
409 m *EnumContainerMessage1_EnumContainerMessage2
410}
411
412func (m *EnumContainerMessage1_EnumContainerMessage2) ProtoReflect() protoreflect.Message {
413 return xxx_EnumContainerMessage1_EnumContainerMessage2{m}
414}
415func (m xxx_EnumContainerMessage1_EnumContainerMessage2) Type() protoreflect.MessageType {
416 return xxx_Enum_ProtoFile_MessageTypes[1].Type
417}
418func (m xxx_EnumContainerMessage1_EnumContainerMessage2) KnownFields() protoreflect.KnownFields {
419 return xxx_Enum_ProtoFile_MessageTypes[1].KnownFieldsOf(m.m)
420}
421func (m xxx_EnumContainerMessage1_EnumContainerMessage2) UnknownFields() protoreflect.UnknownFields {
422 return xxx_Enum_ProtoFile_MessageTypes[1].UnknownFieldsOf(m.m)
423}
424func (m xxx_EnumContainerMessage1_EnumContainerMessage2) Interface() protoreflect.ProtoMessage {
425 return m.m
426}
427func (m xxx_EnumContainerMessage1_EnumContainerMessage2) ProtoMutable() {}
428
Damien Neila1c6abc2018-09-12 13:36:34 -0700429func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() {
430 *m = EnumContainerMessage1_EnumContainerMessage2{}
431}
432func (m *EnumContainerMessage1_EnumContainerMessage2) String() string {
433 return proto.CompactTextString(m)
434}
435func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
436func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
437 return fileDescriptor_de9f68860d540858, []int{0, 0}
438}
Damien Neil993c04d2018-09-14 15:41:11 -0700439
Damien Neila1c6abc2018-09-12 13:36:34 -0700440func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error {
441 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b)
442}
443func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
444 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic)
445}
446func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) {
447 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src)
448}
449func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int {
450 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m)
451}
452func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() {
453 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m)
454}
455
456var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo
457
Damien Neil46abb572018-09-07 12:45:37 -0700458func init() {
Damien Neil46abb572018-09-07 12:45:37 -0700459 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
460 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
461 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
462 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
463 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
464 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
Damien Neil154da982018-09-19 13:21:58 -0700465 proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1")
466 proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2")
Damien Neil46abb572018-09-07 12:45:37 -0700467}
468
469func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
470
471var fileDescriptor_de9f68860d540858 = []byte{
Damien Neila485fbd2018-10-26 13:28:37 -0700472 // 296 bytes of a gzipped FileDescriptorProto
473 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd0, 0xc1, 0x4b, 0xfb, 0x30,
474 0x14, 0x07, 0xf0, 0x5f, 0xb6, 0xc3, 0x0f, 0x73, 0x98, 0x59, 0x64, 0x30, 0x06, 0xc2, 0xd8, 0x45,
475 0x19, 0xac, 0x21, 0xef, 0xe8, 0x45, 0x3a, 0xd7, 0x9b, 0x6e, 0xa0, 0x53, 0x41, 0x0f, 0x25, 0x6b,
476 0xb3, 0x58, 0x68, 0x93, 0xb2, 0x26, 0x82, 0xff, 0x84, 0x7f, 0xb3, 0xac, 0x95, 0xae, 0x62, 0x15,
477 0x3c, 0xe5, 0xbd, 0x97, 0x6f, 0x3e, 0x90, 0x87, 0xfb, 0xf9, 0xce, 0x58, 0x03, 0x4c, 0x6a, 0x97,
478 0x79, 0x65, 0x4d, 0x07, 0xca, 0x94, 0x45, 0xd5, 0x46, 0xd5, 0x01, 0x93, 0xf7, 0x2e, 0x1e, 0x04,
479 0xda, 0x65, 0x57, 0x46, 0x5b, 0x91, 0x68, 0xb9, 0xbb, 0x91, 0x45, 0x21, 0x94, 0xe4, 0xf4, 0x19,
480 0xd3, 0x58, 0x6e, 0x85, 0x4b, 0x6d, 0x18, 0xbb, 0x3c, 0x4d, 0x22, 0x61, 0x25, 0x1f, 0xa2, 0x31,
481 0x3a, 0xef, 0xc1, 0xd8, 0x6b, 0xd5, 0xbc, 0xbd, 0xb4, 0x7e, 0xcb, 0x25, 0x5c, 0xe0, 0xc3, 0x9b,
482 0xdb, 0xfe, 0xa7, 0xb3, 0xa8, 0x47, 0xad, 0x38, 0x0c, 0x3b, 0x7f, 0xc6, 0xe1, 0x3b, 0x0e, 0xa3,
483 0xa4, 0xfd, 0x4b, 0x30, 0x39, 0xc3, 0x64, 0x29, 0x0b, 0x2b, 0xe3, 0x9a, 0xf2, 0xe9, 0x09, 0x3e,
484 0x5e, 0x06, 0x77, 0xeb, 0x60, 0x11, 0x82, 0x1f, 0x3e, 0xf8, 0xd7, 0xf7, 0x01, 0xf9, 0xd7, 0x12,
485 0x9c, 0x37, 0x83, 0xf3, 0x9f, 0x83, 0xbc, 0x29, 0xf2, 0x5f, 0x44, 0xde, 0x14, 0x79, 0x2d, 0x4e,
486 0x4f, 0xf1, 0x51, 0x1d, 0xa1, 0xff, 0x71, 0x77, 0xb5, 0x0c, 0x08, 0xda, 0x17, 0xeb, 0xc7, 0x15,
487 0xe9, 0x4c, 0xd9, 0xe1, 0x1a, 0x68, 0x0f, 0x37, 0xd6, 0x4c, 0xd0, 0x97, 0x1e, 0x08, 0x1a, 0x75,
488 0x08, 0x9a, 0xfb, 0x4f, 0x97, 0x2a, 0xb1, 0x2f, 0x6e, 0xe3, 0x45, 0x26, 0x63, 0xca, 0xa4, 0x42,
489 0x2b, 0x56, 0x6e, 0x74, 0xe3, 0xb6, 0xec, 0x15, 0x58, 0x94, 0xc5, 0x55, 0x1f, 0xcd, 0x94, 0xd4,
490 0x33, 0x65, 0x98, 0x95, 0x85, 0x8d, 0x85, 0x15, 0xd5, 0x18, 0x3e, 0x02, 0x00, 0x00, 0xff, 0xff,
491 0x26, 0xf5, 0x57, 0x52, 0x4e, 0x02, 0x00, 0x00,
Damien Neil46abb572018-09-07 12:45:37 -0700492}
Joe Tsaib6405bd2018-11-15 14:44:37 -0800493
494func init() {
495 xxx_Enum_ProtoFile_FileDesc.Enums = xxx_Enum_ProtoFile_EnumDescs[0:2]
496 xxx_Enum_ProtoFile_FileDesc.Messages = xxx_Enum_ProtoFile_MessageDescs[0:1]
497 xxx_Enum_ProtoFile_MessageDescs[0].Enums = xxx_Enum_ProtoFile_EnumDescs[2:4]
498 xxx_Enum_ProtoFile_MessageDescs[0].Messages = xxx_Enum_ProtoFile_MessageDescs[1:2]
499 xxx_Enum_ProtoFile_MessageDescs[1].Enums = xxx_Enum_ProtoFile_EnumDescs[4:6]
500 xxx_Enum_ProtoFile_MessageDescs[0].Fields[0].EnumType = xxx_Enum_ProtoFile_EnumTypes[1]
501 xxx_Enum_ProtoFile_MessageDescs[0].Fields[1].EnumType = xxx_Enum_ProtoFile_EnumTypes[1]
502 var err error
503 Enum_ProtoFile, err = prototype.NewFile(&xxx_Enum_ProtoFile_FileDesc)
504 if err != nil {
505 panic(err)
506 }
507}
508
509const _ = protoimpl.EnforceVersion(protoimpl.Version - 0)
510
511var Enum_ProtoFile protoreflect.FileDescriptor
512
513var xxx_Enum_ProtoFile_FileDesc = prototype.File{
514 Syntax: protoreflect.Proto2,
515 Path: "proto2/enum.proto",
516 Package: "goproto.protoc.proto2",
517}
518var xxx_Enum_ProtoFile_EnumTypes = [6]protoreflect.EnumType{
519 prototype.GoEnum(
520 xxx_Enum_ProtoFile_EnumDescs[0].Reference(),
521 func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum {
522 return EnumType1(n)
523 },
524 ),
525 prototype.GoEnum(
526 xxx_Enum_ProtoFile_EnumDescs[1].Reference(),
527 func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum {
528 return EnumType2(n)
529 },
530 ),
531 prototype.GoEnum(
532 xxx_Enum_ProtoFile_EnumDescs[2].Reference(),
533 func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum {
534 return EnumContainerMessage1_NestedEnumType1A(n)
535 },
536 ),
537 prototype.GoEnum(
538 xxx_Enum_ProtoFile_EnumDescs[3].Reference(),
539 func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum {
540 return EnumContainerMessage1_NestedEnumType1B(n)
541 },
542 ),
543 prototype.GoEnum(
544 xxx_Enum_ProtoFile_EnumDescs[4].Reference(),
545 func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum {
546 return EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(n)
547 },
548 ),
549 prototype.GoEnum(
550 xxx_Enum_ProtoFile_EnumDescs[5].Reference(),
551 func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum {
552 return EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(n)
553 },
554 ),
555}
556var xxx_Enum_ProtoFile_EnumDescs = [6]prototype.Enum{
557 {
558 Name: "EnumType1",
559 Values: []prototype.EnumValue{
560 {Name: "ONE", Number: 1},
561 {Name: "TWO", Number: 2},
562 },
563 },
564 {
565 Name: "EnumType2",
566 Values: []prototype.EnumValue{
567 {Name: "duplicate1", Number: 1},
568 {Name: "duplicate2", Number: 1},
569 },
570 },
571 {
572 Name: "NestedEnumType1A",
573 Values: []prototype.EnumValue{
574 {Name: "NESTED_1A_VALUE", Number: 0},
575 },
576 },
577 {
578 Name: "NestedEnumType1B",
579 Values: []prototype.EnumValue{
580 {Name: "NESTED_1B_VALUE", Number: 0},
581 },
582 },
583 {
584 Name: "NestedEnumType2A",
585 Values: []prototype.EnumValue{
586 {Name: "NESTED_2A_VALUE", Number: 0},
587 },
588 },
589 {
590 Name: "NestedEnumType2B",
591 Values: []prototype.EnumValue{
592 {Name: "NESTED_2B_VALUE", Number: 0},
593 },
594 },
595}
596var xxx_Enum_ProtoFile_MessageTypes = [2]protoimpl.MessageType{
597 {Type: prototype.GoMessage(
598 xxx_Enum_ProtoFile_MessageDescs[0].Reference(),
599 func(protoreflect.MessageType) protoreflect.ProtoMessage {
600 return new(EnumContainerMessage1)
601 },
602 )},
603 {Type: prototype.GoMessage(
604 xxx_Enum_ProtoFile_MessageDescs[1].Reference(),
605 func(protoreflect.MessageType) protoreflect.ProtoMessage {
606 return new(EnumContainerMessage1_EnumContainerMessage2)
607 },
608 )},
609}
610var xxx_Enum_ProtoFile_MessageDescs = [2]prototype.Message{
611 {
612 Name: "EnumContainerMessage1",
613 Fields: []prototype.Field{
614 {
615 Name: "default_duplicate1",
616 Number: 1,
617 Cardinality: protoreflect.Optional,
618 Kind: protoreflect.EnumKind,
619 JSONName: "defaultDuplicate1",
620 Default: protoreflect.ValueOf(string("duplicate1")),
621 },
622 {
623 Name: "default_duplicate2",
624 Number: 2,
625 Cardinality: protoreflect.Optional,
626 Kind: protoreflect.EnumKind,
627 JSONName: "defaultDuplicate2",
628 Default: protoreflect.ValueOf(string("duplicate2")),
629 },
630 },
631 },
632 {
633 Name: "EnumContainerMessage2",
634 },
635}