|
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: google/ads/googleads/v0/common/value.proto
-
- package common // import "google.golang.org/genproto/googleapis/ads/googleads/v0/common"
-
- import proto "github.com/golang/protobuf/proto"
- import fmt "fmt"
- import math "math"
-
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
-
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
- // A generic data container.
- type Value struct {
- // A value.
- //
- // Types that are valid to be assigned to Value:
- // *Value_BooleanValue
- // *Value_Int64Value
- // *Value_FloatValue
- // *Value_DoubleValue
- // *Value_StringValue
- Value isValue_Value `protobuf_oneof:"value"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
-
- func (m *Value) Reset() { *m = Value{} }
- func (m *Value) String() string { return proto.CompactTextString(m) }
- func (*Value) ProtoMessage() {}
- func (*Value) Descriptor() ([]byte, []int) {
- return fileDescriptor_value_e30ab3a0326a98f4, []int{0}
- }
- func (m *Value) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Value.Unmarshal(m, b)
- }
- func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Value.Marshal(b, m, deterministic)
- }
- func (dst *Value) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Value.Merge(dst, src)
- }
- func (m *Value) XXX_Size() int {
- return xxx_messageInfo_Value.Size(m)
- }
- func (m *Value) XXX_DiscardUnknown() {
- xxx_messageInfo_Value.DiscardUnknown(m)
- }
-
- var xxx_messageInfo_Value proto.InternalMessageInfo
-
- type isValue_Value interface {
- isValue_Value()
- }
-
- type Value_BooleanValue struct {
- BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
- }
-
- type Value_Int64Value struct {
- Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,proto3,oneof"`
- }
-
- type Value_FloatValue struct {
- FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value,json=floatValue,proto3,oneof"`
- }
-
- type Value_DoubleValue struct {
- DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
- }
-
- type Value_StringValue struct {
- StringValue string `protobuf:"bytes,5,opt,name=string_value,json=stringValue,proto3,oneof"`
- }
-
- func (*Value_BooleanValue) isValue_Value() {}
-
- func (*Value_Int64Value) isValue_Value() {}
-
- func (*Value_FloatValue) isValue_Value() {}
-
- func (*Value_DoubleValue) isValue_Value() {}
-
- func (*Value_StringValue) isValue_Value() {}
-
- func (m *Value) GetValue() isValue_Value {
- if m != nil {
- return m.Value
- }
- return nil
- }
-
- func (m *Value) GetBooleanValue() bool {
- if x, ok := m.GetValue().(*Value_BooleanValue); ok {
- return x.BooleanValue
- }
- return false
- }
-
- func (m *Value) GetInt64Value() int64 {
- if x, ok := m.GetValue().(*Value_Int64Value); ok {
- return x.Int64Value
- }
- return 0
- }
-
- func (m *Value) GetFloatValue() float32 {
- if x, ok := m.GetValue().(*Value_FloatValue); ok {
- return x.FloatValue
- }
- return 0
- }
-
- func (m *Value) GetDoubleValue() float64 {
- if x, ok := m.GetValue().(*Value_DoubleValue); ok {
- return x.DoubleValue
- }
- return 0
- }
-
- func (m *Value) GetStringValue() string {
- if x, ok := m.GetValue().(*Value_StringValue); ok {
- return x.StringValue
- }
- return ""
- }
-
- // XXX_OneofFuncs is for the internal use of the proto package.
- func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
- (*Value_BooleanValue)(nil),
- (*Value_Int64Value)(nil),
- (*Value_FloatValue)(nil),
- (*Value_DoubleValue)(nil),
- (*Value_StringValue)(nil),
- }
- }
-
- func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Value)
- // value
- switch x := m.Value.(type) {
- case *Value_BooleanValue:
- t := uint64(0)
- if x.BooleanValue {
- t = 1
- }
- b.EncodeVarint(1<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *Value_Int64Value:
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Int64Value))
- case *Value_FloatValue:
- b.EncodeVarint(3<<3 | proto.WireFixed32)
- b.EncodeFixed32(uint64(math.Float32bits(x.FloatValue)))
- case *Value_DoubleValue:
- b.EncodeVarint(4<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.DoubleValue))
- case *Value_StringValue:
- b.EncodeVarint(5<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.StringValue)
- case nil:
- default:
- return fmt.Errorf("Value.Value has unexpected type %T", x)
- }
- return nil
- }
-
- func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Value)
- switch tag {
- case 1: // value.boolean_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Value = &Value_BooleanValue{x != 0}
- return true, err
- case 2: // value.int64_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Value = &Value_Int64Value{int64(x)}
- return true, err
- case 3: // value.float_value
- if wire != proto.WireFixed32 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed32()
- m.Value = &Value_FloatValue{math.Float32frombits(uint32(x))}
- return true, err
- case 4: // value.double_value
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Value = &Value_DoubleValue{math.Float64frombits(x)}
- return true, err
- case 5: // value.string_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Value = &Value_StringValue{x}
- return true, err
- default:
- return false, nil
- }
- }
-
- func _Value_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Value)
- // value
- switch x := m.Value.(type) {
- case *Value_BooleanValue:
- n += 1 // tag and wire
- n += 1
- case *Value_Int64Value:
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(x.Int64Value))
- case *Value_FloatValue:
- n += 1 // tag and wire
- n += 4
- case *Value_DoubleValue:
- n += 1 // tag and wire
- n += 8
- case *Value_StringValue:
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(len(x.StringValue)))
- n += len(x.StringValue)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
- }
-
- func init() {
- proto.RegisterType((*Value)(nil), "google.ads.googleads.v0.common.Value")
- }
-
- func init() {
- proto.RegisterFile("google/ads/googleads/v0/common/value.proto", fileDescriptor_value_e30ab3a0326a98f4)
- }
-
- var fileDescriptor_value_e30ab3a0326a98f4 = []byte{
- // 312 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0xd0, 0xb1, 0x4e, 0xeb, 0x30,
- 0x18, 0x05, 0xe0, 0x3a, 0xbd, 0xbd, 0x80, 0x5b, 0x96, 0x4e, 0x4c, 0x55, 0x28, 0x42, 0x8a, 0x18,
- 0x9c, 0x48, 0x20, 0x06, 0x33, 0xa5, 0x20, 0xb5, 0x63, 0xd5, 0x21, 0x03, 0x8a, 0x84, 0xdc, 0x3a,
- 0x58, 0x95, 0x5c, 0xff, 0x55, 0x9c, 0xe6, 0x81, 0x18, 0x79, 0x11, 0x24, 0xde, 0x83, 0x85, 0xa7,
- 0x40, 0xf6, 0xef, 0x66, 0x83, 0x29, 0x47, 0x27, 0x5f, 0xac, 0xf8, 0xd0, 0x1b, 0x05, 0xa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