<?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.CaptureType</code>
 */
class CaptureType extends \Google\Protobuf\Internal\Message
{
    protected $CaptureAction;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\Action\CaptureType\CaptureStart $start
     *     @type \Rv\Data\Action\CaptureType\CaptureStop $stop
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Action::initOnce();
        parent::__construct($data);
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

}

