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" |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 9 | protoreflect "github.com/golang/protobuf/v2/reflect/protoreflect" |
| 10 | prototype "github.com/golang/protobuf/v2/reflect/prototype" |
| 11 | protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl" |
Damien Neil | 1ec3315 | 2018-09-13 13:12:36 -0700 | [diff] [blame] | 12 | math "math" |
| 13 | ) |
| 14 | |
| 15 | // Reference imports to suppress errors if they are not otherwise used. |
| 16 | var _ = proto.Marshal |
| 17 | var _ = fmt.Errorf |
| 18 | var _ = math.Inf |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 19 | |
Damien Neil | d412792 | 2018-09-12 11:13:49 -0700 | [diff] [blame] | 20 | // This is a compile-time assertion to ensure that this generated file |
| 21 | // is compatible with the proto package it is being compiled against. |
| 22 | // A compilation error at this line likely means your copy of the |
| 23 | // proto package needs to be updated. |
Joe Tsai | d7e97bc | 2018-11-26 12:57:27 -0800 | [diff] [blame] | 24 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
Damien Neil | d412792 | 2018-09-12 11:13:49 -0700 | [diff] [blame] | 25 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 26 | // EnumType1 comment. |
| 27 | type EnumType1 int32 |
| 28 | |
| 29 | const ( |
| 30 | // EnumType1_ONE comment. |
| 31 | EnumType1_ONE EnumType1 = 1 |
| 32 | // EnumType1_TWO comment. |
| 33 | EnumType1_TWO EnumType1 = 2 |
| 34 | ) |
| 35 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 36 | type xxx_EnumType1 EnumType1 |
| 37 | |
| 38 | func (e EnumType1) ProtoReflect() protoreflect.Enum { |
| 39 | return (xxx_EnumType1)(e) |
| 40 | } |
| 41 | func (e xxx_EnumType1) Type() protoreflect.EnumType { |
| 42 | return xxx_Enum_ProtoFile_EnumTypes[0] |
| 43 | } |
| 44 | func (e xxx_EnumType1) Number() protoreflect.EnumNumber { |
| 45 | return protoreflect.EnumNumber(e) |
| 46 | } |
| 47 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 48 | var EnumType1_name = map[int32]string{ |
| 49 | 1: "ONE", |
| 50 | 2: "TWO", |
| 51 | } |
| 52 | |
| 53 | var EnumType1_value = map[string]int32{ |
| 54 | "ONE": 1, |
| 55 | "TWO": 2, |
| 56 | } |
| 57 | |
| 58 | func (x EnumType1) Enum() *EnumType1 { |
| 59 | p := new(EnumType1) |
| 60 | *p = x |
| 61 | return p |
| 62 | } |
| 63 | |
| 64 | func (x EnumType1) String() string { |
| 65 | return proto.EnumName(EnumType1_name, int32(x)) |
| 66 | } |
| 67 | |
| 68 | func (x *EnumType1) UnmarshalJSON(data []byte) error { |
| 69 | value, err := proto.UnmarshalJSONEnum(EnumType1_value, data, "EnumType1") |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | *x = EnumType1(value) |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | func (EnumType1) EnumDescriptor() ([]byte, []int) { |
| 78 | return fileDescriptor_de9f68860d540858, []int{0} |
| 79 | } |
| 80 | |
| 81 | type EnumType2 int32 |
| 82 | |
| 83 | const ( |
| 84 | EnumType2_duplicate1 EnumType2 = 1 |
| 85 | EnumType2_duplicate2 EnumType2 = 1 |
| 86 | ) |
| 87 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 88 | type xxx_EnumType2 EnumType2 |
| 89 | |
| 90 | func (e EnumType2) ProtoReflect() protoreflect.Enum { |
| 91 | return (xxx_EnumType2)(e) |
| 92 | } |
| 93 | func (e xxx_EnumType2) Type() protoreflect.EnumType { |
| 94 | return xxx_Enum_ProtoFile_EnumTypes[1] |
| 95 | } |
| 96 | func (e xxx_EnumType2) Number() protoreflect.EnumNumber { |
| 97 | return protoreflect.EnumNumber(e) |
| 98 | } |
| 99 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 100 | var EnumType2_name = map[int32]string{ |
| 101 | 1: "duplicate1", |
| 102 | // Duplicate value: 1: "duplicate2", |
| 103 | } |
| 104 | |
| 105 | var EnumType2_value = map[string]int32{ |
| 106 | "duplicate1": 1, |
| 107 | "duplicate2": 1, |
| 108 | } |
| 109 | |
| 110 | func (x EnumType2) Enum() *EnumType2 { |
| 111 | p := new(EnumType2) |
| 112 | *p = x |
| 113 | return p |
| 114 | } |
| 115 | |
| 116 | func (x EnumType2) String() string { |
| 117 | return proto.EnumName(EnumType2_name, int32(x)) |
| 118 | } |
| 119 | |
| 120 | func (x *EnumType2) UnmarshalJSON(data []byte) error { |
| 121 | value, err := proto.UnmarshalJSONEnum(EnumType2_value, data, "EnumType2") |
| 122 | if err != nil { |
| 123 | return err |
| 124 | } |
| 125 | *x = EnumType2(value) |
| 126 | return nil |
| 127 | } |
| 128 | |
| 129 | func (EnumType2) EnumDescriptor() ([]byte, []int) { |
| 130 | return fileDescriptor_de9f68860d540858, []int{1} |
| 131 | } |
| 132 | |
| 133 | // NestedEnumType1A comment. |
| 134 | type EnumContainerMessage1_NestedEnumType1A int32 |
| 135 | |
| 136 | const ( |
| 137 | // NestedEnumType1A_VALUE comment. |
| 138 | EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0 |
| 139 | ) |
| 140 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 141 | type xxx_EnumContainerMessage1_NestedEnumType1A EnumContainerMessage1_NestedEnumType1A |
| 142 | |
| 143 | func (e EnumContainerMessage1_NestedEnumType1A) ProtoReflect() protoreflect.Enum { |
| 144 | return (xxx_EnumContainerMessage1_NestedEnumType1A)(e) |
| 145 | } |
| 146 | func (e xxx_EnumContainerMessage1_NestedEnumType1A) Type() protoreflect.EnumType { |
| 147 | return xxx_Enum_ProtoFile_EnumTypes[2] |
| 148 | } |
| 149 | func (e xxx_EnumContainerMessage1_NestedEnumType1A) Number() protoreflect.EnumNumber { |
| 150 | return protoreflect.EnumNumber(e) |
| 151 | } |
| 152 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 153 | var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{ |
| 154 | 0: "NESTED_1A_VALUE", |
| 155 | } |
| 156 | |
| 157 | var EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{ |
| 158 | "NESTED_1A_VALUE": 0, |
| 159 | } |
| 160 | |
| 161 | func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A { |
| 162 | p := new(EnumContainerMessage1_NestedEnumType1A) |
| 163 | *p = x |
| 164 | return p |
| 165 | } |
| 166 | |
| 167 | func (x EnumContainerMessage1_NestedEnumType1A) String() string { |
| 168 | return proto.EnumName(EnumContainerMessage1_NestedEnumType1A_name, int32(x)) |
| 169 | } |
| 170 | |
| 171 | func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(data []byte) error { |
| 172 | value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1A_value, data, "EnumContainerMessage1_NestedEnumType1A") |
| 173 | if err != nil { |
| 174 | return err |
| 175 | } |
| 176 | *x = EnumContainerMessage1_NestedEnumType1A(value) |
| 177 | return nil |
| 178 | } |
| 179 | |
| 180 | func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) { |
| 181 | return fileDescriptor_de9f68860d540858, []int{0, 0} |
| 182 | } |
| 183 | |
| 184 | type EnumContainerMessage1_NestedEnumType1B int32 |
| 185 | |
| 186 | const ( |
| 187 | EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0 |
| 188 | ) |
| 189 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 190 | type xxx_EnumContainerMessage1_NestedEnumType1B EnumContainerMessage1_NestedEnumType1B |
| 191 | |
| 192 | func (e EnumContainerMessage1_NestedEnumType1B) ProtoReflect() protoreflect.Enum { |
| 193 | return (xxx_EnumContainerMessage1_NestedEnumType1B)(e) |
| 194 | } |
| 195 | func (e xxx_EnumContainerMessage1_NestedEnumType1B) Type() protoreflect.EnumType { |
| 196 | return xxx_Enum_ProtoFile_EnumTypes[3] |
| 197 | } |
| 198 | func (e xxx_EnumContainerMessage1_NestedEnumType1B) Number() protoreflect.EnumNumber { |
| 199 | return protoreflect.EnumNumber(e) |
| 200 | } |
| 201 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 202 | var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{ |
| 203 | 0: "NESTED_1B_VALUE", |
| 204 | } |
| 205 | |
| 206 | var EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{ |
| 207 | "NESTED_1B_VALUE": 0, |
| 208 | } |
| 209 | |
| 210 | func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B { |
| 211 | p := new(EnumContainerMessage1_NestedEnumType1B) |
| 212 | *p = x |
| 213 | return p |
| 214 | } |
| 215 | |
| 216 | func (x EnumContainerMessage1_NestedEnumType1B) String() string { |
| 217 | return proto.EnumName(EnumContainerMessage1_NestedEnumType1B_name, int32(x)) |
| 218 | } |
| 219 | |
| 220 | func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(data []byte) error { |
| 221 | value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_NestedEnumType1B_value, data, "EnumContainerMessage1_NestedEnumType1B") |
| 222 | if err != nil { |
| 223 | return err |
| 224 | } |
| 225 | *x = EnumContainerMessage1_NestedEnumType1B(value) |
| 226 | return nil |
| 227 | } |
| 228 | |
| 229 | func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) { |
| 230 | return fileDescriptor_de9f68860d540858, []int{0, 1} |
| 231 | } |
| 232 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 233 | // NestedEnumType2A comment. |
| 234 | type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32 |
| 235 | |
| 236 | const ( |
| 237 | // NestedEnumType2A_VALUE comment. |
| 238 | EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0 |
| 239 | ) |
| 240 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 241 | type xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A |
| 242 | |
| 243 | func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) ProtoReflect() protoreflect.Enum { |
| 244 | return (xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)(e) |
| 245 | } |
| 246 | func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Type() protoreflect.EnumType { |
| 247 | return xxx_Enum_ProtoFile_EnumTypes[4] |
| 248 | } |
| 249 | func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Number() protoreflect.EnumNumber { |
| 250 | return protoreflect.EnumNumber(e) |
| 251 | } |
| 252 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 253 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{ |
| 254 | 0: "NESTED_2A_VALUE", |
| 255 | } |
| 256 | |
| 257 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{ |
| 258 | "NESTED_2A_VALUE": 0, |
| 259 | } |
| 260 | |
| 261 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A { |
| 262 | p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) |
| 263 | *p = x |
| 264 | return p |
| 265 | } |
| 266 | |
| 267 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string { |
| 268 | return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, int32(x)) |
| 269 | } |
| 270 | |
| 271 | func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(data []byte) error { |
| 272 | value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A") |
| 273 | if err != nil { |
| 274 | return err |
| 275 | } |
| 276 | *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(value) |
| 277 | return nil |
| 278 | } |
| 279 | |
| 280 | func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) { |
| 281 | return fileDescriptor_de9f68860d540858, []int{0, 0, 0} |
| 282 | } |
| 283 | |
| 284 | type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32 |
| 285 | |
| 286 | const ( |
| 287 | EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0 |
| 288 | ) |
| 289 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 290 | type xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B |
| 291 | |
| 292 | func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) ProtoReflect() protoreflect.Enum { |
| 293 | return (xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)(e) |
| 294 | } |
| 295 | func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Type() protoreflect.EnumType { |
| 296 | return xxx_Enum_ProtoFile_EnumTypes[5] |
| 297 | } |
| 298 | func (e xxx_EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Number() protoreflect.EnumNumber { |
| 299 | return protoreflect.EnumNumber(e) |
| 300 | } |
| 301 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 302 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{ |
| 303 | 0: "NESTED_2B_VALUE", |
| 304 | } |
| 305 | |
| 306 | var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{ |
| 307 | "NESTED_2B_VALUE": 0, |
| 308 | } |
| 309 | |
| 310 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B { |
| 311 | p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) |
| 312 | *p = x |
| 313 | return p |
| 314 | } |
| 315 | |
| 316 | func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string { |
| 317 | return proto.EnumName(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, int32(x)) |
| 318 | } |
| 319 | |
| 320 | func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(data []byte) error { |
| 321 | value, err := proto.UnmarshalJSONEnum(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value, data, "EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B") |
| 322 | if err != nil { |
| 323 | return err |
| 324 | } |
| 325 | *x = EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(value) |
| 326 | return nil |
| 327 | } |
| 328 | |
| 329 | func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) { |
| 330 | return fileDescriptor_de9f68860d540858, []int{0, 0, 1} |
| 331 | } |
| 332 | |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 333 | type EnumContainerMessage1 struct { |
Damien Neil | a485fbd | 2018-10-26 13:28:37 -0700 | [diff] [blame] | 334 | DefaultDuplicate1 *EnumType2 `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate1,omitempty"` |
| 335 | DefaultDuplicate2 *EnumType2 `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate2,omitempty"` |
| 336 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 337 | XXX_unrecognized []byte `json:"-"` |
| 338 | XXX_sizecache int32 `json:"-"` |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 339 | } |
| 340 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 341 | type xxx_EnumContainerMessage1 struct{ m *EnumContainerMessage1 } |
| 342 | |
| 343 | func (m *EnumContainerMessage1) ProtoReflect() protoreflect.Message { |
| 344 | return xxx_EnumContainerMessage1{m} |
| 345 | } |
| 346 | func (m xxx_EnumContainerMessage1) Type() protoreflect.MessageType { |
| 347 | return xxx_Enum_ProtoFile_MessageTypes[0].Type |
| 348 | } |
| 349 | func (m xxx_EnumContainerMessage1) KnownFields() protoreflect.KnownFields { |
| 350 | return xxx_Enum_ProtoFile_MessageTypes[0].KnownFieldsOf(m.m) |
| 351 | } |
| 352 | func (m xxx_EnumContainerMessage1) UnknownFields() protoreflect.UnknownFields { |
| 353 | return xxx_Enum_ProtoFile_MessageTypes[0].UnknownFieldsOf(m.m) |
| 354 | } |
| 355 | func (m xxx_EnumContainerMessage1) Interface() protoreflect.ProtoMessage { |
| 356 | return m.m |
| 357 | } |
| 358 | func (m xxx_EnumContainerMessage1) ProtoMutable() {} |
| 359 | |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 360 | func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} } |
| 361 | func (m *EnumContainerMessage1) String() string { return proto.CompactTextString(m) } |
| 362 | func (*EnumContainerMessage1) ProtoMessage() {} |
| 363 | func (*EnumContainerMessage1) Descriptor() ([]byte, []int) { |
| 364 | return fileDescriptor_de9f68860d540858, []int{0} |
| 365 | } |
Damien Neil | 993c04d | 2018-09-14 15:41:11 -0700 | [diff] [blame] | 366 | |
Damien Neil | ce36f8d | 2018-09-13 15:19:08 -0700 | [diff] [blame] | 367 | func (m *EnumContainerMessage1) XXX_Unmarshal(b []byte) error { |
| 368 | return xxx_messageInfo_EnumContainerMessage1.Unmarshal(m, b) |
| 369 | } |
| 370 | func (m *EnumContainerMessage1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 371 | return xxx_messageInfo_EnumContainerMessage1.Marshal(b, m, deterministic) |
| 372 | } |
| 373 | func (m *EnumContainerMessage1) XXX_Merge(src proto.Message) { |
| 374 | xxx_messageInfo_EnumContainerMessage1.Merge(m, src) |
| 375 | } |
| 376 | func (m *EnumContainerMessage1) XXX_Size() int { |
| 377 | return xxx_messageInfo_EnumContainerMessage1.Size(m) |
| 378 | } |
| 379 | func (m *EnumContainerMessage1) XXX_DiscardUnknown() { |
| 380 | xxx_messageInfo_EnumContainerMessage1.DiscardUnknown(m) |
| 381 | } |
| 382 | |
| 383 | var xxx_messageInfo_EnumContainerMessage1 proto.InternalMessageInfo |
| 384 | |
Damien Neil | a485fbd | 2018-10-26 13:28:37 -0700 | [diff] [blame] | 385 | const Default_EnumContainerMessage1_DefaultDuplicate1 EnumType2 = EnumType2_duplicate1 |
| 386 | const Default_EnumContainerMessage1_DefaultDuplicate2 EnumType2 = EnumType2_duplicate2 |
| 387 | |
| 388 | func (m *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 { |
| 389 | if m != nil && m.DefaultDuplicate1 != nil { |
| 390 | return *m.DefaultDuplicate1 |
| 391 | } |
| 392 | return Default_EnumContainerMessage1_DefaultDuplicate1 |
| 393 | } |
| 394 | |
| 395 | func (m *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 { |
| 396 | if m != nil && m.DefaultDuplicate2 != nil { |
| 397 | return *m.DefaultDuplicate2 |
| 398 | } |
| 399 | return Default_EnumContainerMessage1_DefaultDuplicate2 |
| 400 | } |
| 401 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 402 | type EnumContainerMessage1_EnumContainerMessage2 struct { |
Damien Neil | 658051b | 2018-09-10 12:26:21 -0700 | [diff] [blame] | 403 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 404 | XXX_unrecognized []byte `json:"-"` |
| 405 | XXX_sizecache int32 `json:"-"` |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 406 | } |
| 407 | |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 408 | type xxx_EnumContainerMessage1_EnumContainerMessage2 struct { |
| 409 | m *EnumContainerMessage1_EnumContainerMessage2 |
| 410 | } |
| 411 | |
| 412 | func (m *EnumContainerMessage1_EnumContainerMessage2) ProtoReflect() protoreflect.Message { |
| 413 | return xxx_EnumContainerMessage1_EnumContainerMessage2{m} |
| 414 | } |
| 415 | func (m xxx_EnumContainerMessage1_EnumContainerMessage2) Type() protoreflect.MessageType { |
| 416 | return xxx_Enum_ProtoFile_MessageTypes[1].Type |
| 417 | } |
| 418 | func (m xxx_EnumContainerMessage1_EnumContainerMessage2) KnownFields() protoreflect.KnownFields { |
| 419 | return xxx_Enum_ProtoFile_MessageTypes[1].KnownFieldsOf(m.m) |
| 420 | } |
| 421 | func (m xxx_EnumContainerMessage1_EnumContainerMessage2) UnknownFields() protoreflect.UnknownFields { |
| 422 | return xxx_Enum_ProtoFile_MessageTypes[1].UnknownFieldsOf(m.m) |
| 423 | } |
| 424 | func (m xxx_EnumContainerMessage1_EnumContainerMessage2) Interface() protoreflect.ProtoMessage { |
| 425 | return m.m |
| 426 | } |
| 427 | func (m xxx_EnumContainerMessage1_EnumContainerMessage2) ProtoMutable() {} |
| 428 | |
Damien Neil | a1c6abc | 2018-09-12 13:36:34 -0700 | [diff] [blame] | 429 | func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() { |
| 430 | *m = EnumContainerMessage1_EnumContainerMessage2{} |
| 431 | } |
| 432 | func (m *EnumContainerMessage1_EnumContainerMessage2) String() string { |
| 433 | return proto.CompactTextString(m) |
| 434 | } |
| 435 | func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {} |
| 436 | func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) { |
| 437 | return fileDescriptor_de9f68860d540858, []int{0, 0} |
| 438 | } |
Damien Neil | 993c04d | 2018-09-14 15:41:11 -0700 | [diff] [blame] | 439 | |
Damien Neil | a1c6abc | 2018-09-12 13:36:34 -0700 | [diff] [blame] | 440 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Unmarshal(b []byte) error { |
| 441 | return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Unmarshal(m, b) |
| 442 | } |
| 443 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 444 | return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Marshal(b, m, deterministic) |
| 445 | } |
| 446 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Merge(src proto.Message) { |
| 447 | xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Merge(m, src) |
| 448 | } |
| 449 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_Size() int { |
| 450 | return xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.Size(m) |
| 451 | } |
| 452 | func (m *EnumContainerMessage1_EnumContainerMessage2) XXX_DiscardUnknown() { |
| 453 | xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2.DiscardUnknown(m) |
| 454 | } |
| 455 | |
| 456 | var xxx_messageInfo_EnumContainerMessage1_EnumContainerMessage2 proto.InternalMessageInfo |
| 457 | |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 458 | func init() { |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 459 | proto.RegisterEnum("goproto.protoc.proto2.EnumType1", EnumType1_name, EnumType1_value) |
| 460 | proto.RegisterEnum("goproto.protoc.proto2.EnumType2", EnumType2_name, EnumType2_value) |
| 461 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1A", EnumContainerMessage1_NestedEnumType1A_name, EnumContainerMessage1_NestedEnumType1A_value) |
| 462 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_NestedEnumType1B", EnumContainerMessage1_NestedEnumType1B_name, EnumContainerMessage1_NestedEnumType1B_value) |
| 463 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value) |
| 464 | proto.RegisterEnum("goproto.protoc.proto2.EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B", EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name, EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value) |
Damien Neil | 154da98 | 2018-09-19 13:21:58 -0700 | [diff] [blame] | 465 | proto.RegisterType((*EnumContainerMessage1)(nil), "goproto.protoc.proto2.EnumContainerMessage1") |
| 466 | proto.RegisterType((*EnumContainerMessage1_EnumContainerMessage2)(nil), "goproto.protoc.proto2.EnumContainerMessage1.EnumContainerMessage2") |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 467 | } |
| 468 | |
| 469 | func init() { proto.RegisterFile("proto2/enum.proto", fileDescriptor_de9f68860d540858) } |
| 470 | |
| 471 | var fileDescriptor_de9f68860d540858 = []byte{ |
Damien Neil | a485fbd | 2018-10-26 13:28:37 -0700 | [diff] [blame] | 472 | // 296 bytes of a gzipped FileDescriptorProto |
| 473 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd0, 0xc1, 0x4b, 0xfb, 0x30, |
| 474 | 0x14, 0x07, 0xf0, 0x5f, 0xb6, 0xc3, 0x0f, 0x73, 0x98, 0x59, 0x64, 0x30, 0x06, 0xc2, 0xd8, 0x45, |
| 475 | 0x19, 0xac, 0x21, 0xef, 0xe8, 0x45, 0x3a, 0xd7, 0x9b, 0x6e, 0xa0, 0x53, 0x41, 0x0f, 0x25, 0x6b, |
| 476 | 0xb3, 0x58, 0x68, 0x93, 0xb2, 0x26, 0x82, 0xff, 0x84, 0x7f, 0xb3, 0xac, 0x95, 0xae, 0x62, 0x15, |
| 477 | 0x3c, 0xe5, 0xbd, 0x97, 0x6f, 0x3e, 0x90, 0x87, 0xfb, 0xf9, 0xce, 0x58, 0x03, 0x4c, 0x6a, 0x97, |
| 478 | 0x79, 0x65, 0x4d, 0x07, 0xca, 0x94, 0x45, 0xd5, 0x46, 0xd5, 0x01, 0x93, 0xf7, 0x2e, 0x1e, 0x04, |
| 479 | 0xda, 0x65, 0x57, 0x46, 0x5b, 0x91, 0x68, 0xb9, 0xbb, 0x91, 0x45, 0x21, 0x94, 0xe4, 0xf4, 0x19, |
| 480 | 0xd3, 0x58, 0x6e, 0x85, 0x4b, 0x6d, 0x18, 0xbb, 0x3c, 0x4d, 0x22, 0x61, 0x25, 0x1f, 0xa2, 0x31, |
| 481 | 0x3a, 0xef, 0xc1, 0xd8, 0x6b, 0xd5, 0xbc, 0xbd, 0xb4, 0x7e, 0xcb, 0x25, 0x5c, 0xe0, 0xc3, 0x9b, |
| 482 | 0xdb, 0xfe, 0xa7, 0xb3, 0xa8, 0x47, 0xad, 0x38, 0x0c, 0x3b, 0x7f, 0xc6, 0xe1, 0x3b, 0x0e, 0xa3, |
| 483 | 0xa4, 0xfd, 0x4b, 0x30, 0x39, 0xc3, 0x64, 0x29, 0x0b, 0x2b, 0xe3, 0x9a, 0xf2, 0xe9, 0x09, 0x3e, |
| 484 | 0x5e, 0x06, 0x77, 0xeb, 0x60, 0x11, 0x82, 0x1f, 0x3e, 0xf8, 0xd7, 0xf7, 0x01, 0xf9, 0xd7, 0x12, |
| 485 | 0x9c, 0x37, 0x83, 0xf3, 0x9f, 0x83, 0xbc, 0x29, 0xf2, 0x5f, 0x44, 0xde, 0x14, 0x79, 0x2d, 0x4e, |
| 486 | 0x4f, 0xf1, 0x51, 0x1d, 0xa1, 0xff, 0x71, 0x77, 0xb5, 0x0c, 0x08, 0xda, 0x17, 0xeb, 0xc7, 0x15, |
| 487 | 0xe9, 0x4c, 0xd9, 0xe1, 0x1a, 0x68, 0x0f, 0x37, 0xd6, 0x4c, 0xd0, 0x97, 0x1e, 0x08, 0x1a, 0x75, |
| 488 | 0x08, 0x9a, 0xfb, 0x4f, 0x97, 0x2a, 0xb1, 0x2f, 0x6e, 0xe3, 0x45, 0x26, 0x63, 0xca, 0xa4, 0x42, |
| 489 | 0x2b, 0x56, 0x6e, 0x74, 0xe3, 0xb6, 0xec, 0x15, 0x58, 0x94, 0xc5, 0x55, 0x1f, 0xcd, 0x94, 0xd4, |
| 490 | 0x33, 0x65, 0x98, 0x95, 0x85, 0x8d, 0x85, 0x15, 0xd5, 0x18, 0x3e, 0x02, 0x00, 0x00, 0xff, 0xff, |
| 491 | 0x26, 0xf5, 0x57, 0x52, 0x4e, 0x02, 0x00, 0x00, |
Damien Neil | 46abb57 | 2018-09-07 12:45:37 -0700 | [diff] [blame] | 492 | } |
Joe Tsai | b6405bd | 2018-11-15 14:44:37 -0800 | [diff] [blame^] | 493 | |
| 494 | func init() { |
| 495 | xxx_Enum_ProtoFile_FileDesc.Enums = xxx_Enum_ProtoFile_EnumDescs[0:2] |
| 496 | xxx_Enum_ProtoFile_FileDesc.Messages = xxx_Enum_ProtoFile_MessageDescs[0:1] |
| 497 | xxx_Enum_ProtoFile_MessageDescs[0].Enums = xxx_Enum_ProtoFile_EnumDescs[2:4] |
| 498 | xxx_Enum_ProtoFile_MessageDescs[0].Messages = xxx_Enum_ProtoFile_MessageDescs[1:2] |
| 499 | xxx_Enum_ProtoFile_MessageDescs[1].Enums = xxx_Enum_ProtoFile_EnumDescs[4:6] |
| 500 | xxx_Enum_ProtoFile_MessageDescs[0].Fields[0].EnumType = xxx_Enum_ProtoFile_EnumTypes[1] |
| 501 | xxx_Enum_ProtoFile_MessageDescs[0].Fields[1].EnumType = xxx_Enum_ProtoFile_EnumTypes[1] |
| 502 | var err error |
| 503 | Enum_ProtoFile, err = prototype.NewFile(&xxx_Enum_ProtoFile_FileDesc) |
| 504 | if err != nil { |
| 505 | panic(err) |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | const _ = protoimpl.EnforceVersion(protoimpl.Version - 0) |
| 510 | |
| 511 | var Enum_ProtoFile protoreflect.FileDescriptor |
| 512 | |
| 513 | var xxx_Enum_ProtoFile_FileDesc = prototype.File{ |
| 514 | Syntax: protoreflect.Proto2, |
| 515 | Path: "proto2/enum.proto", |
| 516 | Package: "goproto.protoc.proto2", |
| 517 | } |
| 518 | var xxx_Enum_ProtoFile_EnumTypes = [6]protoreflect.EnumType{ |
| 519 | prototype.GoEnum( |
| 520 | xxx_Enum_ProtoFile_EnumDescs[0].Reference(), |
| 521 | func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum { |
| 522 | return EnumType1(n) |
| 523 | }, |
| 524 | ), |
| 525 | prototype.GoEnum( |
| 526 | xxx_Enum_ProtoFile_EnumDescs[1].Reference(), |
| 527 | func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum { |
| 528 | return EnumType2(n) |
| 529 | }, |
| 530 | ), |
| 531 | prototype.GoEnum( |
| 532 | xxx_Enum_ProtoFile_EnumDescs[2].Reference(), |
| 533 | func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum { |
| 534 | return EnumContainerMessage1_NestedEnumType1A(n) |
| 535 | }, |
| 536 | ), |
| 537 | prototype.GoEnum( |
| 538 | xxx_Enum_ProtoFile_EnumDescs[3].Reference(), |
| 539 | func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum { |
| 540 | return EnumContainerMessage1_NestedEnumType1B(n) |
| 541 | }, |
| 542 | ), |
| 543 | prototype.GoEnum( |
| 544 | xxx_Enum_ProtoFile_EnumDescs[4].Reference(), |
| 545 | func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum { |
| 546 | return EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A(n) |
| 547 | }, |
| 548 | ), |
| 549 | prototype.GoEnum( |
| 550 | xxx_Enum_ProtoFile_EnumDescs[5].Reference(), |
| 551 | func(_ protoreflect.EnumType, n protoreflect.EnumNumber) protoreflect.ProtoEnum { |
| 552 | return EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B(n) |
| 553 | }, |
| 554 | ), |
| 555 | } |
| 556 | var xxx_Enum_ProtoFile_EnumDescs = [6]prototype.Enum{ |
| 557 | { |
| 558 | Name: "EnumType1", |
| 559 | Values: []prototype.EnumValue{ |
| 560 | {Name: "ONE", Number: 1}, |
| 561 | {Name: "TWO", Number: 2}, |
| 562 | }, |
| 563 | }, |
| 564 | { |
| 565 | Name: "EnumType2", |
| 566 | Values: []prototype.EnumValue{ |
| 567 | {Name: "duplicate1", Number: 1}, |
| 568 | {Name: "duplicate2", Number: 1}, |
| 569 | }, |
| 570 | }, |
| 571 | { |
| 572 | Name: "NestedEnumType1A", |
| 573 | Values: []prototype.EnumValue{ |
| 574 | {Name: "NESTED_1A_VALUE", Number: 0}, |
| 575 | }, |
| 576 | }, |
| 577 | { |
| 578 | Name: "NestedEnumType1B", |
| 579 | Values: []prototype.EnumValue{ |
| 580 | {Name: "NESTED_1B_VALUE", Number: 0}, |
| 581 | }, |
| 582 | }, |
| 583 | { |
| 584 | Name: "NestedEnumType2A", |
| 585 | Values: []prototype.EnumValue{ |
| 586 | {Name: "NESTED_2A_VALUE", Number: 0}, |
| 587 | }, |
| 588 | }, |
| 589 | { |
| 590 | Name: "NestedEnumType2B", |
| 591 | Values: []prototype.EnumValue{ |
| 592 | {Name: "NESTED_2B_VALUE", Number: 0}, |
| 593 | }, |
| 594 | }, |
| 595 | } |
| 596 | var xxx_Enum_ProtoFile_MessageTypes = [2]protoimpl.MessageType{ |
| 597 | {Type: prototype.GoMessage( |
| 598 | xxx_Enum_ProtoFile_MessageDescs[0].Reference(), |
| 599 | func(protoreflect.MessageType) protoreflect.ProtoMessage { |
| 600 | return new(EnumContainerMessage1) |
| 601 | }, |
| 602 | )}, |
| 603 | {Type: prototype.GoMessage( |
| 604 | xxx_Enum_ProtoFile_MessageDescs[1].Reference(), |
| 605 | func(protoreflect.MessageType) protoreflect.ProtoMessage { |
| 606 | return new(EnumContainerMessage1_EnumContainerMessage2) |
| 607 | }, |
| 608 | )}, |
| 609 | } |
| 610 | var xxx_Enum_ProtoFile_MessageDescs = [2]prototype.Message{ |
| 611 | { |
| 612 | Name: "EnumContainerMessage1", |
| 613 | Fields: []prototype.Field{ |
| 614 | { |
| 615 | Name: "default_duplicate1", |
| 616 | Number: 1, |
| 617 | Cardinality: protoreflect.Optional, |
| 618 | Kind: protoreflect.EnumKind, |
| 619 | JSONName: "defaultDuplicate1", |
| 620 | Default: protoreflect.ValueOf(string("duplicate1")), |
| 621 | }, |
| 622 | { |
| 623 | Name: "default_duplicate2", |
| 624 | Number: 2, |
| 625 | Cardinality: protoreflect.Optional, |
| 626 | Kind: protoreflect.EnumKind, |
| 627 | JSONName: "defaultDuplicate2", |
| 628 | Default: protoreflect.ValueOf(string("duplicate2")), |
| 629 | }, |
| 630 | }, |
| 631 | }, |
| 632 | { |
| 633 | Name: "EnumContainerMessage2", |
| 634 | }, |
| 635 | } |