test.pb.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: issue780_oneof_conflict/test.proto
  3. package oneoftest
  4. import (
  5. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  6. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  7. reflect "reflect"
  8. sync "sync"
  9. )
  10. type Foo struct {
  11. state protoimpl.MessageState
  12. sizeCache protoimpl.SizeCache
  13. unknownFields protoimpl.UnknownFields
  14. // Types that are assignable to Bar:
  15. // *Foo_GetBar
  16. Bar isFoo_Bar `protobuf_oneof:"bar"`
  17. }
  18. func (x *Foo) Reset() {
  19. *x = Foo{}
  20. }
  21. func (x *Foo) String() string {
  22. return protoimpl.X.MessageStringOf(x)
  23. }
  24. func (*Foo) ProtoMessage() {}
  25. func (x *Foo) ProtoReflect() protoreflect.Message {
  26. mi := &file_issue780_oneof_conflict_test_proto_msgTypes[0]
  27. if protoimpl.UnsafeEnabled && x != nil {
  28. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  29. if ms.LoadMessageInfo() == nil {
  30. ms.StoreMessageInfo(mi)
  31. }
  32. return ms
  33. }
  34. return mi.MessageOf(x)
  35. }
  36. // Deprecated: Use Foo.ProtoReflect.Descriptor instead.
  37. func (*Foo) Descriptor() ([]byte, []int) {
  38. return file_issue780_oneof_conflict_test_proto_rawDescGZIP(), []int{0}
  39. }
  40. func (m *Foo) GetBar() isFoo_Bar {
  41. if m != nil {
  42. return m.Bar
  43. }
  44. return nil
  45. }
  46. func (x *Foo) GetGetBar() string {
  47. if x, ok := x.GetBar().(*Foo_GetBar); ok {
  48. return x.GetBar
  49. }
  50. return ""
  51. }
  52. type isFoo_Bar interface {
  53. isFoo_Bar()
  54. }
  55. type Foo_GetBar struct {
  56. GetBar string `protobuf:"bytes,1,opt,name=get_bar,json=getBar,oneof"`
  57. }
  58. func (*Foo_GetBar) isFoo_Bar() {}
  59. var File_issue780_oneof_conflict_test_proto protoreflect.FileDescriptor
  60. var file_issue780_oneof_conflict_test_proto_rawDesc = []byte{
  61. 0x0a, 0x22, 0x69, 0x73, 0x73, 0x75, 0x65, 0x37, 0x38, 0x30, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
  62. 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70,
  63. 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x74, 0x65, 0x73, 0x74, 0x22,
  64. 0x27, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x19, 0x0a, 0x07, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x61,
  65. 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x67, 0x65, 0x74, 0x42, 0x61,
  66. 0x72, 0x42, 0x05, 0x0a, 0x03, 0x62, 0x61, 0x72,
  67. }
  68. var (
  69. file_issue780_oneof_conflict_test_proto_rawDescOnce sync.Once
  70. file_issue780_oneof_conflict_test_proto_rawDescData = file_issue780_oneof_conflict_test_proto_rawDesc
  71. )
  72. func file_issue780_oneof_conflict_test_proto_rawDescGZIP() []byte {
  73. file_issue780_oneof_conflict_test_proto_rawDescOnce.Do(func() {
  74. file_issue780_oneof_conflict_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_issue780_oneof_conflict_test_proto_rawDescData)
  75. })
  76. return file_issue780_oneof_conflict_test_proto_rawDescData
  77. }
  78. var file_issue780_oneof_conflict_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  79. var file_issue780_oneof_conflict_test_proto_goTypes = []interface{}{
  80. (*Foo)(nil), // 0: oneoftest.Foo
  81. }
  82. var file_issue780_oneof_conflict_test_proto_depIdxs = []int32{
  83. 0, // [0:0] is the sub-list for method output_type
  84. 0, // [0:0] is the sub-list for method input_type
  85. 0, // [0:0] is the sub-list for extension type_name
  86. 0, // [0:0] is the sub-list for extension extendee
  87. 0, // [0:0] is the sub-list for field type_name
  88. }
  89. func init() { file_issue780_oneof_conflict_test_proto_init() }
  90. func file_issue780_oneof_conflict_test_proto_init() {
  91. if File_issue780_oneof_conflict_test_proto != nil {
  92. return
  93. }
  94. if !protoimpl.UnsafeEnabled {
  95. file_issue780_oneof_conflict_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  96. switch v := v.(*Foo); i {
  97. case 0:
  98. return &v.state
  99. case 1:
  100. return &v.sizeCache
  101. case 2:
  102. return &v.unknownFields
  103. default:
  104. return nil
  105. }
  106. }
  107. }
  108. file_issue780_oneof_conflict_test_proto_msgTypes[0].OneofWrappers = []interface{}{
  109. (*Foo_GetBar)(nil),
  110. }
  111. type x struct{}
  112. out := protoimpl.TypeBuilder{
  113. File: protoimpl.DescBuilder{
  114. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  115. RawDescriptor: file_issue780_oneof_conflict_test_proto_rawDesc,
  116. NumEnums: 0,
  117. NumMessages: 1,
  118. NumExtensions: 0,
  119. NumServices: 0,
  120. },
  121. GoTypes: file_issue780_oneof_conflict_test_proto_goTypes,
  122. DependencyIndexes: file_issue780_oneof_conflict_test_proto_depIdxs,
  123. MessageInfos: file_issue780_oneof_conflict_test_proto_msgTypes,
  124. }.Build()
  125. File_issue780_oneof_conflict_test_proto = out.File
  126. file_issue780_oneof_conflict_test_proto_rawDesc = nil
  127. file_issue780_oneof_conflict_test_proto_goTypes = nil
  128. file_issue780_oneof_conflict_test_proto_depIdxs = nil
  129. }