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

namespace Rv\Data\Action;

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

/**
 * Generated from protobuf message <code>rv.data.Action.TransportControlType</code>
 */
class TransportControlType extends \Google\Protobuf\Internal\Message
{
    protected $Command;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\Action\TransportControlType\Play $play
     *     @type \Rv\Data\Action\TransportControlType\Pause $pause
     *     @type \Rv\Data\Action\TransportControlType\JumpToTime $jumpToTime
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Action::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.TransportControlType.Play play = 1;</code>
     * @return \Rv\Data\Action\TransportControlType\Play|null
     */
    public function getPlay()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.Action.TransportControlType.Play play = 1;</code>
     * @param \Rv\Data\Action\TransportControlType\Play $var
     * @return $this
     */
    public function setPlay($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\TransportControlType\Play::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.TransportControlType.Pause pause = 2;</code>
     * @return \Rv\Data\Action\TransportControlType\Pause|null
     */
    public function getPause()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.Action.TransportControlType.Pause pause = 2;</code>
     * @param \Rv\Data\Action\TransportControlType\Pause $var
     * @return $this
     */
    public function setPause($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\TransportControlType\Pause::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.TransportControlType.JumpToTime jumpToTime = 3;</code>
     * @return \Rv\Data\Action\TransportControlType\JumpToTime|null
     */
    public function getJumpToTime()
    {
        return $this->readOneof(3);
    }

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

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

        return $this;
    }

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

}

