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