Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: proto2/enum.proto |
| 3 | |
| 4 | package proto2 |
| 5 | |
Damien Neil | 1ec3315 | 2018-09-13 13:12:36 -0700 | [diff] [blame] | 6 | import ( |
| 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. |
| 13 | var _ = proto.Marshal |
| 14 | var _ = fmt.Errorf |
| 15 | var _ = math.Inf |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 16 | |
Damien Neil | d412792 | 2018-09-12 11:13:49 -0700 | [diff] [blame] | 17 | // 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. |
| 21 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package |
| 22 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 23 | // EnumType1 comment. |
| 24 | type EnumType1 int32 |
| 25 | |
| 26 | const ( |
| 27 | // EnumType1_ONE comment. |
| 28 | EnumType1_ONE EnumType1 = 1 |
| 29 | // EnumType1_TWO comment. |
| 30 | EnumType1_TWO EnumType1 = 2 |
| 31 | ) |
| 32 | |
| 33 | var EnumType1_name = map[int32]string{ |
| 34 | 1: "ONE", |
| 35 | 2: "TWO", |
| 36 | } |
| 37 | |
| 38 | var EnumType1_value = map[string]int32{ |
| 39 | "ONE": 1, |
| 40 | "TWO": 2, |
| 41 | } |
| 42 | |
| 43 | func (x EnumType1) Enum() *EnumType1 { |
| 44 | p := new(EnumType1) |
| 45 | *p = x |
| 46 | return p |
| 47 | } |
| 48 | |
| 49 | func (x EnumType1) String() string { |
| 50 | return proto.EnumName(EnumType1_name, int32(x)) |
| 51 | } |
| 52 | |
| 53 | func (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 | |
| 62 | func (EnumType1) EnumDescriptor() ([]byte, []int) { |
| 63 | return fileDescriptor_de9f68860d540858, []int{0} |
| 64 | } |
| 65 | |
| 66 | type EnumType2 int32 |
| 67 | |
| 68 | const ( |
| 69 | EnumType2_duplicate1 EnumType2 = 1 |
| 70 | EnumType2_duplicate2 EnumType2 = 1 |
| 71 | ) |
| 72 | |
| 73 | var EnumType2_name = map[int32]string{ |
| 74 | 1: "duplicate1", |
| 75 | // Duplicate value: 1: "duplicate2", |
| 76 | } |
| 77 | |
| 78 | var EnumType2_value = map[string]int32{ |
| 79 | "duplicate1": 1, |
| 80 | "duplicate2": 1, |
| 81 | } |
| 82 | |
| 83 | func (x EnumType2) Enum() *EnumType2 { |
| 84 | p := new(EnumType2) |
| 85 | *p = x |
| 86 | return p |
| 87 | } |
| 88 | |
| 89 | func (x EnumType2) String() string { |
| 90 | return proto.EnumName(EnumType2_name, int32(x)) |
| 91 | } |
| 92 | |
| 93 | func (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 | |
| 102 | func (EnumType2) EnumDescriptor() ([]byte, []int) { |
| 103 | return fileDescriptor_de9f68860d540858, []int{1} |
| 104 | } |
| 105 | |
| 106 | // NestedEnumType1A comment. |
| 107 | type EnumContainerMessage1_NestedEnumType1A int32 |
| 108 | |
| 109 | const ( |
| 110 | // NestedEnumType1A_VALUE comment. |
| 111 | EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0 |
| 112 | ) |
| 113 | |
| 114 | var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{ |
| 115 | 0: "NESTED_1A_VALUE", |
| 116 | } |
| 117 | |
| 118 | var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{ |
| 119 | "NESTED_1A_VALUE": 0, |
| 120 | } |
| 121 | |
| 122 | func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A { |
| 123 | p := new(EnumContainerMessage1_NestedEnumType1A) |
| 124 | *p = x |
| 125 | return p |
| 126 | } |
| 127 | |
| 128 | func (x EnumContainerMessage1_NestedEnumType1A) String() string { |
| 129 | return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x)) |
| 130 | } |
| 131 | |
| 132 | func (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 | |
| 141 | func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) { |
| 142 | return fileDescriptor_de9f68860d540858, []int{0, 0} |
| 143 | } |
| 144 | |
| 145 | type EnumContainerMessage1_NestedEnumType1B int32 |
| 146 | |
| 147 | const ( |
| 148 | EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0 |
| 149 | ) |
| 150 | |
| 151 | var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{ |
| 152 | 0: "NESTED_1B_VALUE", |
| 153 | } |
| 154 | |
| 155 | var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{ |
| 156 | "NESTED_1B_VALUE": 0, |
| 157 | } |
| 158 | |
| 159 | func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B { |
| 160 | p := new(EnumContainerMessage1_NestedEnumType1B) |
| 161 | *p = x |
| 162 | return p |
| 163 | } |
| 164 | |
| 165 | func (x EnumContainerMessage1_NestedEnumType1B) String() string { |
| 166 | return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x)) |
| 167 | } |
| 168 | |
| 169 | func (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 | |
| 178 | func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) { |
| 179 | return fileDescriptor_de9f68860d540858, []int{0, 1} |
| 180 | } |
| 181 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 182 | // NestedEnumType2A comment. |
| 183 | type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32 |
| 184 | |
| 185 | const ( |
| 186 | // NestedEnumType2A_VALUE comment. |
| 187 | EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0 |
| 188 | ) |
| 189 | |
| 190 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{ |
| 191 | 0: "NESTED_2A_VALUE", |
| 192 | } |
| 193 | |
| 194 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{ |
| 195 | "NESTED_2A_VALUE": 0, |
| 196 | } |
| 197 | |
| 198 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A { |
| 199 | p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) |
| 200 | *p = x |
| 201 | return p |
| 202 | } |
| 203 | |
| 204 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string { |
| 205 | return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x)) |
| 206 | } |
| 207 | |
| 208 | func (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 | |
| 217 | func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) { |
| 218 | return fileDescriptor_de9f68860d540858, []int{0, 0, 0} |
| 219 | } |
| 220 | |
| 221 | type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32 |
| 222 | |
| 223 | const ( |
| 224 | EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0 |
| 225 | ) |
| 226 | |
| 227 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{ |
| 228 | 0: "NESTED_2B_VALUE", |
| 229 | } |
| 230 | |
| 231 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{ |
| 232 | "NESTED_2B_VALUE": 0, |
| 233 | } |
| 234 | |
| 235 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B { |
| 236 | p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) |
| 237 | *p = x |
| 238 | return p |
| 239 | } |
| 240 | |
| 241 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string { |
| 242 | return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x)) |
| 243 | } |
| 244 | |
| 245 | func (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 | |
| 254 | func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) { |
| 255 | return fileDescriptor_de9f68860d540858, []int{0, 0, 1} |
| 256 | } |
| 257 | |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 258 | type EnumContainerMessage1 struct { |
| 259 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 260 | XXX_unrecognized []byte `json:"-"` |
| 261 | XXX_sizecache int32 `json:"-"` |
| 262 | } |
| 263 | |
| 264 | func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} } |
| 265 | func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) } |
| 266 | func (*EnumContainerMessage1) ProtoMessage() {} |
| 267 | func (*EnumContainerMessage1) Descriptor() ([]byte, []int) { |
| 268 | return fileDescriptor_de9f68860d540858, []int{0} |
| 269 | } |
Damien Neil | 993c04d | 2018-09-14 15:41:11 -0700 | [diff] [blame] | 270 | |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 271 | func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error { |
| 272 | return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b) |
| 273 | } |
| 274 | func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 275 | return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic) |
| 276 | } |
| 277 | func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) { |
| 278 | xxx_messageInfo_EnumContainerMessage1.Merge(m, src) |
| 279 | } |
| 280 | func (m *EnumContainerMessage1) XXX_Size() int { |
| 281 | return xxx_messageInfo_EnumContainerMessage1.Size(m) |
| 282 | } |
| 283 | func (m *EnumContainerMessage1) XXX_DiscardUnknown() { |
| 284 | xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m) |
| 285 | } |
| 286 | |
| 287 | var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo |
| 288 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 289 | type EnumContainerMessage1_EnumContainerMessage2 struct { |
Damien Neil | 658051b | 2018-09-10 12:26:21 -0700 | [diff] [blame] | 290 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 291 | XXX_unrecognized []byte `json:"-"` |
| 292 | XXX_sizecache int32 `json:"-"` |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 293 | } |
| 294 | |
Damien Neil | a1c6abc | 2018-09-12 13:36:34 -0700 | [diff] [blame] | 295 | func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() { |
| 296 | *m = EnumContainerMessage1_EnumContainerMessage2{} |
| 297 | } |
| 298 | func (m *EnumContainerMessage1_EnumContainerMessage2) String() string { |
| 299 | return proto.CompactTextString(m) |
| 300 | } |
| 301 | func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {} |
| 302 | func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) { |
| 303 | return fileDescriptor_de9f68860d540858, []int{0, 0} |
| 304 | } |
Damien Neil | 993c04d | 2018-09-14 15:41:11 -0700 | [diff] [blame] | 305 | |
Damien Neil | a1c6abc | 2018-09-12 13:36:34 -0700 | [diff] [blame] | 306 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error { |
| 307 | return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b) |
| 308 | } |
| 309 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 310 | return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic) |
| 311 | } |
| 312 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) { |
| 313 | xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src) |
| 314 | } |
| 315 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int { |
| 316 | return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m) |
| 317 | } |
| 318 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() { |
| 319 | xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m) |
| 320 | } |
| 321 | |
| 322 | var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo |
| 323 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 324 | func init() { |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 325 | proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1") |
| 326 | proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2") |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 327 | proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value) |
| 328 | proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value) |
| 329 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value) |
| 330 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value) |
| 331 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value) |
| 332 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value) |
| 333 | } |
| 334 | |
| 335 | func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) } |
| 336 | |
| 337 | var fileDescriptor_de9f68860d540858 = []byte{ |
| 338 | // 242 bytes of a gzipped FileDescriptorProto |
| 339 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc4, 0x30, |
| 340 | 0x14, 0xc6, 0xcd, 0x39, 0x88, 0x19, 0x34, 0x56, 0x6e, 0x39, 0x70, 0xb9, 0x45, 0x38, 0xb8, 0x86, |
| 341 | 0x64, 0x13, 0xa7, 0x56, 0xb3, 0x69, 0x6f, 0xb0, 0x2a, 0xb8, 0x1c, 0xa1, 0x7d, 0x3c, 0x0a, 0x6d, |
| 342 | 0x5e, 0x69, 0xd3, 0xc1, 0xff, 0xd3, 0x3f, 0x48, 0xae, 0x81, 0xb3, 0x42, 0x75, 0xca, 0xf7, 0xe5, |
| 343 | 0xfb, 0xf1, 0x1b, 0x1e, 0xbf, 0x6a, 0x3b, 0xf2, 0xa4, 0x25, 0xb8, 0xa1, 0x89, 0xc7, 0x1c, 0x2d, |
| 344 | 0x91, 0xc6, 0x10, 0x6a, 0x11, 0x1e, 0xbd, 0xfe, 0x62, 0x7c, 0x69, 0xdc, 0xd0, 0x3c, 0x90, 0xf3, |
| 345 | 0xb6, 0x72, 0xd0, 0x3d, 0x43, 0xdf, 0x5b, 0x04, 0xb5, 0xaa, 0xe6, 0x07, 0xbd, 0xbe, 0xe5, 0x22, |
| 346 | 0x83, 0xde, 0x43, 0x79, 0x98, 0xf3, 0xcf, 0x16, 0x74, 0x12, 0x5d, 0xf3, 0xcb, 0xcc, 0xbc, 0xe4, |
| 347 | 0xe6, 0x71, 0xaf, 0x93, 0xfd, 0x5b, 0xf2, 0xf4, 0x6a, 0xc4, 0xc9, 0x0c, 0x98, 0x4e, 0xc1, 0xf4, |
| 348 | 0x6f, 0x50, 0x4d, 0x8d, 0xea, 0x1f, 0xa3, 0x9a, 0x1a, 0xd5, 0xd1, 0xb8, 0xb9, 0xe1, 0xe7, 0x47, |
| 349 | 0x24, 0x3a, 0xe3, 0xa7, 0xbb, 0xcc, 0x08, 0x76, 0x08, 0xf9, 0xfb, 0x4e, 0x2c, 0x36, 0xf2, 0x67, |
| 350 | 0xd6, 0xd1, 0x05, 0xe7, 0xe5, 0xd0, 0xd6, 0x55, 0x61, 0x3d, 0x28, 0xc1, 0x7e, 0x75, 0x2d, 0xd8, |
| 351 | 0x6a, 0x21, 0x58, 0x7a, 0xff, 0x71, 0x87, 0x44, 0x58, 0x43, 0x8c, 0x54, 0x5b, 0x87, 0x31, 0x75, |
| 352 | 0x28, 0xc7, 0x13, 0xca, 0xa2, 0x29, 0x43, 0x2a, 0xb6, 0x08, 0x6e, 0x8b, 0x24, 0x3d, 0xf4, 0xbe, |
| 353 | 0xb4, 0xde, 0x86, 0x6f, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x53, 0xf7, 0xde, 0x8e, 0x01, |
| 354 | 0x00, 0x00, |
| 355 | } |