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

namespace Rv\Data\Timer;

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

/**
 * Generated from protobuf message <code>rv.data.Timer.Configuration</code>
 */
class Configuration extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bool allows_overrun = 4;</code>
     */
    protected $allows_overrun = false;
    protected $TimerType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $allows_overrun
     *     @type \Rv\Data\Timer\Configuration\TimerTypeCountdown $countdown
     *     @type \Rv\Data\Timer\Configuration\TimerTypeCountdownToTime $countdown_to_time
     *     @type \Rv\Data\Timer\Configuration\TimerTypeElapsedTime $elapsed_time
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Timers::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>bool allows_overrun = 4;</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.Timer.Configuration.TimerTypeCountdown countdown = 1;</code>
     * @return \Rv\Data\Timer\Configuration\TimerTypeCountdown|null
     */
    public function getCountdown()
    {
        return $this->readOneof(1);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Timer.Configuration.TimerTypeCountdownToTime countdown_to_time = 2;</code>
     * @return \Rv\Data\Timer\Configuration\TimerTypeCountdownToTime|null
     */
    public function getCountdownToTime()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.Timer.Configuration.TimerTypeCountdownToTime countdown_to_time = 2;</code>
     * @param \Rv\Data\Timer\Configuration\TimerTypeCountdownToTime $var
     * @return $this
     */
    public function setCountdownToTime($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Timer\Configuration\TimerTypeCountdownToTime::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Timer.Configuration.TimerTypeElapsedTime elapsed_time = 3;</code>
     * @return \Rv\Data\Timer\Configuration\TimerTypeElapsedTime|null
     */
    public function getElapsedTime()
    {
        return $this->readOneof(3);
    }

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

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

        return $this;
    }

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

}

