blob: 8911ecd1dfb0dad625ff3d8e668ccbc23455a604 [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
Damien Neild4127922018-09-12 11:13:49 -07008// This is a compile-time assertion to ensure that this generated file
9// is compatible with the proto package it is being compiled against.
10// A compilation error at this line likely means your copy of the
11// proto package needs to be updated.
12const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
13
Damien Neil46abb572018-09-07 12:45:37 -070014// EnumType1 comment.
15type EnumType1 int32
16
17const (
18 // EnumType1_ONE comment.
19 EnumType1_ONE EnumType1 = 1
20 // EnumType1_TWO comment.
21 EnumType1_TWO EnumType1 = 2
22)
23
24var EnumType1_name = map[int32]string{
25 1: "ONE",
26 2: "TWO",
27}
28
29var EnumType1_value = map[string]int32{
30 "ONE": 1,
31 "TWO": 2,
32}
33
34func (x EnumType1) Enum() *EnumType1 {
35 p := new(EnumType1)
36 *p = x
37 return p
38}
39
40func (x EnumType1) String() string {
41 return proto.EnumName(EnumType1_name, int32(x))
42}
43
44func (x *EnumType1) UnmarshalJSON(data []byte) error {
45 value, err := proto.UnmarshalJSONEnum(EnumType1_value, data, "EnumType1")
46 if err != nil {
47 return err
48 }
49 *x = EnumType1(value)
50 return nil
51}
52
53func (EnumType1) EnumDescriptor() ([]byte, []int) {
54 return fileDescriptor_de9f68860d540858, []int{0}
55}
56
57type EnumType2 int32
58
59const (
60 EnumType2_duplicate1 EnumType2 = 1
61 EnumType2_duplicate2 EnumType2 = 1
62)
63
64var EnumType2_name = map[int32]string{
65 1: "duplicate1",
66 // Duplicate value: 1: "duplicate2",
67}
68
69var EnumType2_value = map[string]int32{
70 "duplicate1": 1,
71 "duplicate2": 1,
72}
73
74func (x EnumType2) Enum() *EnumType2 {
75 p := new(EnumType2)
76 *p = x
77 return p
78}
79
80func (x EnumType2) String() string {
81 return proto.EnumName(EnumType2_name, int32(x))
82}
83
84func (x *EnumType2) UnmarshalJSON(data []byte) error {
85 value, err := proto.UnmarshalJSONEnum(EnumType2_value, data, "EnumType2")
86 if err != nil {
87 return err
88 }
89 *x = EnumType2(value)
90 return nil
91}
92
93func (EnumType2) EnumDescriptor() ([]byte, []int) {
94 return fileDescriptor_de9f68860d540858, []int{1}
95}
96
97// NestedEnumType1A comment.
98type EnumContainerMessage1_NestedEnumType1A int32
99
100const (
101 // NestedEnumType1A_VALUE comment.
102 EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
103)
104
105var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
106 0: "NESTED_1A_VALUE",
107}
108
109var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{
110 "NESTED_1A_VALUE": 0,
111}
112
113func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A {
114 p := new(EnumContainerMessage1_NestedEnumType1A)
115 *p = x
116 return p
117}
118
119func (x EnumContainerMessage1_NestedEnumType1A) String() string {
120 return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x))
121}
122
123func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(data []byte) error {
124 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1A_value, data, "EnumContainerMessage1_NestedEnumType1A")
125 if err != nil {
126 return err
127 }
128 *x = EnumContainerMessage1_NestedEnumType1A(value)
129 return nil
130}
131
132func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) {
133 return fileDescriptor_de9f68860d540858, []int{0, 0}
134}
135
136type EnumContainerMessage1_NestedEnumType1B int32
137
138const (
139 EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
140)
141
142var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
143 0: "NESTED_1B_VALUE",
144}
145
146var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{
147 "NESTED_1B_VALUE": 0,
148}
149
150func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B {
151 p := new(EnumContainerMessage1_NestedEnumType1B)
152 *p = x
153 return p
154}
155
156func (x EnumContainerMessage1_NestedEnumType1B) String() string {
157 return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x))
158}
159
160func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(data []byte) error {
161 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1B_value, data, "EnumContainerMessage1_NestedEnumType1B")
162 if err != nil {
163 return err
164 }
165 *x = EnumContainerMessage1_NestedEnumType1B(value)
166 return nil
167}
168
169func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) {
170 return fileDescriptor_de9f68860d540858, []int{0, 1}
171}
172
173type EnumContainerMessage1 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700174 XXX_NoUnkeyedLiteral struct{} `json:"-"`
175 XXX_unrecognized []byte `json:"-"`
176 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700177}
178
179// NestedEnumType2A comment.
180type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
181
182const (
183 // NestedEnumType2A_VALUE comment.
184 EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
185)
186
187var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
188 0: "NESTED_2A_VALUE",
189}
190
191var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
192 "NESTED_2A_VALUE": 0,
193}
194
195func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
196 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
197 *p = x
198 return p
199}
200
201func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
202 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x))
203}
204
205func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error {
206 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A")
207 if err != nil {
208 return err
209 }
210 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value)
211 return nil
212}
213
214func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
215 return fileDescriptor_de9f68860d540858, []int{0, 0, 0}
216}
217
218type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
219
220const (
221 EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
222)
223
224var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
225 0: "NESTED_2B_VALUE",
226}
227
228var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
229 "NESTED_2B_VALUE": 0,
230}
231
232func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
233 p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
234 *p = x
235 return p
236}
237
238func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
239 return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x))
240}
241
242func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error {
243 value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B")
244 if err != nil {
245 return err
246 }
247 *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value)
248 return nil
249}
250
251func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
252 return fileDescriptor_de9f68860d540858, []int{0, 0, 1}
253}
254
255type EnumContainerMessage1_EnumContainerMessage2 struct {
Damien Neil658051b2018-09-10 12:26:21 -0700256 XXX_NoUnkeyedLiteral struct{} `json:"-"`
257 XXX_unrecognized []byte `json:"-"`
258 XXX_sizecache int32 `json:"-"`
Damien Neil46abb572018-09-07 12:45:37 -0700259}
260
261func init() {
262 proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value)
263 proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value)
264 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value)
265 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value)
266 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value)
267 proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value)
268}
269
270func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) }
271
272var fileDescriptor_de9f68860d540858 = []byte{
273 // 242 bytes of a gzipped FileDescriptorProto
274 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x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