github.com/whiteCcinn/protobuf-go@v1.0.9/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go (about)

     1  // Copyright 2020 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/issue780_oneof_conflict/test.proto
     7  
     8  package issue780_oneof_conflict
     9  
    10  import (
    11  	protoreflect "github.com/whiteCcinn/protobuf-go/reflect/protoreflect"
    12  	protoimpl "github.com/whiteCcinn/protobuf-go/runtime/protoimpl"
    13  	reflect "reflect"
    14  	sync "sync"
    15  )
    16  
    17  type Foo struct {
    18  	state         protoimpl.MessageState
    19  	sizeCache     protoimpl.SizeCache
    20  	unknownFields protoimpl.UnknownFields
    21  
    22  	// Types that are assignable to Bar:
    23  	//	*Foo_GetBar
    24  	Bar isFoo_Bar `protobuf_oneof:"bar"`
    25  }
    26  
    27  func (x *Foo) Reset() {
    28  	*x = Foo{}
    29  	if protoimpl.UnsafeEnabled {
    30  		mi := &file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0]
    31  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    32  		ms.StoreMessageInfo(mi)
    33  	}
    34  }
    35  
    36  func (x *Foo) String() string {
    37  	return protoimpl.X.MessageStringOf(x)
    38  }
    39  
    40  func (*Foo) ProtoMessage() {}
    41  
    42  func (x *Foo) ProtoReflect() protoreflect.Message {
    43  	mi := &file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0]
    44  	if protoimpl.UnsafeEnabled && x != nil {
    45  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    46  		if ms.LoadMessageInfo() == nil {
    47  			ms.StoreMessageInfo(mi)
    48  		}
    49  		return ms
    50  	}
    51  	return mi.MessageOf(x)
    52  }
    53  
    54  // Deprecated: Use Foo.ProtoReflect.Descriptor instead.
    55  func (*Foo) Descriptor() ([]byte, []int) {
    56  	return file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescGZIP(), []int{0}
    57  }
    58  
    59  func (m *Foo) GetBar() isFoo_Bar {
    60  	if m != nil {
    61  		return m.Bar
    62  	}
    63  	return nil
    64  }
    65  
    66  func (x *Foo) GetGetBar() string {
    67  	if x, ok := x.GetBar().(*Foo_GetBar); ok {
    68  		return x.GetBar
    69  	}
    70  	return ""
    71  }
    72  
    73  type isFoo_Bar interface {
    74  	isFoo_Bar()
    75  }
    76  
    77  type Foo_GetBar struct {
    78  	GetBar string `protobuf:"bytes,1,opt,name=get_bar,json=getBar,oneof"`
    79  }
    80  
    81  func (*Foo_GetBar) isFoo_Bar() {}
    82  
    83  var File_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto protoreflect.FileDescriptor
    84  
    85  var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDesc = []byte{
    86  	0x0a, 0x3d, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
    87  	0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x69, 0x73, 0x73,
    88  	0x75, 0x65, 0x37, 0x38, 0x30, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
    89  	0x6c, 0x69, 0x63, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
    90  	0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x74, 0x65, 0x73, 0x74, 0x22, 0x27, 0x0a, 0x03, 0x46, 0x6f,
    91  	0x6f, 0x12, 0x19, 0x0a, 0x07, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01,
    92  	0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x67, 0x65, 0x74, 0x42, 0x61, 0x72, 0x42, 0x05, 0x0a, 0x03,
    93  	0x62, 0x61, 0x72, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f,
    94  	0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
    95  	0x66, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
    96  	0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x69, 0x73, 0x73,
    97  	0x75, 0x65, 0x37, 0x38, 0x30, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
    98  	0x6c, 0x69, 0x63, 0x74,
    99  }
   100  
   101  var (
   102  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescOnce sync.Once
   103  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescData = file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDesc
   104  )
   105  
   106  func file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescGZIP() []byte {
   107  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescOnce.Do(func() {
   108  		file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescData)
   109  	})
   110  	return file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescData
   111  }
   112  
   113  var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   114  var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_goTypes = []interface{}{
   115  	(*Foo)(nil), // 0: oneoftest.Foo
   116  }
   117  var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_depIdxs = []int32{
   118  	0, // [0:0] is the sub-list for method output_type
   119  	0, // [0:0] is the sub-list for method input_type
   120  	0, // [0:0] is the sub-list for extension type_name
   121  	0, // [0:0] is the sub-list for extension extendee
   122  	0, // [0:0] is the sub-list for field type_name
   123  }
   124  
   125  func init() { file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_init() }
   126  func file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_init() {
   127  	if File_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto != nil {
   128  		return
   129  	}
   130  	if !protoimpl.UnsafeEnabled {
   131  		file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   132  			switch v := v.(*Foo); i {
   133  			case 0:
   134  				return &v.state
   135  			case 1:
   136  				return &v.sizeCache
   137  			case 2:
   138  				return &v.unknownFields
   139  			default:
   140  				return nil
   141  			}
   142  		}
   143  	}
   144  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].OneofWrappers = []interface{}{
   145  		(*Foo_GetBar)(nil),
   146  	}
   147  	type x struct{}
   148  	out := protoimpl.TypeBuilder{
   149  		File: protoimpl.DescBuilder{
   150  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   151  			RawDescriptor: file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDesc,
   152  			NumEnums:      0,
   153  			NumMessages:   1,
   154  			NumExtensions: 0,
   155  			NumServices:   0,
   156  		},
   157  		GoTypes:           file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_goTypes,
   158  		DependencyIndexes: file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_depIdxs,
   159  		MessageInfos:      file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes,
   160  	}.Build()
   161  	File_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto = out.File
   162  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDesc = nil
   163  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_goTypes = nil
   164  	file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_depIdxs = nil
   165  }