<?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.ReconnectResponse</code>
 */
class ReconnectResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .livekit.ICEServer ice_servers = 1;</code>
     */
    private $ice_servers;
    /**
     * Generated from protobuf field <code>.livekit.ClientConfiguration client_configuration = 2;</code>
     */
    protected $client_configuration = null;
    /**
     * Generated from protobuf field <code>.livekit.ServerInfo server_info = 3;</code>
     */
    protected $server_info = null;
    /**
     * last sequence number of reliable message received before resuming
     *
     * Generated from protobuf field <code>uint32 last_message_seq = 4;</code>
     */
    protected $last_message_seq = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\ICEServer[] $ice_servers
     *     @type \Livekit\ClientConfiguration $client_configuration
     *     @type \Livekit\ServerInfo $server_info
     *     @type int $last_message_seq
     *           last sequence number of reliable message received before resuming
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.ICEServer ice_servers = 1;</code>
     * @return RepeatedField<\Livekit\ICEServer>
     */
    public function getIceServers()
    {
        return $this->ice_servers;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ClientConfiguration client_configuration = 2;</code>
     * @return \Livekit\ClientConfiguration|null
     */
    public function getClientConfiguration()
    {
        return $this->client_configuration;
    }

    public function hasClientConfiguration()
    {
        return isset($this->client_configuration);
    }

    public function clearClientConfiguration()
    {
        unset($this->client_configuration);
    }

    /**
     * Generated from protobuf field <code>.livekit.ClientConfiguration client_configuration = 2;</code>
     * @param \Livekit\ClientConfiguration $var
     * @return $this
     */
    public function setClientConfiguration($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ClientConfiguration::class);
        $this->client_configuration = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ServerInfo server_info = 3;</code>
     * @return \Livekit\ServerInfo|null
     */
    public function getServerInfo()
    {
        return $this->server_info;
    }

    public function hasServerInfo()
    {
        return isset($this->server_info);
    }

    public function clearServerInfo()
    {
        unset($this->server_info);
    }

    /**
     * Generated from protobuf field <code>.livekit.ServerInfo server_info = 3;</code>
     * @param \Livekit\ServerInfo $var
     * @return $this
     */
    public function setServerInfo($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ServerInfo::class);
        $this->server_info = $var;

        return $this;
    }

    /**
     * last sequence number of reliable message received before resuming
     *
     * Generated from protobuf field <code>uint32 last_message_seq = 4;</code>
     * @return int
     */
    public function getLastMessageSeq()
    {
        return $this->last_message_seq;
    }

    /**
     * last sequence number of reliable message received before resuming
     *
     * Generated from protobuf field <code>uint32 last_message_seq = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setLastMessageSeq($var)
    {
        GPBUtil::checkUint32($var);
        $this->last_message_seq = $var;

        return $this;
    }

}

