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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.UpdateSubscriptionsRequest</code>
 */
class UpdateSubscriptionsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string room = 1;</code>
     */
    protected $room = '';
    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     */
    protected $identity = '';
    /**
     * list of sids of tracks
     *
     * Generated from protobuf field <code>repeated string track_sids = 3;</code>
     */
    private $track_sids;
    /**
     * set to true to subscribe, false to unsubscribe from tracks
     *
     * Generated from protobuf field <code>bool subscribe = 4;</code>
     */
    protected $subscribe = false;
    /**
     * list of participants and their tracks
     *
     * Generated from protobuf field <code>repeated .livekit.ParticipantTracks participant_tracks = 5;</code>
     */
    private $participant_tracks;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room
     *     @type string $identity
     *     @type string[] $track_sids
     *           list of sids of tracks
     *     @type bool $subscribe
     *           set to true to subscribe, false to unsubscribe from tracks
     *     @type \Livekit\ParticipantTracks[] $participant_tracks
     *           list of participants and their tracks
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRoom::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

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

        return $this;
    }

    /**
     * list of sids of tracks
     *
     * Generated from protobuf field <code>repeated string track_sids = 3;</code>
     * @return RepeatedField<string>
     */
    public function getTrackSids()
    {
        return $this->track_sids;
    }

    /**
     * list of sids of tracks
     *
     * Generated from protobuf field <code>repeated string track_sids = 3;</code>
     * @param string[] $var
     * @return $this
     */
    public function setTrackSids($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->track_sids = $arr;

        return $this;
    }

    /**
     * set to true to subscribe, false to unsubscribe from tracks
     *
     * Generated from protobuf field <code>bool subscribe = 4;</code>
     * @return bool
     */
    public function getSubscribe()
    {
        return $this->subscribe;
    }

    /**
     * set to true to subscribe, false to unsubscribe from tracks
     *
     * Generated from protobuf field <code>bool subscribe = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setSubscribe($var)
    {
        GPBUtil::checkBool($var);
        $this->subscribe = $var;

        return $this;
    }

    /**
     * list of participants and their tracks
     *
     * Generated from protobuf field <code>repeated .livekit.ParticipantTracks participant_tracks = 5;</code>
     * @return RepeatedField<\Livekit\ParticipantTracks>
     */
    public function getParticipantTracks()
    {
        return $this->participant_tracks;
    }

    /**
     * list of participants and their tracks
     *
     * Generated from protobuf field <code>repeated .livekit.ParticipantTracks participant_tracks = 5;</code>
     * @param \Livekit\ParticipantTracks[] $var
     * @return $this
     */
    public function setParticipantTracks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\ParticipantTracks::class);
        $this->participant_tracks = $arr;

        return $this;
    }

}

