test.pb.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: issue780_oneof_conflict/test.proto
  3. package oneoftest
  4. import (
  5. fmt "fmt"
  6. proto "github.com/golang/protobuf/proto"
  7. math "math"
  8. )
  9. // Reference imports to suppress errors if they are not otherwise used.
  10. var _ = proto.Marshal
  11. var _ = fmt.Errorf
  12. var _ = math.Inf
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the proto package it is being compiled against.
  15. // A compilation error at this line likely means your copy of the
  16. // proto package needs to be updated.
  17. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  18. type Foo struct {
  19. // Types that are valid to be assigned to Bar:
  20. // *Foo_GetBar
  21. Bar isFoo_Bar `protobuf_oneof:"bar"`
  22. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  23. XXX_unrecognized []byte `json:"-"`
  24. XXX_sizecache int32 `json:"-"`
  25. }
  26. func (m *Foo) Reset() { *m = Foo{} }
  27. func (m *Foo) String() string { return proto.CompactTextString(m) }
  28. func (*Foo) ProtoMessage() {}
  29. func (*Foo) Descriptor() ([]byte, []int) {
  30. return fileDescriptor_48462cafc802a68e, []int{0}
  31. }
  32. func (m *Foo) XXX_Unmarshal(b []byte) error {
  33. return xxx_messageInfo_Foo.Unmarshal(m, b)
  34. }
  35. func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  36. return xxx_messageInfo_Foo.Marshal(b, m, deterministic)
  37. }
  38. func (m *Foo) XXX_Merge(src proto.Message) {
  39. xxx_messageInfo_Foo.Merge(m, src)
  40. }
  41. func (m *Foo) XXX_Size() int {
  42. return xxx_messageInfo_Foo.Size(m)
  43. }
  44. func (m *Foo) XXX_DiscardUnknown() {
  45. xxx_messageInfo_Foo.DiscardUnknown(m)
  46. }
  47. var xxx_messageInfo_Foo proto.InternalMessageInfo
  48. type isFoo_Bar interface {
  49. isFoo_Bar()
  50. }
  51. type Foo_GetBar struct {
  52. GetBar string `protobuf:"bytes,1,opt,name=get_bar,json=getBar,oneof"`
  53. }
  54. func (*Foo_GetBar) isFoo_Bar() {}
  55. func (m *Foo) GetBar() isFoo_Bar {
  56. if m != nil {
  57. return m.Bar
  58. }
  59. return nil
  60. }
  61. func (m *Foo) GetGetBar() string {
  62. if x, ok := m.GetBar().(*Foo_GetBar); ok {
  63. return x.GetBar
  64. }
  65. return ""
  66. }
  67. // XXX_OneofWrappers is for the internal use of the proto package.
  68. func (*Foo) XXX_OneofWrappers() []interface{} {
  69. return []interface{}{
  70. (*Foo_GetBar)(nil),
  71. }
  72. }
  73. func init() {
  74. proto.RegisterType((*Foo)(nil), "oneoftest.Foo")
  75. }
  76. func init() { proto.RegisterFile("issue780_oneof_conflict/test.proto", fileDescriptor_48462cafc802a68e) }
  77. var fileDescriptor_48462cafc802a68e = []byte{
  78. // 107 bytes of a gzipped FileDescriptorProto
  79. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x2c, 0x2e, 0x2e,
  80. 0x4d, 0x35, 0xb7, 0x30, 0x88, 0xcf, 0xcf, 0x4b, 0xcd, 0x4f, 0x8b, 0x4f, 0xce, 0xcf, 0x4b, 0xcb,
  81. 0xc9, 0x4c, 0x2e, 0xd1, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
  82. 0x04, 0x4b, 0x81, 0x04, 0x94, 0xd4, 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x24, 0xb9, 0xd8, 0xd3,
  83. 0x53, 0x4b, 0xe2, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x3d, 0x18, 0x82, 0xd8,
  84. 0xd2, 0x53, 0x4b, 0x9c, 0x12, 0x8b, 0x9c, 0x58, 0xb9, 0x98, 0x93, 0x12, 0x8b, 0x00, 0x01, 0x00,
  85. 0x00, 0xff, 0xff, 0x12, 0x66, 0x0c, 0x02, 0x58, 0x00, 0x00, 0x00,
  86. }