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