<?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.SubscriptionPermission</code>
 */
class SubscriptionPermission extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bool all_participants = 1;</code>
     */
    protected $all_participants = false;
    /**
     * Generated from protobuf field <code>repeated .livekit.TrackPermission track_permissions = 2;</code>
     */
    private $track_permissions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $all_participants
     *     @type \Livekit\TrackPermission[] $track_permissions
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>bool all_participants = 1;</code>
     * @return bool
     */
    public function getAllParticipants()
    {
        return $this->all_participants;
    }

    /**
     * Generated from protobuf field <code>bool all_participants = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllParticipants($var)
    {
        GPBUtil::checkBool($var);
        $this->all_participants = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.TrackPermission track_permissions = 2;</code>
     * @return RepeatedField<\Livekit\TrackPermission>
     */
    public function getTrackPermissions()
    {
        return $this->track_permissions;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.TrackPermission track_permissions = 2;</code>
     * @param \Livekit\TrackPermission[] $var
     * @return $this
     */
    public function setTrackPermissions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\TrackPermission::class);
        $this->track_permissions = $arr;

        return $this;
    }

}

