github.com/hoveychen/protoreflect@v1.4.7-0.20221103114119-0b4b3385ec76/internal/testprotos/desc_test_oneof.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: desc_test_oneof.proto
     3  
     4  package testprotos
     5  
     6  import (
     7  	fmt "fmt"
     8  	proto "github.com/golang/protobuf/proto"
     9  	math "math"
    10  )
    11  
    12  // Reference imports to suppress errors if they are not otherwise used.
    13  var _ = proto.Marshal
    14  var _ = fmt.Errorf
    15  var _ = math.Inf
    16  
    17  // This is a compile-time assertion to ensure that this generated file
    18  // is compatible with the proto package it is being compiled against.
    19  // A compilation error at this line likely means your copy of the
    20  // proto package needs to be updated.
    21  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    22  
    23  type OneOfMessage struct {
    24  	// Types that are valid to be assigned to Value:
    25  	//	*OneOfMessage_BinaryValue
    26  	//	*OneOfMessage_StringValue
    27  	//	*OneOfMessage_BooleanValue
    28  	//	*OneOfMessage_IntValue
    29  	//	*OneOfMessage_Int64Value
    30  	//	*OneOfMessage_DoubleValue
    31  	//	*OneOfMessage_FloatValue
    32  	//	*OneOfMessage_MsgValue
    33  	Value                isOneOfMessage_Value `protobuf_oneof:"value"`
    34  	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
    35  	XXX_unrecognized     []byte               `json:"-"`
    36  	XXX_sizecache        int32                `json:"-"`
    37  }
    38  
    39  func (m *OneOfMessage) Reset()         { *m = OneOfMessage{} }
    40  func (m *OneOfMessage) String() string { return proto.CompactTextString(m) }
    41  func (*OneOfMessage) ProtoMessage()    {}
    42  func (*OneOfMessage) Descriptor() ([]byte, []int) {
    43  	return fileDescriptor_6f7a61c47fbd43fc, []int{0}
    44  }
    45  
    46  func (m *OneOfMessage) XXX_Unmarshal(b []byte) error {
    47  	return xxx_messageInfo_OneOfMessage.Unmarshal(m, b)
    48  }
    49  func (m *OneOfMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    50  	return xxx_messageInfo_OneOfMessage.Marshal(b, m, deterministic)
    51  }
    52  func (m *OneOfMessage) XXX_Merge(src proto.Message) {
    53  	xxx_messageInfo_OneOfMessage.Merge(m, src)
    54  }
    55  func (m *OneOfMessage) XXX_Size() int {
    56  	return xxx_messageInfo_OneOfMessage.Size(m)
    57  }
    58  func (m *OneOfMessage) XXX_DiscardUnknown() {
    59  	xxx_messageInfo_OneOfMessage.DiscardUnknown(m)
    60  }
    61  
    62  var xxx_messageInfo_OneOfMessage proto.InternalMessageInfo
    63  
    64  type isOneOfMessage_Value interface {
    65  	isOneOfMessage_Value()
    66  }
    67  
    68  type OneOfMessage_BinaryValue struct {
    69  	BinaryValue []byte `protobuf:"bytes,1,opt,name=binary_value,json=binaryValue,proto3,oneof"`
    70  }
    71  
    72  type OneOfMessage_StringValue struct {
    73  	StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"`
    74  }
    75  
    76  type OneOfMessage_BooleanValue struct {
    77  	BooleanValue bool `protobuf:"varint,3,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
    78  }
    79  
    80  type OneOfMessage_IntValue struct {
    81  	IntValue int32 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3,oneof"`
    82  }
    83  
    84  type OneOfMessage_Int64Value struct {
    85  	Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3,oneof"`
    86  }
    87  
    88  type OneOfMessage_DoubleValue struct {
    89  	DoubleValue float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue,proto3,oneof"`
    90  }
    91  
    92  type OneOfMessage_FloatValue struct {
    93  	FloatValue float32 `protobuf:"fixed32,7,opt,name=float_value,json=floatValue,proto3,oneof"`
    94  }
    95  
    96  type OneOfMessage_MsgValue struct {
    97  	MsgValue *OneOfMessage `protobuf:"bytes,8,opt,name=msg_value,json=msgValue,proto3,oneof"`
    98  }
    99  
   100  func (*OneOfMessage_BinaryValue) isOneOfMessage_Value() {}
   101  
   102  func (*OneOfMessage_StringValue) isOneOfMessage_Value() {}
   103  
   104  func (*OneOfMessage_BooleanValue) isOneOfMessage_Value() {}
   105  
   106  func (*OneOfMessage_IntValue) isOneOfMessage_Value() {}
   107  
   108  func (*OneOfMessage_Int64Value) isOneOfMessage_Value() {}
   109  
   110  func (*OneOfMessage_DoubleValue) isOneOfMessage_Value() {}
   111  
   112  func (*OneOfMessage_FloatValue) isOneOfMessage_Value() {}
   113  
   114  func (*OneOfMessage_MsgValue) isOneOfMessage_Value() {}
   115  
   116  func (m *OneOfMessage) GetValue() isOneOfMessage_Value {
   117  	if m != nil {
   118  		return m.Value
   119  	}
   120  	return nil
   121  }
   122  
   123  func (m *OneOfMessage) GetBinaryValue() []byte {
   124  	if x, ok := m.GetValue().(*OneOfMessage_BinaryValue); ok {
   125  		return x.BinaryValue
   126  	}
   127  	return nil
   128  }
   129  
   130  func (m *OneOfMessage) GetStringValue() string {
   131  	if x, ok := m.GetValue().(*OneOfMessage_StringValue); ok {
   132  		return x.StringValue
   133  	}
   134  	return ""
   135  }
   136  
   137  func (m *OneOfMessage) GetBooleanValue() bool {
   138  	if x, ok := m.GetValue().(*OneOfMessage_BooleanValue); ok {
   139  		return x.BooleanValue
   140  	}
   141  	return false
   142  }
   143  
   144  func (m *OneOfMessage) GetIntValue() int32 {
   145  	if x, ok := m.GetValue().(*OneOfMessage_IntValue); ok {
   146  		return x.IntValue
   147  	}
   148  	return 0
   149  }
   150  
   151  func (m *OneOfMessage) GetInt64Value() int64 {
   152  	if x, ok := m.GetValue().(*OneOfMessage_Int64Value); ok {
   153  		return x.Int64Value
   154  	}
   155  	return 0
   156  }
   157  
   158  func (m *OneOfMessage) GetDoubleValue() float64 {
   159  	if x, ok := m.GetValue().(*OneOfMessage_DoubleValue); ok {
   160  		return x.DoubleValue
   161  	}
   162  	return 0
   163  }
   164  
   165  func (m *OneOfMessage) GetFloatValue() float32 {
   166  	if x, ok := m.GetValue().(*OneOfMessage_FloatValue); ok {
   167  		return x.FloatValue
   168  	}
   169  	return 0
   170  }
   171  
   172  func (m *OneOfMessage) GetMsgValue() *OneOfMessage {
   173  	if x, ok := m.GetValue().(*OneOfMessage_MsgValue); ok {
   174  		return x.MsgValue
   175  	}
   176  	return nil
   177  }
   178  
   179  // XXX_OneofWrappers is for the internal use of the proto package.
   180  func (*OneOfMessage) XXX_OneofWrappers() []interface{} {
   181  	return []interface{}{
   182  		(*OneOfMessage_BinaryValue)(nil),
   183  		(*OneOfMessage_StringValue)(nil),
   184  		(*OneOfMessage_BooleanValue)(nil),
   185  		(*OneOfMessage_IntValue)(nil),
   186  		(*OneOfMessage_Int64Value)(nil),
   187  		(*OneOfMessage_DoubleValue)(nil),
   188  		(*OneOfMessage_FloatValue)(nil),
   189  		(*OneOfMessage_MsgValue)(nil),
   190  	}
   191  }
   192  
   193  func init() {
   194  	proto.RegisterType((*OneOfMessage)(nil), "testprotos.OneOfMessage")
   195  }
   196  
   197  func init() { proto.RegisterFile("desc_test_oneof.proto", fileDescriptor_6f7a61c47fbd43fc) }
   198  
   199  var fileDescriptor_6f7a61c47fbd43fc = []byte{
   200  	// 290 bytes of a gzipped FileDescriptorProto
   201  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x3d, 0x4f, 0xc3, 0x30,
   202  	0x10, 0x86, 0xe3, 0x96, 0x7e, 0xc4, 0x09, 0x4b, 0x25, 0xa4, 0x2e, 0x48, 0x06, 0x84, 0xe4, 0x29,
   203  	0x11, 0x14, 0xc1, 0xde, 0x29, 0x0b, 0xaa, 0x94, 0x81, 0x81, 0x25, 0x72, 0xd2, 0x4b, 0x6a, 0xe4,
   204  	0xd8, 0x55, 0xec, 0x20, 0xf1, 0x1b, 0xf9, 0x53, 0xc8, 0x1f, 0x6d, 0x99, 0x6c, 0x3d, 0x7e, 0xee,
   205  	0xfc, 0xde, 0xe1, 0x9b, 0x3d, 0xe8, 0xa6, 0x32, 0xa0, 0x4d, 0xa5, 0x24, 0xa8, 0x36, 0x3b, 0x0e,
   206  	0xca, 0xa8, 0x15, 0xb6, 0xc4, 0x5d, 0xf5, 0xfd, 0xef, 0x04, 0xa7, 0x3b, 0x09, 0xbb, 0xf6, 0x1d,
   207  	0xb4, 0x66, 0x1d, 0xac, 0x1e, 0x70, 0x5a, 0x73, 0xc9, 0x86, 0x9f, 0xea, 0x9b, 0x89, 0x11, 0xd6,
   208  	0x88, 0x20, 0x9a, 0x16, 0x51, 0x99, 0x78, 0xfa, 0x61, 0xa1, 0x95, 0xb4, 0x19, 0xb8, 0xec, 0x82,
   209  	0x34, 0x21, 0x88, 0xc6, 0x56, 0xf2, 0xd4, 0x4b, 0x8f, 0xf8, 0xba, 0x56, 0x4a, 0x00, 0x93, 0xc1,
   210  	0x9a, 0x12, 0x44, 0x97, 0x45, 0x54, 0xa6, 0x01, 0x7b, 0xed, 0x16, 0xc7, 0x5c, 0x9a, 0xa0, 0x5c,
   211  	0x11, 0x44, 0x67, 0x45, 0x54, 0x2e, 0xb9, 0x34, 0xfe, 0xf9, 0x0e, 0x27, 0x5c, 0x9a, 0xd7, 0x97,
   212  	0x20, 0xcc, 0x08, 0xa2, 0xd3, 0x22, 0x2a, 0xb1, 0x83, 0xe7, 0x34, 0x7b, 0x35, 0xd6, 0x02, 0x82,
   213  	0x33, 0x27, 0x88, 0x22, 0x9b, 0xc6, 0xd3, 0x73, 0x9f, 0x56, 0x28, 0x76, 0xfa, 0x68, 0x41, 0x10,
   214  	0x9d, 0xd8, 0x3e, 0x0e, 0x7a, 0xe5, 0x0d, 0xc7, 0xbd, 0x3e, 0x8d, 0xb4, 0x24, 0x88, 0x26, 0xcf,
   215  	0xeb, 0xec, 0xb2, 0xab, 0xec, 0xff, 0x9e, 0x6c, 0xc6, 0x5e, 0xfb, 0x49, 0xb7, 0x0b, 0x3c, 0x73,
   216  	0x45, 0xdb, 0xcd, 0xe7, 0x53, 0xc7, 0xcd, 0x61, 0xac, 0xb3, 0x46, 0xf5, 0xf9, 0xd7, 0x61, 0xec,
   217  	0x8f, 0xb9, 0x2b, 0x1e, 0xa0, 0x15, 0xd0, 0x98, 0x9c, 0x4b, 0x03, 0x83, 0x64, 0x22, 0xbf, 0xb4,
   218  	0xad, 0xe7, 0xee, 0xdc, 0xfc, 0x05, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xaa, 0xfa, 0xc4, 0xae, 0x01,
   219  	0x00, 0x00,
   220  }