<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_models.proto

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.SpeakerInfo</code>
 */
class SpeakerInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string sid = 1;</code>
     */
    protected $sid = '';
    /**
     * audio level, 0-1.0, 1 is loudest
     *
     * Generated from protobuf field <code>float level = 2;</code>
     */
    protected $level = 0.0;
    /**
     * true if speaker is currently active
     *
     * Generated from protobuf field <code>bool active = 3;</code>
     */
    protected $active = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sid
     *     @type float $level
     *           audio level, 0-1.0, 1 is loudest
     *     @type bool $active
     *           true if speaker is currently active
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string sid = 1;</code>
     * @return string
     */
    public function getSid()
    {
        return $this->sid;
    }

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

        return $this;
    }

    /**
     * audio level, 0-1.0, 1 is loudest
     *
     * Generated from protobuf field <code>float level = 2;</code>
     * @return float
     */
    public function getLevel()
    {
        return $this->level;
    }

    /**
     * audio level, 0-1.0, 1 is loudest
     *
     * Generated from protobuf field <code>float level = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setLevel($var)
    {
        GPBUtil::checkFloat($var);
        $this->level = $var;

        return $this;
    }

    /**
     * true if speaker is currently active
     *
     * Generated from protobuf field <code>bool active = 3;</code>
     * @return bool
     */
    public function getActive()
    {
        return $this->active;
    }

    /**
     * true if speaker is currently active
     *
     * Generated from protobuf field <code>bool active = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setActive($var)
    {
        GPBUtil::checkBool($var);
        $this->active = $var;

        return $this;
    }

}

