| 1 |
// Copyright 2024 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 6 |
// source: cmd/protoc-gen-go/testdata/protoeditions/enum.proto |
| 7 |
|
| 8 |
package protoeditions |
| 9 |
|
| 10 |
import ( |
| 11 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 12 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 13 |
_ "google.golang.org/protobuf/types/gofeaturespb" |
| 14 |
reflect "reflect" |
| 15 |
sync "sync" |
| 16 |
unsafe "unsafe" |
| 17 |
) |
| 18 |
|
| 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 |
|
| 29 |
// Enum value maps for EnumType1. |
| 30 |
var ( |
| 31 |
EnumType1_name = map[int32]string{ |
| 32 |
1: "ONE", |
| 33 |
2: "TWO", |
| 34 |
} |
| 35 |
EnumType1_value = map[string]int32{ |
| 36 |
"ONE": 1, |
| 37 |
"TWO": 2, |
| 38 |
} |
| 39 |
) |
| 40 |
|
| 41 |
func (x EnumType1) Enum() *EnumType1 { |
| 42 |
p := new(EnumType1) |
| 43 |
*p = x |
| 44 |
return p |
| 45 |
} |
| 46 |
|
| 47 |
func (x EnumType1) String() string { |
| 48 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 49 |
} |
| 50 |
|
| 51 |
func (EnumType1) Descriptor() protoreflect.EnumDescriptor { |
| 52 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[0].Descriptor() |
| 53 |
} |
| 54 |
|
| 55 |
func (EnumType1) Type() protoreflect.EnumType { |
| 56 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[0] |
| 57 |
} |
| 58 |
|
| 59 |
func (x EnumType1) Number() protoreflect.EnumNumber { |
| 60 |
return protoreflect.EnumNumber(x) |
| 61 |
} |
| 62 |
|
| 63 |
// Deprecated: Use EnumType1.Descriptor instead. |
| 64 |
func (EnumType1) EnumDescriptor() ([]byte, []int) { |
| 65 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0} |
| 66 |
} |
| 67 |
|
| 68 |
type EnumType2 int32 |
| 69 |
|
| 70 |
const ( |
| 71 |
EnumType2_duplicate1 EnumType2 = 1 |
| 72 |
EnumType2_duplicate2 EnumType2 = 1 |
| 73 |
) |
| 74 |
|
| 75 |
// Enum value maps for EnumType2. |
| 76 |
var ( |
| 77 |
EnumType2_name = map[int32]string{ |
| 78 |
1: "duplicate1", |
| 79 |
// Duplicate value: 1: "duplicate2", |
| 80 |
} |
| 81 |
EnumType2_value = map[string]int32{ |
| 82 |
"duplicate1": 1, |
| 83 |
"duplicate2": 1, |
| 84 |
} |
| 85 |
) |
| 86 |
|
| 87 |
func (x EnumType2) Enum() *EnumType2 { |
| 88 |
p := new(EnumType2) |
| 89 |
*p = x |
| 90 |
return p |
| 91 |
} |
| 92 |
|
| 93 |
func (x EnumType2) String() string { |
| 94 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 95 |
} |
| 96 |
|
| 97 |
func (EnumType2) Descriptor() protoreflect.EnumDescriptor { |
| 98 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[1].Descriptor() |
| 99 |
} |
| 100 |
|
| 101 |
func (EnumType2) Type() protoreflect.EnumType { |
| 102 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[1] |
| 103 |
} |
| 104 |
|
| 105 |
func (x EnumType2) Number() protoreflect.EnumNumber { |
| 106 |
return protoreflect.EnumNumber(x) |
| 107 |
} |
| 108 |
|
| 109 |
// Deprecated: Use EnumType2.Descriptor instead. |
| 110 |
func (EnumType2) EnumDescriptor() ([]byte, []int) { |
| 111 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{1} |
| 112 |
} |
| 113 |
|
| 114 |
type LegacyUnmarshalJSONTest int32 |
| 115 |
|
| 116 |
const ( |
| 117 |
LegacyUnmarshalJSONTest_FOO LegacyUnmarshalJSONTest = 0 |
| 118 |
LegacyUnmarshalJSONTest_BAR LegacyUnmarshalJSONTest = 1 |
| 119 |
LegacyUnmarshalJSONTest_BAZ LegacyUnmarshalJSONTest = 4 |
| 120 |
) |
| 121 |
|
| 122 |
// Enum value maps for LegacyUnmarshalJSONTest. |
| 123 |
var ( |
| 124 |
LegacyUnmarshalJSONTest_name = map[int32]string{ |
| 125 |
0: "FOO", |
| 126 |
1: "BAR", |
| 127 |
4: "BAZ", |
| 128 |
} |
| 129 |
LegacyUnmarshalJSONTest_value = map[string]int32{ |
| 130 |
"FOO": 0, |
| 131 |
"BAR": 1, |
| 132 |
"BAZ": 4, |
| 133 |
} |
| 134 |
) |
| 135 |
|
| 136 |
func (x LegacyUnmarshalJSONTest) Enum() *LegacyUnmarshalJSONTest { |
| 137 |
p := new(LegacyUnmarshalJSONTest) |
| 138 |
*p = x |
| 139 |
return p |
| 140 |
} |
| 141 |
|
| 142 |
func (x LegacyUnmarshalJSONTest) String() string { |
| 143 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 144 |
} |
| 145 |
|
| 146 |
func (LegacyUnmarshalJSONTest) Descriptor() protoreflect.EnumDescriptor { |
| 147 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[2].Descriptor() |
| 148 |
} |
| 149 |
|
| 150 |
func (LegacyUnmarshalJSONTest) Type() protoreflect.EnumType { |
| 151 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[2] |
| 152 |
} |
| 153 |
|
| 154 |
func (x LegacyUnmarshalJSONTest) Number() protoreflect.EnumNumber { |
| 155 |
return protoreflect.EnumNumber(x) |
| 156 |
} |
| 157 |
|
| 158 |
// Deprecated: Do not use. |
| 159 |
func (x *LegacyUnmarshalJSONTest) UnmarshalJSON(b []byte) error { |
| 160 |
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) |
| 161 |
if err != nil { |
| 162 |
return err |
| 163 |
} |
| 164 |
*x = LegacyUnmarshalJSONTest(num) |
| 165 |
return nil |
| 166 |
} |
| 167 |
|
| 168 |
// Deprecated: Use LegacyUnmarshalJSONTest.Descriptor instead. |
| 169 |
func (LegacyUnmarshalJSONTest) EnumDescriptor() ([]byte, []int) { |
| 170 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{2} |
| 171 |
} |
| 172 |
|
| 173 |
// NestedEnumType1A comment. |
| 174 |
type EnumContainerMessage1_NestedEnumType1A int32 |
| 175 |
|
| 176 |
const ( |
| 177 |
// NestedEnumType1A_VALUE comment. |
| 178 |
EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0 |
| 179 |
) |
| 180 |
|
| 181 |
// Enum value maps for EnumContainerMessage1_NestedEnumType1A. |
| 182 |
var ( |
| 183 |
EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{ |
| 184 |
0: "NESTED_1A_VALUE", |
| 185 |
} |
| 186 |
EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{ |
| 187 |
"NESTED_1A_VALUE": 0, |
| 188 |
} |
| 189 |
) |
| 190 |
|
| 191 |
func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A { |
| 192 |
p := new(EnumContainerMessage1_NestedEnumType1A) |
| 193 |
*p = x |
| 194 |
return p |
| 195 |
} |
| 196 |
|
| 197 |
func (x EnumContainerMessage1_NestedEnumType1A) String() string { |
| 198 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 199 |
} |
| 200 |
|
| 201 |
func (EnumContainerMessage1_NestedEnumType1A) Descriptor() protoreflect.EnumDescriptor { |
| 202 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[3].Descriptor() |
| 203 |
} |
| 204 |
|
| 205 |
func (EnumContainerMessage1_NestedEnumType1A) Type() protoreflect.EnumType { |
| 206 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[3] |
| 207 |
} |
| 208 |
|
| 209 |
func (x EnumContainerMessage1_NestedEnumType1A) Number() protoreflect.EnumNumber { |
| 210 |
return protoreflect.EnumNumber(x) |
| 211 |
} |
| 212 |
|
| 213 |
// Deprecated: Use EnumContainerMessage1_NestedEnumType1A.Descriptor instead. |
| 214 |
func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) { |
| 215 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0} |
| 216 |
} |
| 217 |
|
| 218 |
type EnumContainerMessage1_NestedEnumType1B int32 |
| 219 |
|
| 220 |
const ( |
| 221 |
EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0 |
| 222 |
) |
| 223 |
|
| 224 |
// Enum value maps for EnumContainerMessage1_NestedEnumType1B. |
| 225 |
var ( |
| 226 |
EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{ |
| 227 |
0: "NESTED_1B_VALUE", |
| 228 |
} |
| 229 |
EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{ |
| 230 |
"NESTED_1B_VALUE": 0, |
| 231 |
} |
| 232 |
) |
| 233 |
|
| 234 |
func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B { |
| 235 |
p := new(EnumContainerMessage1_NestedEnumType1B) |
| 236 |
*p = x |
| 237 |
return p |
| 238 |
} |
| 239 |
|
| 240 |
func (x EnumContainerMessage1_NestedEnumType1B) String() string { |
| 241 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 242 |
} |
| 243 |
|
| 244 |
func (EnumContainerMessage1_NestedEnumType1B) Descriptor() protoreflect.EnumDescriptor { |
| 245 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[4].Descriptor() |
| 246 |
} |
| 247 |
|
| 248 |
func (EnumContainerMessage1_NestedEnumType1B) Type() protoreflect.EnumType { |
| 249 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[4] |
| 250 |
} |
| 251 |
|
| 252 |
func (x EnumContainerMessage1_NestedEnumType1B) Number() protoreflect.EnumNumber { |
| 253 |
return protoreflect.EnumNumber(x) |
| 254 |
} |
| 255 |
|
| 256 |
// Deprecated: Use EnumContainerMessage1_NestedEnumType1B.Descriptor instead. |
| 257 |
func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) { |
| 258 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 1} |
| 259 |
} |
| 260 |
|
| 261 |
// NestedEnumType2A comment. |
| 262 |
type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32 |
| 263 |
|
| 264 |
const ( |
| 265 |
// NestedEnumType2A_VALUE comment. |
| 266 |
EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0 |
| 267 |
) |
| 268 |
|
| 269 |
// Enum value maps for EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A. |
| 270 |
var ( |
| 271 |
EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{ |
| 272 |
0: "NESTED_2A_VALUE", |
| 273 |
} |
| 274 |
EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{ |
| 275 |
"NESTED_2A_VALUE": 0, |
| 276 |
} |
| 277 |
) |
| 278 |
|
| 279 |
func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A { |
| 280 |
p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) |
| 281 |
*p = x |
| 282 |
return p |
| 283 |
} |
| 284 |
|
| 285 |
func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string { |
| 286 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 287 |
} |
| 288 |
|
| 289 |
func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Descriptor() protoreflect.EnumDescriptor { |
| 290 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[5].Descriptor() |
| 291 |
} |
| 292 |
|
| 293 |
func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Type() protoreflect.EnumType { |
| 294 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[5] |
| 295 |
} |
| 296 |
|
| 297 |
func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Number() protoreflect.EnumNumber { |
| 298 |
return protoreflect.EnumNumber(x) |
| 299 |
} |
| 300 |
|
| 301 |
// Deprecated: Use EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A.Descriptor instead. |
| 302 |
func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) { |
| 303 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0, 0} |
| 304 |
} |
| 305 |
|
| 306 |
type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32 |
| 307 |
|
| 308 |
const ( |
| 309 |
EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0 |
| 310 |
) |
| 311 |
|
| 312 |
// Enum value maps for EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B. |
| 313 |
var ( |
| 314 |
EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{ |
| 315 |
0: "NESTED_2B_VALUE", |
| 316 |
} |
| 317 |
EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{ |
| 318 |
"NESTED_2B_VALUE": 0, |
| 319 |
} |
| 320 |
) |
| 321 |
|
| 322 |
func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B { |
| 323 |
p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) |
| 324 |
*p = x |
| 325 |
return p |
| 326 |
} |
| 327 |
|
| 328 |
func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string { |
| 329 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 330 |
} |
| 331 |
|
| 332 |
func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Descriptor() protoreflect.EnumDescriptor { |
| 333 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[6].Descriptor() |
| 334 |
} |
| 335 |
|
| 336 |
func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Type() protoreflect.EnumType { |
| 337 |
return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[6] |
| 338 |
} |
| 339 |
|
| 340 |
func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Number() protoreflect.EnumNumber { |
| 341 |
return protoreflect.EnumNumber(x) |
| 342 |
} |
| 343 |
|
| 344 |
// Deprecated: Use EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B.Descriptor instead. |
| 345 |
func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) { |
| 346 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0, 1} |
| 347 |
} |
| 348 |
|
| 349 |
type EnumContainerMessage1 struct { |
| 350 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 351 |
DefaultDuplicate1 *EnumType2 `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.protoeditions.EnumType2,def=1" json:"default_duplicate1,omitempty"` |
| 352 |
DefaultDuplicate2 *EnumType2 `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.protoeditions.EnumType2,def=1" json:"default_duplicate2,omitempty"` |
| 353 |
unknownFields protoimpl.UnknownFields |
| 354 |
sizeCache protoimpl.SizeCache |
| 355 |
} |
| 356 |
|
| 357 |
// Default values for EnumContainerMessage1 fields. |
| 358 |
const ( |
| 359 |
Default_EnumContainerMessage1_DefaultDuplicate1 = EnumType2_duplicate1 |
| 360 |
Default_EnumContainerMessage1_DefaultDuplicate2 = EnumType2_duplicate2 |
| 361 |
) |
| 362 |
|
| 363 |
func (x *EnumContainerMessage1) Reset() { |
| 364 |
*x = EnumContainerMessage1{} |
| 365 |
mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0] |
| 366 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 367 |
ms.StoreMessageInfo(mi) |
| 368 |
} |
| 369 |
|
| 370 |
func (x *EnumContainerMessage1) String() string { |
| 371 |
return protoimpl.X.MessageStringOf(x) |
| 372 |
} |
| 373 |
|
| 374 |
func (*EnumContainerMessage1) ProtoMessage() {} |
| 375 |
|
| 376 |
func (x *EnumContainerMessage1) ProtoReflect() protoreflect.Message { |
| 377 |
mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0] |
| 378 |
if x != nil { |
| 379 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 380 |
if ms.LoadMessageInfo() == nil { |
| 381 |
ms.StoreMessageInfo(mi) |
| 382 |
} |
| 383 |
return ms |
| 384 |
} |
| 385 |
return mi.MessageOf(x) |
| 386 |
} |
| 387 |
|
| 388 |
// Deprecated: Use EnumContainerMessage1.ProtoReflect.Descriptor instead. |
| 389 |
func (*EnumContainerMessage1) Descriptor() ([]byte, []int) { |
| 390 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0} |
| 391 |
} |
| 392 |
|
| 393 |
func (x *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 { |
| 394 |
if x != nil && x.DefaultDuplicate1 != nil { |
| 395 |
return *x.DefaultDuplicate1 |
| 396 |
} |
| 397 |
return Default_EnumContainerMessage1_DefaultDuplicate1 |
| 398 |
} |
| 399 |
|
| 400 |
func (x *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 { |
| 401 |
if x != nil && x.DefaultDuplicate2 != nil { |
| 402 |
return *x.DefaultDuplicate2 |
| 403 |
} |
| 404 |
return Default_EnumContainerMessage1_DefaultDuplicate2 |
| 405 |
} |
| 406 |
|
| 407 |
type EnumContainerMessage1_EnumContainerMessage2 struct { |
| 408 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 409 |
unknownFields protoimpl.UnknownFields |
| 410 |
sizeCache protoimpl.SizeCache |
| 411 |
} |
| 412 |
|
| 413 |
func (x *EnumContainerMessage1_EnumContainerMessage2) Reset() { |
| 414 |
*x = EnumContainerMessage1_EnumContainerMessage2{} |
| 415 |
mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1] |
| 416 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 417 |
ms.StoreMessageInfo(mi) |
| 418 |
} |
| 419 |
|
| 420 |
func (x *EnumContainerMessage1_EnumContainerMessage2) String() string { |
| 421 |
return protoimpl.X.MessageStringOf(x) |
| 422 |
} |
| 423 |
|
| 424 |
func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {} |
| 425 |
|
| 426 |
func (x *EnumContainerMessage1_EnumContainerMessage2) ProtoReflect() protoreflect.Message { |
| 427 |
mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1] |
| 428 |
if x != nil { |
| 429 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 430 |
if ms.LoadMessageInfo() == nil { |
| 431 |
ms.StoreMessageInfo(mi) |
| 432 |
} |
| 433 |
return ms |
| 434 |
} |
| 435 |
return mi.MessageOf(x) |
| 436 |
} |
| 437 |
|
| 438 |
// Deprecated: Use EnumContainerMessage1_EnumContainerMessage2.ProtoReflect.Descriptor instead. |
| 439 |
func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) { |
| 440 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0} |
| 441 |
} |
| 442 |
|
| 443 |
var File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto protoreflect.FileDescriptor |
| 444 |
|
| 445 |
const file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc = "" + |
| 446 |
"\n" + |
| 447 |
"3cmd/protoc-gen-go/testdata/protoeditions/enum.proto\x12\x1cgoproto.protoc.protoeditions\x1a!google/protobuf/go_features.proto\"\x9c\x03\n" + |
| 448 |
"\x15EnumContainerMessage1\x12b\n" + |
| 449 |
"\x12default_duplicate1\x18\x01 \x01(\x0e2'.goproto.protoc.protoeditions.EnumType2:\n" + |
| 450 |
"duplicate1R\x11defaultDuplicate1\x12b\n" + |
| 451 |
"\x12default_duplicate2\x18\x02 \x01(\x0e2'.goproto.protoc.protoeditions.EnumType2:\n" + |
| 452 |
"duplicate2R\x11defaultDuplicate2\x1ai\n" + |
| 453 |
"\x15EnumContainerMessage2\"'\n" + |
| 454 |
"\x10NestedEnumType2A\x12\x13\n" + |
| 455 |
"\x0fNESTED_2A_VALUE\x10\x00\"'\n" + |
| 456 |
"\x10NestedEnumType2B\x12\x13\n" + |
| 457 |
"\x0fNESTED_2B_VALUE\x10\x00\"'\n" + |
| 458 |
"\x10NestedEnumType1A\x12\x13\n" + |
| 459 |
"\x0fNESTED_1A_VALUE\x10\x00\"'\n" + |
| 460 |
"\x10NestedEnumType1B\x12\x13\n" + |
| 461 |
"\x0fNESTED_1B_VALUE\x10\x00*\x1d\n" + |
| 462 |
"\tEnumType1\x12\a\n" + |
| 463 |
"\x03ONE\x10\x01\x12\a\n" + |
| 464 |
"\x03TWO\x10\x02*Q\n" + |
| 465 |
"\tEnumType2\x12\x0e\n" + |
| 466 |
"\n" + |
| 467 |
"duplicate1\x10\x01\x12\x0e\n" + |
| 468 |
"\n" + |
| 469 |
"duplicate2\x10\x01\x1a\x02\x10\x01\"\x04\b\x02\x10\x02\"\x04\b\x03\x10\x03*\tRESERVED1*\tRESERVED2*=\n" + |
| 470 |
"\x17LegacyUnmarshalJSONTest\x12\a\n" + |
| 471 |
"\x03FOO\x10\x00\x12\a\n" + |
| 472 |
"\x03BAR\x10\x01\x12\a\n" + |
| 473 |
"\x03BAZ\x10\x04\x1a\a:\x05\xd2>\x02\b\x01BJZCgoogle.golang.org/protobuf/cmd/protoc-gen-go/testdata/protoeditions\x92\x03\x02\x10\x02b\beditionsp\xe8\a" |
| 474 |
|
| 475 |
var ( |
| 476 |
file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescOnce sync.Once |
| 477 |
file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData []byte |
| 478 |
) |
| 479 |
|
| 480 |
func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP() []byte { |
| 481 |
file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescOnce.Do(func() { |
| 482 |
file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc))) |
| 483 |
}) |
| 484 |
return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData |
| 485 |
} |
| 486 |
|
| 487 |
var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 7) |
| 488 |
var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| 489 |
var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes = []any{ |
| 490 |
(EnumType1)(0), // 0: goproto.protoc.protoeditions.EnumType1 |
| 491 |
(EnumType2)(0), // 1: goproto.protoc.protoeditions.EnumType2 |
| 492 |
(LegacyUnmarshalJSONTest)(0), // 2: goproto.protoc.protoeditions.LegacyUnmarshalJSONTest |
| 493 |
(EnumContainerMessage1_NestedEnumType1A)(0), // 3: goproto.protoc.protoeditions.EnumContainerMessage1.NestedEnumType1A |
| 494 |
(EnumContainerMessage1_NestedEnumType1B)(0), // 4: goproto.protoc.protoeditions.EnumContainerMessage1.NestedEnumType1B |
| 495 |
(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)(0), // 5: goproto.protoc.protoeditions.EnumContainerMessage1.EnumContainerMessage2.NestedEnumType2A |
| 496 |
(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)(0), // 6: goproto.protoc.protoeditions.EnumContainerMessage1.EnumContainerMessage2.NestedEnumType2B |
| 497 |
(*EnumContainerMessage1)(nil), // 7: goproto.protoc.protoeditions.EnumContainerMessage1 |
| 498 |
(*EnumContainerMessage1_EnumContainerMessage2)(nil), // 8: goproto.protoc.protoeditions.EnumContainerMessage1.EnumContainerMessage2 |
| 499 |
} |
| 500 |
var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_depIdxs = []int32{ |
| 501 |
1, // 0: goproto.protoc.protoeditions.EnumContainerMessage1.default_duplicate1:type_name -> goproto.protoc.protoeditions.EnumType2 |
| 502 |
1, // 1: goproto.protoc.protoeditions.EnumContainerMessage1.default_duplicate2:type_name -> goproto.protoc.protoeditions.EnumType2 |
| 503 |
2, // [2:2] is the sub-list for method output_type |
| 504 |
2, // [2:2] is the sub-list for method input_type |
| 505 |
2, // [2:2] is the sub-list for extension type_name |
| 506 |
2, // [2:2] is the sub-list for extension extendee |
| 507 |
0, // [0:2] is the sub-list for field type_name |
| 508 |
} |
| 509 |
|
| 510 |
func init() { file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() } |
| 511 |
func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() { |
| 512 |
if File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto != nil { |
| 513 |
return |
| 514 |
} |
| 515 |
type x struct{} |
| 516 |
out := protoimpl.TypeBuilder{ |
| 517 |
File: protoimpl.DescBuilder{ |
| 518 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 519 |
RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc)), |
| 520 |
NumEnums: 7, |
| 521 |
NumMessages: 2, |
| 522 |
NumExtensions: 0, |
| 523 |
NumServices: 0, |
| 524 |
}, |
| 525 |
GoTypes: file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes, |
| 526 |
DependencyIndexes: file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_depIdxs, |
| 527 |
EnumInfos: file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes, |
| 528 |
MessageInfos: file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes, |
| 529 |
}.Build() |
| 530 |
File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto = out.File |
| 531 |
file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes = nil |
| 532 |
file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_depIdxs = nil |
| 533 |
} |