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

namespace OS\PB;

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

/**
 * Generated from protobuf message <code>OS.PB.MetricMessage</code>
 */
class MetricMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * For a specific interface
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 1;</code>
     */
    protected $InterfaceIndex = 0;
    protected $MetricType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $InterfaceIndex
     *           For a specific interface
     *     @type \OS\PB\RelayMetric $Relay
     *     @type \OS\PB\WiegandMetric $Wiegand
     *     @type \OS\PB\InputMetric $Input
     *     @type \OS\PB\CodeHopMetric $CodeHop
     *     @type \OS\PB\RS485Metric $RS485
     *     @type \OS\PB\BLEMetric $BLE
     *     @type \OS\PB\EthernetMetric $Ethernet
     *     @type \OS\PB\ModemMetric $Modem
     *     @type \OS\PB\AccessMetric $Access
     *     @type \OS\PB\DeviceMetric $Device
     *           LogMetric            Log             = 14;   // DEPRECATED as part of DeviceMetric now
     *     @type \OS\PB\DeviceNetworkMetric $DeviceNetwork
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Metric::initOnce();
        parent::__construct($data);
    }

    /**
     * For a specific interface
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 1;</code>
     * @return int
     */
    public function getInterfaceIndex()
    {
        return $this->InterfaceIndex;
    }

    /**
     * For a specific 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;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.RelayMetric Relay = 3;</code>
     * @return \OS\PB\RelayMetric|null
     */
    public function getRelay()
    {
        return $this->readOneof(3);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.WiegandMetric Wiegand = 4;</code>
     * @return \OS\PB\WiegandMetric|null
     */
    public function getWiegand()
    {
        return $this->readOneof(4);
    }

    public function hasWiegand()
    {
        return $this->hasOneof(4);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.InputMetric Input = 5;</code>
     * @return \OS\PB\InputMetric|null
     */
    public function getInput()
    {
        return $this->readOneof(5);
    }

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.RS485Metric RS485 = 8;</code>
     * @return \OS\PB\RS485Metric|null
     */
    public function getRS485()
    {
        return $this->readOneof(8);
    }

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.AccessMetric Access = 13;</code>
     * @return \OS\PB\AccessMetric|null
     */
    public function getAccess()
    {
        return $this->readOneof(13);
    }

    public function hasAccess()
    {
        return $this->hasOneof(13);
    }

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

        return $this;
    }

    /**
     * LogMetric            Log             = 14;   // DEPRECATED as part of DeviceMetric now
     *
     * Generated from protobuf field <code>.OS.PB.DeviceMetric Device = 15;</code>
     * @return \OS\PB\DeviceMetric|null
     */
    public function getDevice()
    {
        return $this->readOneof(15);
    }

    public function hasDevice()
    {
        return $this->hasOneof(15);
    }

    /**
     * LogMetric            Log             = 14;   // DEPRECATED as part of DeviceMetric now
     *
     * Generated from protobuf field <code>.OS.PB.DeviceMetric Device = 15;</code>
     * @param \OS\PB\DeviceMetric $var
     * @return $this
     */
    public function setDevice($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\DeviceMetric::class);
        $this->writeOneof(15, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.DeviceNetworkMetric DeviceNetwork = 16;</code>
     * @return \OS\PB\DeviceNetworkMetric|null
     */
    public function getDeviceNetwork()
    {
        return $this->readOneof(16);
    }

    public function hasDeviceNetwork()
    {
        return $this->hasOneof(16);
    }

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

        return $this;
    }

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

}

