...

Source file src/google.golang.org/protobuf/cmd/protoc-gen-go/testdata/protoeditions/enum.pb.go

Documentation: google.golang.org/protobuf/cmd/protoc-gen-go/testdata/protoeditions

     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  )
    17  
    18  // EnumType1 comment.
    19  type EnumType1 int32
    20  
    21  const (
    22  	// EnumType1_ONE comment.
    23  	EnumType1_ONE EnumType1 = 1
    24  	// EnumType1_TWO comment.
    25  	EnumType1_TWO EnumType1 = 2
    26  )
    27  
    28  // Enum value maps for EnumType1.
    29  var (
    30  	EnumType1_name = map[int32]string{
    31  		1: "ONE",
    32  		2: "TWO",
    33  	}
    34  	EnumType1_value = map[string]int32{
    35  		"ONE": 1,
    36  		"TWO": 2,
    37  	}
    38  )
    39  
    40  func (x EnumType1) Enum() *EnumType1 {
    41  	p := new(EnumType1)
    42  	*p = x
    43  	return p
    44  }
    45  
    46  func (x EnumType1) String() string {
    47  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    48  }
    49  
    50  func (EnumType1) Descriptor() protoreflect.EnumDescriptor {
    51  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[0].Descriptor()
    52  }
    53  
    54  func (EnumType1) Type() protoreflect.EnumType {
    55  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[0]
    56  }
    57  
    58  func (x EnumType1) Number() protoreflect.EnumNumber {
    59  	return protoreflect.EnumNumber(x)
    60  }
    61  
    62  // Deprecated: Use EnumType1.Descriptor instead.
    63  func (EnumType1) EnumDescriptor() ([]byte, []int) {
    64  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0}
    65  }
    66  
    67  type EnumType2 int32
    68  
    69  const (
    70  	EnumType2_duplicate1 EnumType2 = 1
    71  	EnumType2_duplicate2 EnumType2 = 1
    72  )
    73  
    74  // Enum value maps for EnumType2.
    75  var (
    76  	EnumType2_name = map[int32]string{
    77  		1: "duplicate1",
    78  		// Duplicate value: 1: "duplicate2",
    79  	}
    80  	EnumType2_value = map[string]int32{
    81  		"duplicate1": 1,
    82  		"duplicate2": 1,
    83  	}
    84  )
    85  
    86  func (x EnumType2) Enum() *EnumType2 {
    87  	p := new(EnumType2)
    88  	*p = x
    89  	return p
    90  }
    91  
    92  func (x EnumType2) String() string {
    93  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    94  }
    95  
    96  func (EnumType2) Descriptor() protoreflect.EnumDescriptor {
    97  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[1].Descriptor()
    98  }
    99  
   100  func (EnumType2) Type() protoreflect.EnumType {
   101  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[1]
   102  }
   103  
   104  func (x EnumType2) Number() protoreflect.EnumNumber {
   105  	return protoreflect.EnumNumber(x)
   106  }
   107  
   108  // Deprecated: Use EnumType2.Descriptor instead.
   109  func (EnumType2) EnumDescriptor() ([]byte, []int) {
   110  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{1}
   111  }
   112  
   113  type LegacyUnmarshalJSONTest int32
   114  
   115  const (
   116  	LegacyUnmarshalJSONTest_FOO LegacyUnmarshalJSONTest = 0
   117  	LegacyUnmarshalJSONTest_BAR LegacyUnmarshalJSONTest = 1
   118  	LegacyUnmarshalJSONTest_BAZ LegacyUnmarshalJSONTest = 4
   119  )
   120  
   121  // Enum value maps for LegacyUnmarshalJSONTest.
   122  var (
   123  	LegacyUnmarshalJSONTest_name = map[int32]string{
   124  		0: "FOO",
   125  		1: "BAR",
   126  		4: "BAZ",
   127  	}
   128  	LegacyUnmarshalJSONTest_value = map[string]int32{
   129  		"FOO": 0,
   130  		"BAR": 1,
   131  		"BAZ": 4,
   132  	}
   133  )
   134  
   135  func (x LegacyUnmarshalJSONTest) Enum() *LegacyUnmarshalJSONTest {
   136  	p := new(LegacyUnmarshalJSONTest)
   137  	*p = x
   138  	return p
   139  }
   140  
   141  func (x LegacyUnmarshalJSONTest) String() string {
   142  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   143  }
   144  
   145  func (LegacyUnmarshalJSONTest) Descriptor() protoreflect.EnumDescriptor {
   146  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[2].Descriptor()
   147  }
   148  
   149  func (LegacyUnmarshalJSONTest) Type() protoreflect.EnumType {
   150  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[2]
   151  }
   152  
   153  func (x LegacyUnmarshalJSONTest) Number() protoreflect.EnumNumber {
   154  	return protoreflect.EnumNumber(x)
   155  }
   156  
   157  // Deprecated: Do not use.
   158  func (x *LegacyUnmarshalJSONTest) UnmarshalJSON(b []byte) error {
   159  	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
   160  	if err != nil {
   161  		return err
   162  	}
   163  	*x = LegacyUnmarshalJSONTest(num)
   164  	return nil
   165  }
   166  
   167  // Deprecated: Use LegacyUnmarshalJSONTest.Descriptor instead.
   168  func (LegacyUnmarshalJSONTest) EnumDescriptor() ([]byte, []int) {
   169  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{2}
   170  }
   171  
   172  // NestedEnumType1A comment.
   173  type EnumContainerMessage1_NestedEnumType1A int32
   174  
   175  const (
   176  	// NestedEnumType1A_VALUE comment.
   177  	EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
   178  )
   179  
   180  // Enum value maps for EnumContainerMessage1_NestedEnumType1A.
   181  var (
   182  	EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
   183  		0: "NESTED_1A_VALUE",
   184  	}
   185  	EnumContainerMessage1_NestedEnumType1A_value = map[string]int32{
   186  		"NESTED_1A_VALUE": 0,
   187  	}
   188  )
   189  
   190  func (x EnumContainerMessage1_NestedEnumType1A) Enum() *EnumContainerMessage1_NestedEnumType1A {
   191  	p := new(EnumContainerMessage1_NestedEnumType1A)
   192  	*p = x
   193  	return p
   194  }
   195  
   196  func (x EnumContainerMessage1_NestedEnumType1A) String() string {
   197  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   198  }
   199  
   200  func (EnumContainerMessage1_NestedEnumType1A) Descriptor() protoreflect.EnumDescriptor {
   201  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[3].Descriptor()
   202  }
   203  
   204  func (EnumContainerMessage1_NestedEnumType1A) Type() protoreflect.EnumType {
   205  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[3]
   206  }
   207  
   208  func (x EnumContainerMessage1_NestedEnumType1A) Number() protoreflect.EnumNumber {
   209  	return protoreflect.EnumNumber(x)
   210  }
   211  
   212  // Deprecated: Use EnumContainerMessage1_NestedEnumType1A.Descriptor instead.
   213  func (EnumContainerMessage1_NestedEnumType1A) EnumDescriptor() ([]byte, []int) {
   214  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0}
   215  }
   216  
   217  type EnumContainerMessage1_NestedEnumType1B int32
   218  
   219  const (
   220  	EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
   221  )
   222  
   223  // Enum value maps for EnumContainerMessage1_NestedEnumType1B.
   224  var (
   225  	EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
   226  		0: "NESTED_1B_VALUE",
   227  	}
   228  	EnumContainerMessage1_NestedEnumType1B_value = map[string]int32{
   229  		"NESTED_1B_VALUE": 0,
   230  	}
   231  )
   232  
   233  func (x EnumContainerMessage1_NestedEnumType1B) Enum() *EnumContainerMessage1_NestedEnumType1B {
   234  	p := new(EnumContainerMessage1_NestedEnumType1B)
   235  	*p = x
   236  	return p
   237  }
   238  
   239  func (x EnumContainerMessage1_NestedEnumType1B) String() string {
   240  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   241  }
   242  
   243  func (EnumContainerMessage1_NestedEnumType1B) Descriptor() protoreflect.EnumDescriptor {
   244  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[4].Descriptor()
   245  }
   246  
   247  func (EnumContainerMessage1_NestedEnumType1B) Type() protoreflect.EnumType {
   248  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[4]
   249  }
   250  
   251  func (x EnumContainerMessage1_NestedEnumType1B) Number() protoreflect.EnumNumber {
   252  	return protoreflect.EnumNumber(x)
   253  }
   254  
   255  // Deprecated: Use EnumContainerMessage1_NestedEnumType1B.Descriptor instead.
   256  func (EnumContainerMessage1_NestedEnumType1B) EnumDescriptor() ([]byte, []int) {
   257  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 1}
   258  }
   259  
   260  // NestedEnumType2A comment.
   261  type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A int32
   262  
   263  const (
   264  	// NestedEnumType2A_VALUE comment.
   265  	EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
   266  )
   267  
   268  // Enum value maps for EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A.
   269  var (
   270  	EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
   271  		0: "NESTED_2A_VALUE",
   272  	}
   273  	EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_value = map[string]int32{
   274  		"NESTED_2A_VALUE": 0,
   275  	}
   276  )
   277  
   278  func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A {
   279  	p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)
   280  	*p = x
   281  	return p
   282  }
   283  
   284  func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) String() string {
   285  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   286  }
   287  
   288  func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Descriptor() protoreflect.EnumDescriptor {
   289  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[5].Descriptor()
   290  }
   291  
   292  func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Type() protoreflect.EnumType {
   293  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[5]
   294  }
   295  
   296  func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Number() protoreflect.EnumNumber {
   297  	return protoreflect.EnumNumber(x)
   298  }
   299  
   300  // Deprecated: Use EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A.Descriptor instead.
   301  func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) EnumDescriptor() ([]byte, []int) {
   302  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0, 0}
   303  }
   304  
   305  type EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B int32
   306  
   307  const (
   308  	EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
   309  )
   310  
   311  // Enum value maps for EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B.
   312  var (
   313  	EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
   314  		0: "NESTED_2B_VALUE",
   315  	}
   316  	EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_value = map[string]int32{
   317  		"NESTED_2B_VALUE": 0,
   318  	}
   319  )
   320  
   321  func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Enum() *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B {
   322  	p := new(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)
   323  	*p = x
   324  	return p
   325  }
   326  
   327  func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) String() string {
   328  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   329  }
   330  
   331  func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Descriptor() protoreflect.EnumDescriptor {
   332  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[6].Descriptor()
   333  }
   334  
   335  func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Type() protoreflect.EnumType {
   336  	return &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes[6]
   337  }
   338  
   339  func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Number() protoreflect.EnumNumber {
   340  	return protoreflect.EnumNumber(x)
   341  }
   342  
   343  // Deprecated: Use EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B.Descriptor instead.
   344  func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescriptor() ([]byte, []int) {
   345  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0, 1}
   346  }
   347  
   348  type EnumContainerMessage1 struct {
   349  	state         protoimpl.MessageState
   350  	sizeCache     protoimpl.SizeCache
   351  	unknownFields protoimpl.UnknownFields
   352  
   353  	DefaultDuplicate1 *EnumType2 `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.protoeditions.EnumType2,def=1" json:"default_duplicate1,omitempty"`
   354  	DefaultDuplicate2 *EnumType2 `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.protoeditions.EnumType2,def=1" json:"default_duplicate2,omitempty"`
   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  	if protoimpl.UnsafeEnabled {
   366  		mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0]
   367  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   368  		ms.StoreMessageInfo(mi)
   369  	}
   370  }
   371  
   372  func (x *EnumContainerMessage1) String() string {
   373  	return protoimpl.X.MessageStringOf(x)
   374  }
   375  
   376  func (*EnumContainerMessage1) ProtoMessage() {}
   377  
   378  func (x *EnumContainerMessage1) ProtoReflect() protoreflect.Message {
   379  	mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0]
   380  	if protoimpl.UnsafeEnabled && x != nil {
   381  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   382  		if ms.LoadMessageInfo() == nil {
   383  			ms.StoreMessageInfo(mi)
   384  		}
   385  		return ms
   386  	}
   387  	return mi.MessageOf(x)
   388  }
   389  
   390  // Deprecated: Use EnumContainerMessage1.ProtoReflect.Descriptor instead.
   391  func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
   392  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0}
   393  }
   394  
   395  func (x *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 {
   396  	if x != nil && x.DefaultDuplicate1 != nil {
   397  		return *x.DefaultDuplicate1
   398  	}
   399  	return Default_EnumContainerMessage1_DefaultDuplicate1
   400  }
   401  
   402  func (x *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 {
   403  	if x != nil && x.DefaultDuplicate2 != nil {
   404  		return *x.DefaultDuplicate2
   405  	}
   406  	return Default_EnumContainerMessage1_DefaultDuplicate2
   407  }
   408  
   409  type EnumContainerMessage1_EnumContainerMessage2 struct {
   410  	state         protoimpl.MessageState
   411  	sizeCache     protoimpl.SizeCache
   412  	unknownFields protoimpl.UnknownFields
   413  }
   414  
   415  func (x *EnumContainerMessage1_EnumContainerMessage2) Reset() {
   416  	*x = EnumContainerMessage1_EnumContainerMessage2{}
   417  	if protoimpl.UnsafeEnabled {
   418  		mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1]
   419  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   420  		ms.StoreMessageInfo(mi)
   421  	}
   422  }
   423  
   424  func (x *EnumContainerMessage1_EnumContainerMessage2) String() string {
   425  	return protoimpl.X.MessageStringOf(x)
   426  }
   427  
   428  func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
   429  
   430  func (x *EnumContainerMessage1_EnumContainerMessage2) ProtoReflect() protoreflect.Message {
   431  	mi := &file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1]
   432  	if protoimpl.UnsafeEnabled && x != nil {
   433  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   434  		if ms.LoadMessageInfo() == nil {
   435  			ms.StoreMessageInfo(mi)
   436  		}
   437  		return ms
   438  	}
   439  	return mi.MessageOf(x)
   440  }
   441  
   442  // Deprecated: Use EnumContainerMessage1_EnumContainerMessage2.ProtoReflect.Descriptor instead.
   443  func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
   444  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP(), []int{0, 0}
   445  }
   446  
   447  var File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto protoreflect.FileDescriptor
   448  
   449  var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc = []byte{
   450  	0x0a, 0x33, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
   451  	0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f,
   452  	0x74, 0x6f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x2e,
   453  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70,
   454  	0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x64, 0x69, 0x74, 0x69,
   455  	0x6f, 0x6e, 0x73, 0x1a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
   456  	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
   457  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x03, 0x0a, 0x15, 0x45, 0x6e, 0x75, 0x6d, 0x43,
   458  	0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31,
   459  	0x12, 0x62, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x64, 0x75, 0x70, 0x6c,
   460  	0x69, 0x63, 0x61, 0x74, 0x65, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x67,
   461  	0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x70, 0x72,
   462  	0x6f, 0x74, 0x6f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
   463  	0x54, 0x79, 0x70, 0x65, 0x32, 0x3a, 0x0a, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65,
   464  	0x31, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63,
   465  	0x61, 0x74, 0x65, 0x31, 0x12, 0x62, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f,
   466  	0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
   467  	0x32, 0x27, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   468  	0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
   469  	0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x32, 0x3a, 0x0a, 0x64, 0x75, 0x70, 0x6c, 0x69,
   470  	0x63, 0x61, 0x74, 0x65, 0x32, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x75,
   471  	0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x32, 0x1a, 0x69, 0x0a, 0x15, 0x45, 0x6e, 0x75, 0x6d,
   472  	0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
   473  	0x32, 0x22, 0x27, 0x0a, 0x10, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x54,
   474  	0x79, 0x70, 0x65, 0x32, 0x41, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f,
   475  	0x32, 0x41, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x22, 0x27, 0x0a, 0x10, 0x4e, 0x65,
   476  	0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x32, 0x42, 0x12, 0x13,
   477  	0x0a, 0x0f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x32, 0x42, 0x5f, 0x56, 0x41, 0x4c, 0x55,
   478  	0x45, 0x10, 0x00, 0x22, 0x27, 0x0a, 0x10, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75,
   479  	0x6d, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x45, 0x53, 0x54, 0x45,
   480  	0x44, 0x5f, 0x31, 0x41, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x22, 0x27, 0x0a, 0x10,
   481  	0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x31, 0x42,
   482  	0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x31, 0x42, 0x5f, 0x56, 0x41,
   483  	0x4c, 0x55, 0x45, 0x10, 0x00, 0x2a, 0x1d, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70,
   484  	0x65, 0x31, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54,
   485  	0x57, 0x4f, 0x10, 0x02, 0x2a, 0x51, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65,
   486  	0x32, 0x12, 0x0e, 0x0a, 0x0a, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x31, 0x10,
   487  	0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x32, 0x10,
   488  	0x01, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10,
   489  	0x03, 0x2a, 0x09, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x31, 0x2a, 0x09, 0x52, 0x45,
   490  	0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x32, 0x2a, 0x3d, 0x0a, 0x17, 0x4c, 0x65, 0x67, 0x61, 0x63,
   491  	0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x54, 0x65,
   492  	0x73, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42,
   493  	0x41, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x5a, 0x10, 0x04, 0x1a, 0x07, 0x3a,
   494  	0x05, 0xd2, 0x3e, 0x02, 0x08, 0x01, 0x42, 0x4a, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   495  	0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74,
   496  	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d,
   497  	0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f,
   498  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x92, 0x03, 0x02,
   499  	0x10, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
   500  }
   501  
   502  var (
   503  	file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescOnce sync.Once
   504  	file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData = file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc
   505  )
   506  
   507  func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP() []byte {
   508  	file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescOnce.Do(func() {
   509  		file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData = protoimpl.X.CompressGZIP(file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData)
   510  	})
   511  	return file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescData
   512  }
   513  
   514  var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
   515  var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   516  var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes = []interface{}{
   517  	(EnumType1)(0),                              // 0: goproto.protoc.protoeditions.EnumType1
   518  	(EnumType2)(0),                              // 1: goproto.protoc.protoeditions.EnumType2
   519  	(LegacyUnmarshalJSONTest)(0),                // 2: goproto.protoc.protoeditions.LegacyUnmarshalJSONTest
   520  	(EnumContainerMessage1_NestedEnumType1A)(0), // 3: goproto.protoc.protoeditions.EnumContainerMessage1.NestedEnumType1A
   521  	(EnumContainerMessage1_NestedEnumType1B)(0), // 4: goproto.protoc.protoeditions.EnumContainerMessage1.NestedEnumType1B
   522  	(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A)(0), // 5: goproto.protoc.protoeditions.EnumContainerMessage1.EnumContainerMessage2.NestedEnumType2A
   523  	(EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B)(0), // 6: goproto.protoc.protoeditions.EnumContainerMessage1.EnumContainerMessage2.NestedEnumType2B
   524  	(*EnumContainerMessage1)(nil),                                     // 7: goproto.protoc.protoeditions.EnumContainerMessage1
   525  	(*EnumContainerMessage1_EnumContainerMessage2)(nil),               // 8: goproto.protoc.protoeditions.EnumContainerMessage1.EnumContainerMessage2
   526  }
   527  var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_depIdxs = []int32{
   528  	1, // 0: goproto.protoc.protoeditions.EnumContainerMessage1.default_duplicate1:type_name -> goproto.protoc.protoeditions.EnumType2
   529  	1, // 1: goproto.protoc.protoeditions.EnumContainerMessage1.default_duplicate2:type_name -> goproto.protoc.protoeditions.EnumType2
   530  	2, // [2:2] is the sub-list for method output_type
   531  	2, // [2:2] is the sub-list for method input_type
   532  	2, // [2:2] is the sub-list for extension type_name
   533  	2, // [2:2] is the sub-list for extension extendee
   534  	0, // [0:2] is the sub-list for field type_name
   535  }
   536  
   537  func init() { file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() }
   538  func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() {
   539  	if File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto != nil {
   540  		return
   541  	}
   542  	if !protoimpl.UnsafeEnabled {
   543  		file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   544  			switch v := v.(*EnumContainerMessage1); i {
   545  			case 0:
   546  				return &v.state
   547  			case 1:
   548  				return &v.sizeCache
   549  			case 2:
   550  				return &v.unknownFields
   551  			default:
   552  				return nil
   553  			}
   554  		}
   555  		file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   556  			switch v := v.(*EnumContainerMessage1_EnumContainerMessage2); i {
   557  			case 0:
   558  				return &v.state
   559  			case 1:
   560  				return &v.sizeCache
   561  			case 2:
   562  				return &v.unknownFields
   563  			default:
   564  				return nil
   565  			}
   566  		}
   567  	}
   568  	type x struct{}
   569  	out := protoimpl.TypeBuilder{
   570  		File: protoimpl.DescBuilder{
   571  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   572  			RawDescriptor: file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc,
   573  			NumEnums:      7,
   574  			NumMessages:   2,
   575  			NumExtensions: 0,
   576  			NumServices:   0,
   577  		},
   578  		GoTypes:           file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes,
   579  		DependencyIndexes: file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_depIdxs,
   580  		EnumInfos:         file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes,
   581  		MessageInfos:      file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes,
   582  	}.Build()
   583  	File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto = out.File
   584  	file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDesc = nil
   585  	file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes = nil
   586  	file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_depIdxs = nil
   587  }
   588  

View as plain text