blob: 57ba0c4e801ae90dd3362ddd83757c75ad413d9d [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
Damien Neil46abb572018-09-07 12:45:37 -0700173// NestedEnumType2A comment.
174type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
175
176const (
177 // NestedEnumType2A_VALUE comment.
178 EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
179)
180
181var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
182 0: "NESTED_2A_VALUE",
183}
184
185var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
186 "NESTED_2A_VALUE": 0,
187}
188
189func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
190 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
191 *p = x
192 return p
193}
194
195func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
196 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x))
197}
198
199func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error {
200 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A")
201 if err != nil {
202 return err
203 }
204 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value)
205 return nil
206}
207
208func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
209 return fileDescriptor_de9f68860d540858, []int{0, 0, 0}
210}
211
212type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
213
214const (
215 EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
216)
217
218var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
219 0: "NESTED_2B_VALUE",
220}
221
222var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
223 "NESTED_2B_VALUE": 0,
224}
225
226func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
227 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
228 *p = x
229 return p
230}
231
232func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
233 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x))
234}
235
236func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error {
237 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B")
238 if err != nil {
239 return err
240 }
241 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value)
242 return nil
243}
244
245func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
246 return fileDescriptor_de9f68860d540858, []int{0, 0, 1}
247}
248
Damien Neilce36f8d2018-09-13 15:19:08 -0700249type EnumContainerMessage1 struct {
250 XXX_NoUnkeyedLiteral struct{} `json:"-"`
251 XXX_unrecognized []byte `json:"-"`
252 XXX_sizecache int32 `json:"-"`
253}
254
255func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} }
256func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) }
257func (*EnumContainerMessage1) ProtoMessage() {}
258func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
259 return fileDescriptor_de9f68860d540858, []int{0}
260}
261func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error {
262 return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b)
263}
264func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
265 return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic)
266}
267func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) {
268 xxx_messageInfo_EnumContainerMessage1.Merge(m, src)
269}
270func (m *EnumContainerMessage1) XXX_Size() int {
271 return xxx_messageInfo_EnumContainerMessage1.Size(m)
272}
273func (m *EnumContainerMessage1) XXX_DiscardUnknown() {
274 xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m)
275}
276
277var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo
278
Damien Neil46abb572018-09-07 12:45:37 -0700279type 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() {
Damien Neilce36f8d2018-09-13 15:19:08 -0700314 proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1")
315 proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2")
Damien Neil46abb572018-09-07 12:45:37 -0700316 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
317 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
318 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
319 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
320 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
321 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
322}
323
324func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
325
326var fileDescriptor_de9f68860d540858 = []byte{
327 // 242 bytes of a gzipped FileDescriptorProto
328 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
329 0x14, 0xc6, 0xcd, 0x39, 0x88, 0x19, 0x34, 0x56, 0x6e, 0x39, 0x70, 0xb9, 0x45, 0x38, 0xb8, 0x86,
330 0x64, 0x13, 0xa7, 0x56, 0xb3, 0x69, 0x6f, 0xb0, 0x2a, 0xb8, 0x1c, 0xa1, 0x7d, 0x3c, 0x0a, 0x6d,
331 0x5e, 0x69, 0xd3, 0xc1, 0xff, 0xd3, 0x3f, 0x48, 0xae, 0x81, 0xb3, 0x42, 0x75, 0xca, 0xf7, 0xe5,
332 0xfb, 0xf1, 0x1b, 0x1e, 0xbf, 0x6a, 0x3b, 0xf2, 0xa4, 0x25, 0xb8, 0xa1, 0x89, 0xc7, 0x1c, 0x2d,
333 0x91, 0xc6, 0x10, 0x6a, 0x11, 0x1e, 0xbd, 0xfe, 0x62, 0x7c, 0x69, 0xdc, 0xd0, 0x3c, 0x90, 0xf3,
334 0xb6, 0x72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