blob: 85b2fadbdb8d1cd427bfae3968d9b6a129eca257 [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 {
168}
169
170// NestedEnumType2A comment.
171type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
172
173const (
174 // NestedEnumType2A_VALUE comment.
175 EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
176)
177
178var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
179 0: "NESTED_2A_VALUE",
180}
181
182var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
183 "NESTED_2A_VALUE": 0,
184}
185
186func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
187 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
188 *p = x
189 return p
190}
191
192func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
193 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x))
194}
195
196func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error {
197 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A")
198 if err != nil {
199 return err
200 }
201 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value)
202 return nil
203}
204
205func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
206 return fileDescriptor_de9f68860d540858, []int{0, 0, 0}
207}
208
209type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
210
211const (
212 EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
213)
214
215var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
216 0: "NESTED_2B_VALUE",
217}
218
219var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
220 "NESTED_2B_VALUE": 0,
221}
222
223func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
224 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
225 *p = x
226 return p
227}
228
229func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
230 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x))
231}
232
233func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error {
234 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B")
235 if err != nil {
236 return err
237 }
238 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value)
239 return nil
240}
241
242func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
243 return fileDescriptor_de9f68860d540858, []int{0, 0, 1}
244}
245
246type EnumContainerMessage1_EnumContainerMessage2 struct {
247}
248
249func init() {
250 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
251 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
252 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
253 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
254 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
255 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
256}
257
258func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
259
260var fileDescriptor_de9f68860d540858 = []byte{
261 // 242 bytes of a gzipped FileDescriptorProto
262 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
263 0x14, 0xc6, 0xcd, 0x39, 0x88, 0x19, 0x34, 0x56, 0x6e, 0x39, 0x70, 0xb9, 0x45, 0x38, 0xb8, 0x86,
264 0x64, 0x13, 0xa7, 0x56, 0xb3, 0x69, 0x6f, 0xb0, 0x2a, 0xb8, 0x1c, 0xa1, 0x7d, 0x3c, 0x0a, 0x6d,
265 0x5e, 0x69, 0xd3, 0xc1, 0xff, 0xd3, 0x3f, 0x48, 0xae, 0x81, 0xb3, 0x42, 0x75, 0xca, 0xf7, 0xe5,
266 0xfb, 0xf1, 0x1b, 0x1e, 0xbf, 0x6a, 0x3b, 0xf2, 0xa4, 0x25, 0xb8, 0xa1, 0x89, 0xc7, 0x1c, 0x2d,
267 0x91, 0xc6, 0x10, 0x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