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

namespace Rv\Data\AudioInput;

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

/**
 * Generated from protobuf message <code>rv.data.AudioInput.BehaviorMode</code>
 */
class BehaviorMode extends \Google\Protobuf\Internal\Message
{
    protected $Mode;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\AudioInput\BehaviorMode\On $on
     *     @type \Rv\Data\AudioInput\BehaviorMode\Off $off
     *     @type \Rv\Data\AudioInput\BehaviorMode\AutoOn $auto_on
     *     @type \Rv\Data\AudioInput\BehaviorMode\AutoOff $auto_off
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Input::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.On on = 1;</code>
     * @return \Rv\Data\AudioInput\BehaviorMode\On|null
     */
    public function getOn()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.On on = 1;</code>
     * @param \Rv\Data\AudioInput\BehaviorMode\On $var
     * @return $this
     */
    public function setOn($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\AudioInput\BehaviorMode\On::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.Off off = 2;</code>
     * @return \Rv\Data\AudioInput\BehaviorMode\Off|null
     */
    public function getOff()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.Off off = 2;</code>
     * @param \Rv\Data\AudioInput\BehaviorMode\Off $var
     * @return $this
     */
    public function setOff($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\AudioInput\BehaviorMode\Off::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.AutoOn auto_on = 3;</code>
     * @return \Rv\Data\AudioInput\BehaviorMode\AutoOn|null
     */
    public function getAutoOn()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.AutoOn auto_on = 3;</code>
     * @param \Rv\Data\AudioInput\BehaviorMode\AutoOn $var
     * @return $this
     */
    public function setAutoOn($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\AudioInput\BehaviorMode\AutoOn::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.AutoOff auto_off = 4;</code>
     * @return \Rv\Data\AudioInput\BehaviorMode\AutoOff|null
     */
    public function getAutoOff()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Generated from protobuf field <code>.rv.data.AudioInput.BehaviorMode.AutoOff auto_off = 4;</code>
     * @param \Rv\Data\AudioInput\BehaviorMode\AutoOff $var
     * @return $this
     */
    public function setAutoOff($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\AudioInput\BehaviorMode\AutoOff::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

