<?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;

/**
 * ListUpdate is used for updated APIs where 'repeated string' field is modified.
 *
 * Generated from protobuf message <code>livekit.ListUpdate</code>
 */
class ListUpdate extends \Google\Protobuf\Internal\Message
{
    /**
     * set the field to a new list
     *
     * Generated from protobuf field <code>repeated string set = 1;</code>
     */
    private $set;
    /**
     * append items to a list, avoiding duplicates
     *
     * Generated from protobuf field <code>repeated string add = 2;</code>
     */
    private $add;
    /**
     * delete items from a list
     *
     * Generated from protobuf field <code>repeated string remove = 3;</code>
     */
    private $remove;
    /**
     * sets the list to an empty list
     *
     * Generated from protobuf field <code>bool clear = 4;</code>
     */
    protected $clear = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $set
     *           set the field to a new list
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $add
     *           append items to a list, avoiding duplicates
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $remove
     *           delete items from a list
     *     @type bool $clear
     *           sets the list to an empty list
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * set the field to a new list
     *
     * Generated from protobuf field <code>repeated string set = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSet()
    {
        return $this->set;
    }

    /**
     * set the field to a new list
     *
     * Generated from protobuf field <code>repeated string set = 1;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSet($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->set = $arr;

        return $this;
    }

    /**
     * append items to a list, avoiding duplicates
     *
     * Generated from protobuf field <code>repeated string add = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAdd()
    {
        return $this->add;
    }

    /**
     * append items to a list, avoiding duplicates
     *
     * Generated from protobuf field <code>repeated string add = 2;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAdd($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->add = $arr;

        return $this;
    }

    /**
     * delete items from a list
     *
     * Generated from protobuf field <code>repeated string remove = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRemove()
    {
        return $this->remove;
    }

    /**
     * delete items from a list
     *
     * Generated from protobuf field <code>repeated string remove = 3;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRemove($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->remove = $arr;

        return $this;
    }

    /**
     * sets the list to an empty list
     *
     * Generated from protobuf field <code>bool clear = 4;</code>
     * @return bool
     */
    public function getClear()
    {
        return $this->clear;
    }

    /**
     * sets the list to an empty list
     *
     * Generated from protobuf field <code>bool clear = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setClear($var)
    {
        GPBUtil::checkBool($var);
        $this->clear = $var;

        return $this;
    }

}

