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

namespace OS\PB;

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

/**
 **
 * \@brief   Request message type of Remote Procedure Call
 * \@details To ask the device, the RPC, in http like fashion, will request from the device and the device will respond with the data.
 *          Segmentation is used for bulky RPC requests like file writes, where the response is held until every Segment has arrived.
 *
 * Generated from protobuf message <code>OS.PB.RequestMessage</code>
 */
class RequestMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * typically 0 for the first interface
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 1;</code>
     */
    protected $InterfaceIndex = 0;
    /**
     * used to divide a singular request into more than 1 messages. This is the index of the segment starting from 0.
     *
     * Generated from protobuf field <code>uint32 SegmentIndex = 2;</code>
     */
    protected $SegmentIndex = 0;
    /**
     * used to divide a singular request into more than 1 messages. 0 is the same as 1, only if 2 or more then destination awaits for request to complete.
     *
     * Generated from protobuf field <code>uint32 SegmentTotal = 3;</code>
     */
    protected $SegmentTotal = 0;
    protected $RequestType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $InterfaceIndex
     *           typically 0 for the first interface
     *     @type int $SegmentIndex
     *           used to divide a singular request into more than 1 messages. This is the index of the segment starting from 0.
     *     @type int $SegmentTotal
     *           used to divide a singular request into more than 1 messages. 0 is the same as 1, only if 2 or more then destination awaits for request to complete.
     *     @type \OS\PB\WiegandRequest $WiegandInfo
     *           non-networkable intefaces
     *     @type \OS\PB\InputRequest $InputInfo
     *     @type \OS\PB\RS485Request $RS485Info
     *           networkable intefaces
     *     @type \OS\PB\BLERequest $BLEInfo
     *     @type \OS\PB\ModemRequest $ModemInfo
     *     @type \OS\PB\EthernetRequest $EthernetInfo
     *     @type \OS\PB\AccessRequest $AccessControlSimulate
     *           oneaccess system
     *     @type \OS\PB\AccessRequest $AccessEnrol
     *     @type \OS\PB\DeviceRequest $DeviceInfo
     *           device system
     *     @type \OS\PB\FileSystemRequest $DirectoryCreate
     *           2.0
     *     @type \OS\PB\FileSystemRequest $DirectoryDelete
     *           2.0
     *     @type \OS\PB\FileSystemRequest $DirectorySearch
     *           2.0
     *     @type \OS\PB\FileSystemRequest $FileRead
     *           2.0
     *     @type \OS\PB\FileSystemRequest $FileWrite
     *           2.0
     *     @type \OS\PB\FileSystemRequest $FileDelete
     *           2.0
     *     @type \OS\PB\FileSystemRequest $FileCopy
     *           2.0
     *     @type \OS\PB\DeviceConnectRPC $ConnectRequest
     *           firmware only RPC request for between devices
     *     @type \OS\PB\DeviceConnectRPC $ConnectCorrect
     *     @type \OS\PB\CodeHopRequest $CodeHopEnroll
     *           Tells a codehop interface, defined by time-to-live, to listen for a remote for certain number of button presses and responsd back
     *     @type \OS\PB\DFURequest $DFUInitiate
     *           Request to start the DFU process
     *     @type \OS\PB\DFURequest $DFUStatus
     *           Request status of DFU
     *     @type \OS\PB\DFURequest $DFUCancel
     *           Request cancellation of DFU process
     *     @type \OS\PB\HTTPRequest $HTTP
     *           miscellaneous
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Rpc::initOnce();
        parent::__construct($data);
    }

    /**
     * typically 0 for the first interface
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 1;</code>
     * @return int
     */
    public function getInterfaceIndex()
    {
        return $this->InterfaceIndex;
    }

    /**
     * typically 0 for the first interface
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setInterfaceIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->InterfaceIndex = $var;

        return $this;
    }

    /**
     * used to divide a singular request into more than 1 messages. This is the index of the segment starting from 0.
     *
     * Generated from protobuf field <code>uint32 SegmentIndex = 2;</code>
     * @return int
     */
    public function getSegmentIndex()
    {
        return $this->SegmentIndex;
    }

    /**
     * used to divide a singular request into more than 1 messages. This is the index of the segment starting from 0.
     *
     * Generated from protobuf field <code>uint32 SegmentIndex = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSegmentIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->SegmentIndex = $var;

        return $this;
    }

    /**
     * used to divide a singular request into more than 1 messages. 0 is the same as 1, only if 2 or more then destination awaits for request to complete.
     *
     * Generated from protobuf field <code>uint32 SegmentTotal = 3;</code>
     * @return int
     */
    public function getSegmentTotal()
    {
        return $this->SegmentTotal;
    }

    /**
     * used to divide a singular request into more than 1 messages. 0 is the same as 1, only if 2 or more then destination awaits for request to complete.
     *
     * Generated from protobuf field <code>uint32 SegmentTotal = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setSegmentTotal($var)
    {
        GPBUtil::checkUint32($var);
        $this->SegmentTotal = $var;

        return $this;
    }

    /**
     * non-networkable intefaces
     *
     * Generated from protobuf field <code>.OS.PB.WiegandRequest WiegandInfo = 5;</code>
     * @return \OS\PB\WiegandRequest|null
     */
    public function getWiegandInfo()
    {
        return $this->readOneof(5);
    }

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

    /**
     * non-networkable intefaces
     *
     * Generated from protobuf field <code>.OS.PB.WiegandRequest WiegandInfo = 5;</code>
     * @param \OS\PB\WiegandRequest $var
     * @return $this
     */
    public function setWiegandInfo($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\WiegandRequest::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.InputRequest InputInfo = 6;</code>
     * @return \OS\PB\InputRequest|null
     */
    public function getInputInfo()
    {
        return $this->readOneof(6);
    }

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

    /**
     * Generated from protobuf field <code>.OS.PB.InputRequest InputInfo = 6;</code>
     * @param \OS\PB\InputRequest $var
     * @return $this
     */
    public function setInputInfo($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\InputRequest::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * networkable intefaces
     *
     * Generated from protobuf field <code>.OS.PB.RS485Request RS485Info = 8;</code>
     * @return \OS\PB\RS485Request|null
     */
    public function getRS485Info()
    {
        return $this->readOneof(8);
    }

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

    /**
     * networkable intefaces
     *
     * Generated from protobuf field <code>.OS.PB.RS485Request RS485Info = 8;</code>
     * @param \OS\PB\RS485Request $var
     * @return $this
     */
    public function setRS485Info($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\RS485Request::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.BLERequest BLEInfo = 9;</code>
     * @return \OS\PB\BLERequest|null
     */
    public function getBLEInfo()
    {
        return $this->readOneof(9);
    }

    public function hasBLEInfo()
    {
        return $this->hasOneof(9);
    }

    /**
     * Generated from protobuf field <code>.OS.PB.BLERequest BLEInfo = 9;</code>
     * @param \OS\PB\BLERequest $var
     * @return $this
     */
    public function setBLEInfo($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\BLERequest::class);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.ModemRequest ModemInfo = 11;</code>
     * @return \OS\PB\ModemRequest|null
     */
    public function getModemInfo()
    {
        return $this->readOneof(11);
    }

    public function hasModemInfo()
    {
        return $this->hasOneof(11);
    }

    /**
     * Generated from protobuf field <code>.OS.PB.ModemRequest ModemInfo = 11;</code>
     * @param \OS\PB\ModemRequest $var
     * @return $this
     */
    public function setModemInfo($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\ModemRequest::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.EthernetRequest EthernetInfo = 12;</code>
     * @return \OS\PB\EthernetRequest|null
     */
    public function getEthernetInfo()
    {
        return $this->readOneof(12);
    }

    public function hasEthernetInfo()
    {
        return $this->hasOneof(12);
    }

    /**
     * Generated from protobuf field <code>.OS.PB.EthernetRequest EthernetInfo = 12;</code>
     * @param \OS\PB\EthernetRequest $var
     * @return $this
     */
    public function setEthernetInfo($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\EthernetRequest::class);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * oneaccess system
     *
     * Generated from protobuf field <code>.OS.PB.AccessRequest AccessControlSimulate = 20;</code>
     * @return \OS\PB\AccessRequest|null
     */
    public function getAccessControlSimulate()
    {
        return $this->readOneof(20);
    }

    public function hasAccessControlSimulate()
    {
        return $this->hasOneof(20);
    }

    /**
     * oneaccess system
     *
     * Generated from protobuf field <code>.OS.PB.AccessRequest AccessControlSimulate = 20;</code>
     * @param \OS\PB\AccessRequest $var
     * @return $this
     */
    public function setAccessControlSimulate($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessRequest::class);
        $this->writeOneof(20, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.AccessRequest AccessEnrol = 21;</code>
     * @return \OS\PB\AccessRequest|null
     */
    public function getAccessEnrol()
    {
        return $this->readOneof(21);
    }

    public function hasAccessEnrol()
    {
        return $this->hasOneof(21);
    }

    /**
     * Generated from protobuf field <code>.OS.PB.AccessRequest AccessEnrol = 21;</code>
     * @param \OS\PB\AccessRequest $var
     * @return $this
     */
    public function setAccessEnrol($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessRequest::class);
        $this->writeOneof(21, $var);

        return $this;
    }

    /**
     * device system
     *
     * Generated from protobuf field <code>.OS.PB.DeviceRequest DeviceInfo = 300;</code>
     * @return \OS\PB\DeviceRequest|null
     */
    public function getDeviceInfo()
    {
        return $this->readOneof(300);
    }

    public function hasDeviceInfo()
    {
        return $this->hasOneof(300);
    }

    /**
     * device system
     *
     * Generated from protobuf field <code>.OS.PB.DeviceRequest DeviceInfo = 300;</code>
     * @param \OS\PB\DeviceRequest $var
     * @return $this
     */
    public function setDeviceInfo($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DeviceRequest::class);
        $this->writeOneof(300, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest DirectoryCreate = 310;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getDirectoryCreate()
    {
        return $this->readOneof(310);
    }

    public function hasDirectoryCreate()
    {
        return $this->hasOneof(310);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest DirectoryCreate = 310;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setDirectoryCreate($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(310, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest DirectoryDelete = 311;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getDirectoryDelete()
    {
        return $this->readOneof(311);
    }

    public function hasDirectoryDelete()
    {
        return $this->hasOneof(311);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest DirectoryDelete = 311;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setDirectoryDelete($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(311, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest DirectorySearch = 312;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getDirectorySearch()
    {
        return $this->readOneof(312);
    }

    public function hasDirectorySearch()
    {
        return $this->hasOneof(312);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest DirectorySearch = 312;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setDirectorySearch($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(312, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileRead = 313;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getFileRead()
    {
        return $this->readOneof(313);
    }

    public function hasFileRead()
    {
        return $this->hasOneof(313);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileRead = 313;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setFileRead($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(313, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileWrite = 314;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getFileWrite()
    {
        return $this->readOneof(314);
    }

    public function hasFileWrite()
    {
        return $this->hasOneof(314);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileWrite = 314;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setFileWrite($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(314, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileDelete = 315;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getFileDelete()
    {
        return $this->readOneof(315);
    }

    public function hasFileDelete()
    {
        return $this->hasOneof(315);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileDelete = 315;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setFileDelete($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(315, $var);

        return $this;
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileCopy = 316;</code>
     * @return \OS\PB\FileSystemRequest|null
     */
    public function getFileCopy()
    {
        return $this->readOneof(316);
    }

    public function hasFileCopy()
    {
        return $this->hasOneof(316);
    }

    /**
     * 2.0
     *
     * Generated from protobuf field <code>.OS.PB.FileSystemRequest FileCopy = 316;</code>
     * @param \OS\PB\FileSystemRequest $var
     * @return $this
     */
    public function setFileCopy($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\FileSystemRequest::class);
        $this->writeOneof(316, $var);

        return $this;
    }

    /**
     * firmware only RPC request for between devices
     *
     * Generated from protobuf field <code>.OS.PB.DeviceConnectRPC ConnectRequest = 320;</code>
     * @return \OS\PB\DeviceConnectRPC|null
     */
    public function getConnectRequest()
    {
        return $this->readOneof(320);
    }

    public function hasConnectRequest()
    {
        return $this->hasOneof(320);
    }

    /**
     * firmware only RPC request for between devices
     *
     * Generated from protobuf field <code>.OS.PB.DeviceConnectRPC ConnectRequest = 320;</code>
     * @param \OS\PB\DeviceConnectRPC $var
     * @return $this
     */
    public function setConnectRequest($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DeviceConnectRPC::class);
        $this->writeOneof(320, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.DeviceConnectRPC ConnectCorrect = 322;</code>
     * @return \OS\PB\DeviceConnectRPC|null
     */
    public function getConnectCorrect()
    {
        return $this->readOneof(322);
    }

    public function hasConnectCorrect()
    {
        return $this->hasOneof(322);
    }

    /**
     * Generated from protobuf field <code>.OS.PB.DeviceConnectRPC ConnectCorrect = 322;</code>
     * @param \OS\PB\DeviceConnectRPC $var
     * @return $this
     */
    public function setConnectCorrect($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DeviceConnectRPC::class);
        $this->writeOneof(322, $var);

        return $this;
    }

    /**
     * Tells a codehop interface, defined by time-to-live, to listen for a remote for certain number of button presses and responsd back
     *
     * Generated from protobuf field <code>.OS.PB.CodeHopRequest CodeHopEnroll = 330;</code>
     * @return \OS\PB\CodeHopRequest|null
     */
    public function getCodeHopEnroll()
    {
        return $this->readOneof(330);
    }

    public function hasCodeHopEnroll()
    {
        return $this->hasOneof(330);
    }

    /**
     * Tells a codehop interface, defined by time-to-live, to listen for a remote for certain number of button presses and responsd back
     *
     * Generated from protobuf field <code>.OS.PB.CodeHopRequest CodeHopEnroll = 330;</code>
     * @param \OS\PB\CodeHopRequest $var
     * @return $this
     */
    public function setCodeHopEnroll($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\CodeHopRequest::class);
        $this->writeOneof(330, $var);

        return $this;
    }

    /**
     * Request to start the DFU process
     *
     * Generated from protobuf field <code>.OS.PB.DFURequest DFUInitiate = 350;</code>
     * @return \OS\PB\DFURequest|null
     */
    public function getDFUInitiate()
    {
        return $this->readOneof(350);
    }

    public function hasDFUInitiate()
    {
        return $this->hasOneof(350);
    }

    /**
     * Request to start the DFU process
     *
     * Generated from protobuf field <code>.OS.PB.DFURequest DFUInitiate = 350;</code>
     * @param \OS\PB\DFURequest $var
     * @return $this
     */
    public function setDFUInitiate($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DFURequest::class);
        $this->writeOneof(350, $var);

        return $this;
    }

    /**
     * Request status of DFU
     *
     * Generated from protobuf field <code>.OS.PB.DFURequest DFUStatus = 351;</code>
     * @return \OS\PB\DFURequest|null
     */
    public function getDFUStatus()
    {
        return $this->readOneof(351);
    }

    public function hasDFUStatus()
    {
        return $this->hasOneof(351);
    }

    /**
     * Request status of DFU
     *
     * Generated from protobuf field <code>.OS.PB.DFURequest DFUStatus = 351;</code>
     * @param \OS\PB\DFURequest $var
     * @return $this
     */
    public function setDFUStatus($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DFURequest::class);
        $this->writeOneof(351, $var);

        return $this;
    }

    /**
     * Request cancellation of DFU process
     *
     * Generated from protobuf field <code>.OS.PB.DFURequest DFUCancel = 352;</code>
     * @return \OS\PB\DFURequest|null
     */
    public function getDFUCancel()
    {
        return $this->readOneof(352);
    }

    public function hasDFUCancel()
    {
        return $this->hasOneof(352);
    }

    /**
     * Request cancellation of DFU process
     *
     * Generated from protobuf field <code>.OS.PB.DFURequest DFUCancel = 352;</code>
     * @param \OS\PB\DFURequest $var
     * @return $this
     */
    public function setDFUCancel($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DFURequest::class);
        $this->writeOneof(352, $var);

        return $this;
    }

    /**
     * miscellaneous
     *
     * Generated from protobuf field <code>.OS.PB.HTTPRequest HTTP = 80;</code>
     * @return \OS\PB\HTTPRequest|null
     */
    public function getHTTP()
    {
        return $this->readOneof(80);
    }

    public function hasHTTP()
    {
        return $this->hasOneof(80);
    }

    /**
     * miscellaneous
     *
     * Generated from protobuf field <code>.OS.PB.HTTPRequest HTTP = 80;</code>
     * @param \OS\PB\HTTPRequest $var
     * @return $this
     */
    public function setHTTP($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\HTTPRequest::class);
        $this->writeOneof(80, $var);

        return $this;
    }

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

}

