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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.SimulateScenario</code>
 */
class SimulateScenario extends \Google\Protobuf\Internal\Message
{
    protected $scenario;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $speaker_update
     *           simulate N seconds of speaker activity
     *     @type bool $node_failure
     *           simulate local node failure
     *     @type bool $migration
     *           simulate migration
     *     @type bool $server_leave
     *           server to send leave
     *     @type int $switch_candidate_protocol
     *           switch candidate protocol to tcp
     *     @type int|string $subscriber_bandwidth
     *           maximum bandwidth for subscribers, in bps
     *           when zero, clears artificial bandwidth limit
     *     @type bool $disconnect_signal_on_resume
     *           disconnect signal on resume
     *     @type bool $disconnect_signal_on_resume_no_messages
     *           disconnect signal on resume before sending any messages from server
     *     @type bool $leave_request_full_reconnect
     *           full reconnect leave request
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

    /**
     * simulate N seconds of speaker activity
     *
     * Generated from protobuf field <code>int32 speaker_update = 1;</code>
     * @return int
     */
    public function getSpeakerUpdate()
    {
        return $this->readOneof(1);
    }

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

    /**
     * simulate N seconds of speaker activity
     *
     * Generated from protobuf field <code>int32 speaker_update = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSpeakerUpdate($var)
    {
        GPBUtil::checkInt32($var);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * simulate local node failure
     *
     * Generated from protobuf field <code>bool node_failure = 2;</code>
     * @return bool
     */
    public function getNodeFailure()
    {
        return $this->readOneof(2);
    }

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

    /**
     * simulate local node failure
     *
     * Generated from protobuf field <code>bool node_failure = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setNodeFailure($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * simulate migration
     *
     * Generated from protobuf field <code>bool migration = 3;</code>
     * @return bool
     */
    public function getMigration()
    {
        return $this->readOneof(3);
    }

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

    /**
     * simulate migration
     *
     * Generated from protobuf field <code>bool migration = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setMigration($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * server to send leave
     *
     * Generated from protobuf field <code>bool server_leave = 4;</code>
     * @return bool
     */
    public function getServerLeave()
    {
        return $this->readOneof(4);
    }

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

    /**
     * server to send leave
     *
     * Generated from protobuf field <code>bool server_leave = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setServerLeave($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * switch candidate protocol to tcp
     *
     * Generated from protobuf field <code>.livekit.CandidateProtocol switch_candidate_protocol = 5;</code>
     * @return int
     */
    public function getSwitchCandidateProtocol()
    {
        return $this->readOneof(5);
    }

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

    /**
     * switch candidate protocol to tcp
     *
     * Generated from protobuf field <code>.livekit.CandidateProtocol switch_candidate_protocol = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setSwitchCandidateProtocol($var)
    {
        GPBUtil::checkEnum($var, \Livekit\CandidateProtocol::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * maximum bandwidth for subscribers, in bps
     * when zero, clears artificial bandwidth limit
     *
     * Generated from protobuf field <code>int64 subscriber_bandwidth = 6;</code>
     * @return int|string
     */
    public function getSubscriberBandwidth()
    {
        return $this->readOneof(6);
    }

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

    /**
     * maximum bandwidth for subscribers, in bps
     * when zero, clears artificial bandwidth limit
     *
     * Generated from protobuf field <code>int64 subscriber_bandwidth = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setSubscriberBandwidth($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * disconnect signal on resume
     *
     * Generated from protobuf field <code>bool disconnect_signal_on_resume = 7;</code>
     * @return bool
     */
    public function getDisconnectSignalOnResume()
    {
        return $this->readOneof(7);
    }

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

    /**
     * disconnect signal on resume
     *
     * Generated from protobuf field <code>bool disconnect_signal_on_resume = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setDisconnectSignalOnResume($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * disconnect signal on resume before sending any messages from server
     *
     * Generated from protobuf field <code>bool disconnect_signal_on_resume_no_messages = 8;</code>
     * @return bool
     */
    public function getDisconnectSignalOnResumeNoMessages()
    {
        return $this->readOneof(8);
    }

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

    /**
     * disconnect signal on resume before sending any messages from server
     *
     * Generated from protobuf field <code>bool disconnect_signal_on_resume_no_messages = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setDisconnectSignalOnResumeNoMessages($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * full reconnect leave request
     *
     * Generated from protobuf field <code>bool leave_request_full_reconnect = 9;</code>
     * @return bool
     */
    public function getLeaveRequestFullReconnect()
    {
        return $this->readOneof(9);
    }

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

    /**
     * full reconnect leave request
     *
     * Generated from protobuf field <code>bool leave_request_full_reconnect = 9;</code>
     * @param bool $var
     * @return $this
     */
    public function setLeaveRequestFullReconnect($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(9, $var);

        return $this;
    }

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

}

