<?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.CommunicationType</code>
 */
class CommunicationType extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.CollectionElementType device_identification = 1;</code>
     */
    protected $device_identification = null;
    /**
     * Generated from protobuf field <code>string format = 2;</code>
     */
    protected $format = '';
    /**
     * Generated from protobuf field <code>string description = 3;</code>
     */
    protected $description = '';
    /**
     * Generated from protobuf field <code>repeated .rv.data.Action.CommunicationType.Command commands = 4;</code>
     */
    private $commands;
    protected $CommandTypeData;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\CollectionElementType $device_identification
     *     @type string $format
     *     @type string $description
     *     @type array<\Rv\Data\Action\CommunicationType\Command>|\Google\Protobuf\Internal\RepeatedField $commands
     *     @type \Rv\Data\Action\CommunicationType\MIDICommand $midi_command
     *     @type \Rv\Data\Action\CommunicationType\GlobalCacheCommand $global_cache_command
     *     @type \Rv\Data\Action\CommunicationType\GVG100Command $gvg100_command
     *     @type \Rv\Data\Action\CommunicationType\SonyBVSCommand $sony_BVS_command
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Action::initOnce();
        parent::__construct($data);
    }

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

    public function hasDeviceIdentification()
    {
        return isset($this->device_identification);
    }

    public function clearDeviceIdentification()
    {
        unset($this->device_identification);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string format = 2;</code>
     * @return string
     */
    public function getFormat()
    {
        return $this->format;
    }

    /**
     * Generated from protobuf field <code>string format = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setFormat($var)
    {
        GPBUtil::checkString($var, True);
        $this->format = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string description = 3;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Generated from protobuf field <code>string description = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Action.CommunicationType.Command commands = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCommands()
    {
        return $this->commands;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Action.CommunicationType.Command commands = 4;</code>
     * @param array<\Rv\Data\Action\CommunicationType\Command>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCommands($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Rv\Data\Action\CommunicationType\Command::class);
        $this->commands = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.MIDICommand midi_command = 5;</code>
     * @return \Rv\Data\Action\CommunicationType\MIDICommand|null
     */
    public function getMidiCommand()
    {
        return $this->readOneof(5);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.GlobalCacheCommand global_cache_command = 6;</code>
     * @return \Rv\Data\Action\CommunicationType\GlobalCacheCommand|null
     */
    public function getGlobalCacheCommand()
    {
        return $this->readOneof(6);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.GlobalCacheCommand global_cache_command = 6;</code>
     * @param \Rv\Data\Action\CommunicationType\GlobalCacheCommand $var
     * @return $this
     */
    public function setGlobalCacheCommand($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\CommunicationType\GlobalCacheCommand::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.GVG100Command gvg100_command = 7;</code>
     * @return \Rv\Data\Action\CommunicationType\GVG100Command|null
     */
    public function getGvg100Command()
    {
        return $this->readOneof(7);
    }

    public function hasGvg100Command()
    {
        return $this->hasOneof(7);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.GVG100Command gvg100_command = 7;</code>
     * @param \Rv\Data\Action\CommunicationType\GVG100Command $var
     * @return $this
     */
    public function setGvg100Command($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\CommunicationType\GVG100Command::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.SonyBVSCommand sony_BVS_command = 8;</code>
     * @return \Rv\Data\Action\CommunicationType\SonyBVSCommand|null
     */
    public function getSonyBVSCommand()
    {
        return $this->readOneof(8);
    }

    public function hasSonyBVSCommand()
    {
        return $this->hasOneof(8);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.CommunicationType.SonyBVSCommand sony_BVS_command = 8;</code>
     * @param \Rv\Data\Action\CommunicationType\SonyBVSCommand $var
     * @return $this
     */
    public function setSonyBVSCommand($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\CommunicationType\SonyBVSCommand::class);
        $this->writeOneof(8, $var);

        return $this;
    }

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

}

