blob: 7842bc7766b916f7b85c937fb9701cc0af5c34fe [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}
270func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error {
271 return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b)
272}
273func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
274 return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic)
275}
276func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) {
277 xxx_messageInfo_EnumContainerMessage1.Merge(m, src)
278}
279func (m *EnumContainerMessage1) XXX_Size() int {
280 return xxx_messageInfo_EnumContainerMessage1.Size(m)
281}
282func (m *EnumContainerMessage1) XXX_DiscardUnknown() {
283 xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m)
284}
285
286var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo
287
Damien Neil46abb572018-09-07 12:45:37 -0700288type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700289 XXX_NoUnkeyedLiteral struct{} `json:"-"`
290 XXX_unrecognized []byte `json:"-"`
291 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700292}
293
Damien Neila1c6abc2018-09-12 13:36:34 -0700294func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() {
295 *m = EnumContainerMessage1_EnumContainerMessage2{}
296}
297func (m *EnumContainerMessage1_EnumContainerMessage2) String() string {
298 return proto.CompactTextString(m)
299}
300func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
301func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
302 return fileDescriptor_de9f68860d540858, []int{0, 0}
303}
304func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error {
305 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b)
306}
307func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
308 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic)
309}
310func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) {
311 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src)
312}
313func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int {
314 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m)
315}
316func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() {
317 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m)
318}
319
320var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo
321
Damien Neil46abb572018-09-07 12:45:37 -0700322func init() {
Damien Neilce36f8d2018-09-13 15:19:08 -0700323 proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1")
324 proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2")
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)
331}
332
333func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
334
335var fileDescriptor_de9f68860d540858 = []byte{
336 // 242 bytes of a gzipped FileDescriptorProto
337 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
338 0x14, 0xc6, 0xcd, 0x39, 0x88, 0x19, 0x34, 0x56, 0x6e, 0x39, 0x70, 0xb9, 0x45, 0x38, 0xb8, 0x86,
339 0x64, 0x13, 0xa7, 0x56, 0xb3, 0x69, 0x6f, 0xb0, 0x2a, 0xb8, 0x1c, 0xa1, 0x7d, 0x3c, 0x0a, 0x6d,
340 0x5e, 0x69, 0xd3, 0xc1, 0xff, 0xd3, 0x3f, 0x48, 0xae, 0x81, 0xb3, 0x42, 0x75, 0xca, 0xf7, 0xe5,
341 0xfb, 0xf1, 0x1b, 0x1e, 0xbf, 0x6a, 0x3b, 0xf2, 0xa4, 0x25, 0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