blob: e8e053c2d9a62502f343a8415d9bd4768f017ed1 [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
8// EnumType1 comment.
9type EnumType1 int32
10
11const (
12 // EnumType1_ONE comment.
13 EnumType1_ONE EnumType1 = 1
14 // EnumType1_TWO comment.
15 EnumType1_TWO EnumType1 = 2
16)
17
18var EnumType1_name = map[int32]string{
19 1: "ONE",
20 2: "TWO",
21}
22
23var EnumType1_value = map[string]int32{
24 "ONE": 1,
25 "TWO": 2,
26}
27
28func (x EnumType1) Enum() *EnumType1 {
29 p := new(EnumType1)
30 *p = x
31 return p
32}
33
34func (x EnumType1) String() string {
35 return proto.EnumName(EnumType1_name, int32(x))
36}
37
38func (x *EnumType1) UnmarshalJSON(data []byte) error {
39 value, err := proto.UnmarshalJSONEnum(EnumType1_value, data, "EnumType1")
40 if err != nil {
41 return err
42 }
43 *x = EnumType1(value)
44 return nil
45}
46
47func (EnumType1) EnumDescriptor() ([]byte, []int) {
48 return fileDescriptor_de9f68860d540858, []int{0}
49}
50
51type EnumType2 int32
52
53const (
54 EnumType2_duplicate1 EnumType2 = 1
55 EnumType2_duplicate2 EnumType2 = 1
56)
57
58var EnumType2_name = map[int32]string{
59 1: "duplicate1",
60 // Duplicate value: 1: "duplicate2",
61}
62
63var EnumType2_value = map[string]int32{
64 "duplicate1": 1,
65 "duplicate2": 1,
66}
67
68func (x EnumType2) Enum() *EnumType2 {
69 p := new(EnumType2)
70 *p = x
71 return p
72}
73
74func (x EnumType2) String() string {
75 return proto.EnumName(EnumType2_name, int32(x))
76}
77
78func (x *EnumType2) UnmarshalJSON(data []byte) error {
79 value, err := proto.UnmarshalJSONEnum(EnumType2_value, data, "EnumType2")
80 if err != nil {
81 return err
82 }
83 *x = EnumType2(value)
84 return nil
85}
86
87func (EnumType2) EnumDescriptor() ([]byte, []int) {
88 return fileDescriptor_de9f68860d540858, []int{1}
89}
90
91// NestedEnumType1A comment.
92type EnumContainerMessage1_NestedEnumType1A int32
93
94const (
95 // NestedEnumType1A_VALUE comment.
96 EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
97)
98
99var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
100 0: "NESTED_1A_VALUE",
101}
102
103var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{
104 "NESTED_1A_VALUE": 0,
105}
106
107func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A {
108 p := new(EnumContainerMessage1_NestedEnumType1A)
109 *p = x
110 return p
111}
112
113func (x EnumContainerMessage1_NestedEnumType1A) String() string {
114 return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x))
115}
116
117func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(data []byte) error {
118 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1A_value, data, "EnumContainerMessage1_NestedEnumType1A")
119 if err != nil {
120 return err
121 }
122 *x = EnumContainerMessage1_NestedEnumType1A(value)
123 return nil
124}
125
126func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) {
127 return fileDescriptor_de9f68860d540858, []int{0, 0}
128}
129
130type EnumContainerMessage1_NestedEnumType1B int32
131
132const (
133 EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
134)
135
136var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
137 0: "NESTED_1B_VALUE",
138}
139
140var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{
141 "NESTED_1B_VALUE": 0,
142}
143
144func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B {
145 p := new(EnumContainerMessage1_NestedEnumType1B)
146 *p = x
147 return p
148}
149
150func (x EnumContainerMessage1_NestedEnumType1B) String() string {
151 return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x))
152}
153
154func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(data []byte) error {
155 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1B_value, data, "EnumContainerMessage1_NestedEnumType1B")
156 if err != nil {
157 return err
158 }
159 *x = EnumContainerMessage1_NestedEnumType1B(value)
160 return nil
161}
162
163func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) {
164 return fileDescriptor_de9f68860d540858, []int{0, 1}
165}
166
167type EnumContainerMessage1 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700168 XXX_NoUnkeyedLiteral struct{} `json:"-"`
169 XXX_unrecognized []byte `json:"-"`
170 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700171}
172
173// 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
249type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700250 XXX_NoUnkeyedLiteral struct{} `json:"-"`
251 XXX_unrecognized []byte `json:"-"`
252 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700253}
254
255func init() {
256 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
257 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
258 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
259 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
260 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
261 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
262}
263
264func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
265
266var fileDescriptor_de9f68860d540858 = []byte{
267 // 242 bytes of a gzipped FileDescriptorProto
268 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
269 0x14, 0xc6, 0xcd, 0x39, 0x88, 0x19, 0x34, 0x56, 0x6e, 0x39, 0x70, 0xb9, 0x45, 0x38, 0xb8, 0x86,
270 0x64, 0x13, 0xa7, 0x56, 0xb3, 0x69, 0x6f, 0xb0, 0x2a, 0xb8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