<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/channel/v1/reports_service.proto

namespace Google\Cloud\Channel\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A single report value.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.ReportValue</code>
 */
class ReportValue extends \Google\Protobuf\Internal\Message
{
    protected $value;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $string_value
     *           A value of type `string`.
     *     @type int|string $int_value
     *           A value of type `int`.
     *     @type \Google\Type\Decimal $decimal_value
     *           A value of type `google.type.Decimal`, representing non-integer numeric
     *           values.
     *     @type \Google\Type\Money $money_value
     *           A value of type `google.type.Money` (currency code, whole units, decimal
     *           units).
     *     @type \Google\Type\Date $date_value
     *           A value of type `google.type.Date` (year, month, day).
     *     @type \Google\Type\DateTime $date_time_value
     *           A value of type `google.type.DateTime` (year, month, day, hour, minute,
     *           second, and UTC offset or timezone.)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\ReportsService::initOnce();
        parent::__construct($data);
    }

    /**
     * A value of type `string`.
     *
     * Generated from protobuf field <code>string string_value = 1;</code>
     * @return string
     */
    public function getStringValue()
    {
        return $this->readOneof(1);
    }

    public function hasStringValue()
    {
        return $this->hasOneof(1);
    }

    /**
     * A value of type `string`.
     *
     * Generated from protobuf field <code>string string_value = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setStringValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A value of type `int`.
     *
     * Generated from protobuf field <code>int64 int_value = 2;</code>
     * @return int|string
     */
    public function getIntValue()
    {
        return $this->readOneof(2);
    }

    public function hasIntValue()
    {
        return $this->hasOneof(2);
    }

    /**
     * A value of type `int`.
     *
     * Generated from protobuf field <code>int64 int_value = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIntValue($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * A value of type `google.type.Decimal`, representing non-integer numeric
     * values.
     *
     * Generated from protobuf field <code>.google.type.Decimal decimal_value = 3;</code>
     * @return \Google\Type\Decimal|null
     */
    public function getDecimalValue()
    {
        return $this->readOneof(3);
    }

    public function hasDecimalValue()
    {
        return $this->hasOneof(3);
    }

    /**
     * A value of type `google.type.Decimal`, representing non-integer numeric
     * values.
     *
     * Generated from protobuf field <code>.google.type.Decimal decimal_value = 3;</code>
     * @param \Google\Type\Decimal $var
     * @return $this
     */
    public function setDecimalValue($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Decimal::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * A value of type `google.type.Money` (currency code, whole units, decimal
     * units).
     *
     * Generated from protobuf field <code>.google.type.Money money_value = 4;</code>
     * @return \Google\Type\Money|null
     */
    public function getMoneyValue()
    {
        return $this->readOneof(4);
    }

    public function hasMoneyValue()
    {
        return $this->hasOneof(4);
    }

    /**
     * A value of type `google.type.Money` (currency code, whole units, decimal
     * units).
     *
     * Generated from protobuf field <code>.google.type.Money money_value = 4;</code>
     * @param \Google\Type\Money $var
     * @return $this
     */
    public function setMoneyValue($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Money::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * A value of type `google.type.Date` (year, month, day).
     *
     * Generated from protobuf field <code>.google.type.Date date_value = 5;</code>
     * @return \Google\Type\Date|null
     */
    public function getDateValue()
    {
        return $this->readOneof(5);
    }

    public function hasDateValue()
    {
        return $this->hasOneof(5);
    }

    /**
     * A value of type `google.type.Date` (year, month, day).
     *
     * Generated from protobuf field <code>.google.type.Date date_value = 5;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setDateValue($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * A value of type `google.type.DateTime` (year, month, day, hour, minute,
     * second, and UTC offset or timezone.)
     *
     * Generated from protobuf field <code>.google.type.DateTime date_time_value = 6;</code>
     * @return \Google\Type\DateTime|null
     */
    public function getDateTimeValue()
    {
        return $this->readOneof(6);
    }

    public function hasDateTimeValue()
    {
        return $this->hasOneof(6);
    }

    /**
     * A value of type `google.type.DateTime` (year, month, day, hour, minute,
     * second, and UTC offset or timezone.)
     *
     * Generated from protobuf field <code>.google.type.DateTime date_time_value = 6;</code>
     * @param \Google\Type\DateTime $var
     * @return $this
     */
    public function setDateTimeValue($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getValue()
    {
        return $this->whichOneof("value");
    }

}

