blob: a4f394bfe56d050ce221f1018cb1c9e5d489e5e4 [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.
Joe Tsaid7e97bc2018-11-26 12:57:27 -080021const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
Damien Neild4127922018-09-12 11:13:49 -070022
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 {
Damien Neila485fbd2018-10-26 13:28:37 -0700259 DefaultDuplicate1 *EnumType2 `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate1,omitempty"`
260 DefaultDuplicate2 *EnumType2 `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate2,omitempty"`
261 XXX_NoUnkeyedLiteral struct{} `json:"-"`
262 XXX_unrecognized []byte `json:"-"`
263 XXX_sizecache int32 `json:"-"`
Damien Neilce36f8d2018-09-13 15:19:08 -0700264}
265
266func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} }
267func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) }
268func (*EnumContainerMessage1) ProtoMessage() {}
269func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
270 return fileDescriptor_de9f68860d540858, []int{0}
271}
Damien Neil993c04d2018-09-14 15:41:11 -0700272
Damien Neilce36f8d2018-09-13 15:19:08 -0700273func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error {
274 return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b)
275}
276func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
277 return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic)
278}
279func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) {
280 xxx_messageInfo_EnumContainerMessage1.Merge(m, src)
281}
282func (m *EnumContainerMessage1) XXX_Size() int {
283 return xxx_messageInfo_EnumContainerMessage1.Size(m)
284}
285func (m *EnumContainerMessage1) XXX_DiscardUnknown() {
286 xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m)
287}
288
289var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo
290
Damien Neila485fbd2018-10-26 13:28:37 -0700291const Default_EnumContainerMessage1_DefaultDuplicate1 EnumType2 = EnumType2_duplicate1
292const Default_EnumContainerMessage1_DefaultDuplicate2 EnumType2 = EnumType2_duplicate2
293
294func (m *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 {
295 if m != nil && m.DefaultDuplicate1 != nil {
296 return *m.DefaultDuplicate1
297 }
298 return Default_EnumContainerMessage1_DefaultDuplicate1
299}
300
301func (m *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 {
302 if m != nil && m.DefaultDuplicate2 != nil {
303 return *m.DefaultDuplicate2
304 }
305 return Default_EnumContainerMessage1_DefaultDuplicate2
306}
307
Damien Neil46abb572018-09-07 12:45:37 -0700308type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700309 XXX_NoUnkeyedLiteral struct{} `json:"-"`
310 XXX_unrecognized []byte `json:"-"`
311 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700312}
313
Damien Neila1c6abc2018-09-12 13:36:34 -0700314func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() {
315 *m = EnumContainerMessage1_EnumContainerMessage2{}
316}
317func (m *EnumContainerMessage1_EnumContainerMessage2) String() string {
318 return proto.CompactTextString(m)
319}
320func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
321func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
322 return fileDescriptor_de9f68860d540858, []int{0, 0}
323}
Damien Neil993c04d2018-09-14 15:41:11 -0700324
Damien Neila1c6abc2018-09-12 13:36:34 -0700325func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error {
326 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b)
327}
328func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
329 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic)
330}
331func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) {
332 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src)
333}
334func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int {
335 return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m)
336}
337func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() {
338 xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m)
339}
340
341var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo
342
Damien Neil46abb572018-09-07 12:45:37 -0700343func init() {
Damien Neil46abb572018-09-07 12:45:37 -0700344 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
345 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
346 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
347 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
348 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
349 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
Damien Neil154da982018-09-19 13:21:58 -0700350 proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1")
351 proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2")
Damien Neil46abb572018-09-07 12:45:37 -0700352}
353
354func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
355
356var fileDescriptor_de9f68860d540858 = []byte{
Damien Neila485fbd2018-10-26 13:28:37 -0700357 // 296 bytes of a gzipped FileDescriptorProto
358 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd0, 0xc1, 0x4b, 0xfb, 0x30,
359 0x14, 0x07, 0xf0, 0x5f, 0xb6, 0xc3, 0x0f, 0x73, 0x98, 0x59, 0x64, 0x30, 0x06, 0xc2, 0xd8, 0x45,
360 0x19, 0xac, 0x21, 0xef, 0xe8, 0x45, 0x3a, 0xd7, 0x9b, 0x6e, 0xa0, 0x53, 0x41, 0x0f, 0x25, 0x6b,
361 0xb3, 0x58, 0x68, 0x93, 0xb2, 0x26, 0x82, 0xff, 0x84, 0x7f, 0xb3, 0xac, 0x95, 0xae, 0x62, 0x15,
362 0x3c, 0xe5, 0xbd, 0x97, 0x6f, 0x3e, 0x90, 0x87, 0xfb, 0xf9, 0xce, 0x58, 0x03, 0x4c, 0x6a, 0x97,
363 0x79, 0x65, 0x4d, 0x07, 0xca, 0x94, 0x45, 0xd5, 0x46, 0xd5, 0x01, 0x93, 0xf7, 0x2e, 0x1e, 0x04,
364 0xda, 0x65, 0x57, 0x46, 0x5b, 0x91, 0x68, 0xb9, 0xbb, 0x91, 0x45, 0x21, 0x94, 0xe4, 0xf4, 0x19,
365 0xd3, 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, 0x02, 0x00, 0x00,
Damien Neil46abb572018-09-07 12:45:37 -0700377}