blob: 6e5cf27175b268105b867d4e0eca33f0f0d0cd5a [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"
9 math "math"
10)
11
12// Reference imports to suppress errors if they are not otherwise used.
13var _ = proto.Marshal
14var _ = fmt.Errorf
15var _ = math.Inf
Damien Neil46abb572018-09-07 12:45:37 -070016
Damien Neild4127922018-09-12 11:13:49 -070017// This is a compile-time assertion to ensure that this generated file
18// is compatible with the proto package it is being compiled against.
19// A compilation error at this line likely means your copy of the
20// proto package needs to be updated.
21const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
22
Damien Neil46abb572018-09-07 12:45:37 -070023// EnumType1 comment.
24type EnumType1 int32
25
26const (
27 // EnumType1_ONE comment.
28 EnumType1_ONE EnumType1 = 1
29 // EnumType1_TWO comment.
30 EnumType1_TWO EnumType1 = 2
31)
32
33var EnumType1_name = map[int32]string{
34 1: "ONE",
35 2: "TWO",
36}
37
38var EnumType1_value = map[string]int32{
39 "ONE": 1,
40 "TWO": 2,
41}
42
43func (x EnumType1) Enum() *EnumType1 {
44 p := new(EnumType1)
45 *p = x
46 return p
47}
48
49func (x EnumType1) String() string {
50 return proto.EnumName(EnumType1_name, int32(x))
51}
52
53func (x *EnumType1) UnmarshalJSON(data []byte) error {
54 value, err := proto.UnmarshalJSONEnum(EnumType1_value, data, "EnumType1")
55 if err != nil {
56 return err
57 }
58 *x = EnumType1(value)
59 return nil
60}
61
62func (EnumType1) EnumDescriptor() ([]byte, []int) {
63 return fileDescriptor_de9f68860d540858, []int{0}
64}
65
66type EnumType2 int32
67
68const (
69 EnumType2_duplicate1 EnumType2 = 1
70 EnumType2_duplicate2 EnumType2 = 1
71)
72
73var EnumType2_name = map[int32]string{
74 1: "duplicate1",
75 // Duplicate value: 1: "duplicate2",
76}
77
78var EnumType2_value = map[string]int32{
79 "duplicate1": 1,
80 "duplicate2": 1,
81}
82
83func (x EnumType2) Enum() *EnumType2 {
84 p := new(EnumType2)
85 *p = x
86 return p
87}
88
89func (x EnumType2) String() string {
90 return proto.EnumName(EnumType2_name, int32(x))
91}
92
93func (x *EnumType2) UnmarshalJSON(data []byte) error {
94 value, err := proto.UnmarshalJSONEnum(EnumType2_value, data, "EnumType2")
95 if err != nil {
96 return err
97 }
98 *x = EnumType2(value)
99 return nil
100}
101
102func (EnumType2) EnumDescriptor() ([]byte, []int) {
103 return fileDescriptor_de9f68860d540858, []int{1}
104}
105
106// NestedEnumType1A comment.
107type EnumContainerMessage1_NestedEnumType1A int32
108
109const (
110 // NestedEnumType1A_VALUE comment.
111 EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
112)
113
114var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
115 0: "NESTED_1A_VALUE",
116}
117
118var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{
119 "NESTED_1A_VALUE": 0,
120}
121
122func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A {
123 p := new(EnumContainerMessage1_NestedEnumType1A)
124 *p = x
125 return p
126}
127
128func (x EnumContainerMessage1_NestedEnumType1A) String() string {
129 return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x))
130}
131
132func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(data []byte) error {
133 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1A_value, data, "EnumContainerMessage1_NestedEnumType1A")
134 if err != nil {
135 return err
136 }
137 *x = EnumContainerMessage1_NestedEnumType1A(value)
138 return nil
139}
140
141func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) {
142 return fileDescriptor_de9f68860d540858, []int{0, 0}
143}
144
145type EnumContainerMessage1_NestedEnumType1B int32
146
147const (
148 EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
149)
150
151var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
152 0: "NESTED_1B_VALUE",
153}
154
155var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{
156 "NESTED_1B_VALUE": 0,
157}
158
159func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B {
160 p := new(EnumContainerMessage1_NestedEnumType1B)
161 *p = x
162 return p
163}
164
165func (x EnumContainerMessage1_NestedEnumType1B) String() string {
166 return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x))
167}
168
169func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(data []byte) error {
170 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1B_value, data, "EnumContainerMessage1_NestedEnumType1B")
171 if err != nil {
172 return err
173 }
174 *x = EnumContainerMessage1_NestedEnumType1B(value)
175 return nil
176}
177
178func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) {
179 return fileDescriptor_de9f68860d540858, []int{0, 1}
180}
181
Damien Neil46abb572018-09-07 12:45:37 -0700182// NestedEnumType2A comment.
183type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
184
185const (
186 // NestedEnumType2A_VALUE comment.
187 EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
188)
189
190var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
191 0: "NESTED_2A_VALUE",
192}
193
194var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
195 "NESTED_2A_VALUE": 0,
196}
197
198func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
199 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
200 *p = x
201 return p
202}
203
204func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
205 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x))
206}
207
208func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error {
209 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A")
210 if err != nil {
211 return err
212 }
213 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value)
214 return nil
215}
216
217func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
218 return fileDescriptor_de9f68860d540858, []int{0, 0, 0}
219}
220
221type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
222
223const (
224 EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
225)
226
227var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
228 0: "NESTED_2B_VALUE",
229}
230
231var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
232 "NESTED_2B_VALUE": 0,
233}
234
235func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
236 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
237 *p = x
238 return p
239}
240
241func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
242 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x))
243}
244
245func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error {
246 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B")
247 if err != nil {
248 return err
249 }
250 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value)
251 return nil
252}
253
254func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
255 return fileDescriptor_de9f68860d540858, []int{0, 0, 1}
256}
257
Damien Neilce36f8d2018-09-13 15:19:08 -0700258type EnumContainerMessage1 struct {
259 XXX_NoUnkeyedLiteral struct{} `json:"-"`
260 XXX_unrecognized []byte `json:"-"`
261 XXX_sizecache int32 `json:"-"`
262}
263
264func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} }
265func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) }
266func (*EnumContainerMessage1) ProtoMessage() {}
267func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
268 return fileDescriptor_de9f68860d540858, []int{0}
269}
Damien Neil993c04d2018-09-14 15:41:11 -0700270
Damien Neilce36f8d2018-09-13 15:19:08 -0700271func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error {
272 return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b)
273}
274func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
275 return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic)
276}
277func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) {
278 xxx_messageInfo_EnumContainerMessage1.Merge(m, src)
279}
280func (m *EnumContainerMessage1) XXX_Size() int {
281 return xxx_messageInfo_EnumContainerMessage1.Size(m)
282}
283func (m *EnumContainerMessage1) XXX_DiscardUnknown() {
284 xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m)
285}
286
287var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo
288
Damien Neil46abb572018-09-07 12:45:37 -0700289type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700290 XXX_NoUnkeyedLiteral struct{} `json:"-"`
291 XXX_unrecognized []byte `json:"-"`
292 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700293}
294
Damien Neila1c6abc2018-09-12 13:36:34 -0700295func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() {
296 *m = EnumContainerMessage1_EnumContainerMessage2{}
297}
298func (m *EnumContainerMessage1_EnumContainerMessage2) String() string {
299 return proto.CompactTextString(m)
300}
301func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
302func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
303 return fileDescriptor_de9f68860d540858, []int{0, 0}
304}
Damien Neil993c04d2018-09-14 15:41:11 -0700305
Damien Neila1c6abc2018-09-12 13:36:34 -0700306func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error {
307 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b)
308}
309func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
310 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic)
311}
312func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) {
313 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src)
314}
315func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int {
316 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m)
317}
318func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() {
319 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m)
320}
321
322var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo
323
Damien Neil46abb572018-09-07 12:45:37 -0700324func init() {
Damien Neil46abb572018-09-07 12:45:37 -0700325 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
326 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
327 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
328 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
329 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
330 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
Damien Neil154da982018-09-19 13:21:58 -0700331 proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1")
332 proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2")
Damien Neil46abb572018-09-07 12:45:37 -0700333}
334
335func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
336
337var fileDescriptor_de9f68860d540858 = []byte{
Damien Neil154da982018-09-19 13:21:58 -0700338 // 248 bytes of a gzipped FileDescriptorProto
339 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x4b, 0xc3, 0x30,
340 0x18, 0x86, 0xcd, 0x3c, 0x88, 0x39, 0x68, 0xac, 0xec, 0x32, 0xf0, 0xb2, 0x8b, 0x30, 0xd8, 0x42,
341 0xbe, 0x3f, 0x20, 0xad, 0xe6, 0xa6, 0xdd, 0xc1, 0xaa, 0xe0, 0x65, 0x64, 0xe9, 0x67, 0x2c, 0xac,
342 0x49, 0x59, 0xbf, 0x08, 0xfe, 0x4f, 0x7f, 0x90, 0xac, 0x85, 0x59, 0x61, 0x7a, 0xca, 0xfb, 0xe6,
343 0x7d, 0x78, 0x0e, 0x1f, 0xbf, 0x68, 0xb6, 0x81, 0x02, 0x48, 0xf4, 0xb1, 0x5e, 0x74, 0x39, 0x19,
344 0xbb, 0xd0, 0x85, 0xbe, 0xda, 0xfe, 0x81, 0xe9, 0x17, 0xe3, 0x63, 0xed, 0x63, 0x7d, 0x1b, 0x3c,
345 0x99, 0xca, 0xe3, 0xf6, 0x01, 0xdb, 0xd6, 0x38, 0x54, 0x93, 0xea, 0xf0, 0x00, 0xd3, 0x6b, 0x2e,
346 0x72, 0x6c, 0x09, 0xcb, 0xdd, 0x5c, 0x7c, 0x36, 0x08, 0x69, 0x72, 0xc9, 0xcf, 0x73, 0xfd, 0x58,
347 0xe8, 0xbb, 0x15, 0xa4, 0xab, 0xe7, 0xf4, 0xfe, 0x49, 0x8b, 0xa3, 0x03, 0x60, 0x36, 0x04, 0xb3,
348 0xbf, 0x41, 0x35, 0x34, 0xaa, 0x7f, 0x8c, 0x6a, 0x68, 0x54, 0x7b, 0xe3, 0xec, 0x8a, 0x9f, 0xee,
349 0x91, 0xe4, 0x84, 0x1f, 0x2f, 0x73, 0x2d, 0xd8, 0x2e, 0x14, 0x2f, 0x4b, 0x31, 0x9a, 0xc9, 0x9f,
350 0x19, 0x92, 0x33, 0xce, 0xcb, 0xd8, 0x6c, 0x2a, 0x6b, 0x08, 0x95, 0x60, 0xbf, 0x3a, 0x08, 0x36,
351 0x19, 0x09, 0x96, 0xa5, 0xaf, 0x37, 0xae, 0xa2, 0xf7, 0xb8, 0x5e, 0xd8, 0x50, 0x4b, 0x17, 0x36,
352 0xc6, 0x3b, 0xd9, 0x9d, 0x70, 0x1d, 0xdf, 0xe4, 0x07, 0x48, 0x5b, 0x97, 0x7d, 0xb7, 0x73, 0x87,
353 0x7e, 0xee, 0x82, 0x24, 0x6c, 0xa9, 0x34, 0x64, 0xfa, 0x6f, 0xf8, 0x0e, 0x00, 0x00, 0xff, 0xff,
354 0x5b, 0x88, 0x8a, 0x80, 0x94, 0x01, 0x00, 0x00,
Damien Neil46abb572018-09-07 12:45:37 -0700355}