<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: proApiV1Message.proto

namespace Rv\Data\API_v1_Message\API_v1_MessageToken;

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

/**
 * Generated from protobuf message <code>rv.data.API_v1_Message.API_v1_MessageToken.API_v1_TimerToken</code>
 */
class API_v1_TimerToken extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Identifier id = 1;</code>
     */
    protected $id = null;
    /**
     * Generated from protobuf field <code>bool allows_overrun = 2;</code>
     */
    protected $allows_overrun = false;
    /**
     * Generated from protobuf field <code>.rv.data.API_v1_TimerFormat format = 6;</code>
     */
    protected $format = null;
    protected $TimerConfiguration;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\API_v1_Identifier $id
     *     @type bool $allows_overrun
     *     @type \Rv\Data\API_v1_TimerFormat $format
     *     @type \Rv\Data\API_v1_Timer\API_v1_Timer_Countdown $countdown
     *     @type \Rv\Data\API_v1_Timer\API_v1_Timer_CountdownToTime $count_down_to_time
     *     @type \Rv\Data\API_v1_Timer\API_v1_Timer_Elapsed $elapsed
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ProApiV1Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Identifier id = 1;</code>
     * @return \Rv\Data\API_v1_Identifier|null
     */
    public function getId()
    {
        return $this->id;
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Identifier id = 1;</code>
     * @param \Rv\Data\API_v1_Identifier $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_Identifier::class);
        $this->id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool allows_overrun = 2;</code>
     * @return bool
     */
    public function getAllowsOverrun()
    {
        return $this->allows_overrun;
    }

    /**
     * Generated from protobuf field <code>bool allows_overrun = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowsOverrun($var)
    {
        GPBUtil::checkBool($var);
        $this->allows_overrun = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_TimerFormat format = 6;</code>
     * @return \Rv\Data\API_v1_TimerFormat|null
     */
    public function getFormat()
    {
        return $this->format;
    }

    public function hasFormat()
    {
        return isset($this->format);
    }

    public function clearFormat()
    {
        unset($this->format);
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_TimerFormat format = 6;</code>
     * @param \Rv\Data\API_v1_TimerFormat $var
     * @return $this
     */
    public function setFormat($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_TimerFormat::class);
        $this->format = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Timer.API_v1_Timer_Countdown countdown = 3;</code>
     * @return \Rv\Data\API_v1_Timer\API_v1_Timer_Countdown|null
     */
    public function getCountdown()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Timer.API_v1_Timer_Countdown countdown = 3;</code>
     * @param \Rv\Data\API_v1_Timer\API_v1_Timer_Countdown $var
     * @return $this
     */
    public function setCountdown($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_Timer\API_v1_Timer_Countdown::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Timer.API_v1_Timer_CountdownToTime count_down_to_time = 4;</code>
     * @return \Rv\Data\API_v1_Timer\API_v1_Timer_CountdownToTime|null
     */
    public function getCountDownToTime()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Timer.API_v1_Timer_CountdownToTime count_down_to_time = 4;</code>
     * @param \Rv\Data\API_v1_Timer\API_v1_Timer_CountdownToTime $var
     * @return $this
     */
    public function setCountDownToTime($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_Timer\API_v1_Timer_CountdownToTime::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Timer.API_v1_Timer_Elapsed elapsed = 5;</code>
     * @return \Rv\Data\API_v1_Timer\API_v1_Timer_Elapsed|null
     */
    public function getElapsed()
    {
        return $this->readOneof(5);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Timer.API_v1_Timer_Elapsed elapsed = 5;</code>
     * @param \Rv\Data\API_v1_Timer\API_v1_Timer_Elapsed $var
     * @return $this
     */
    public function setElapsed($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_Timer\API_v1_Timer_Elapsed::class);
        $this->writeOneof(5, $var);

        return $this;
    }

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

}

