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

namespace Livekit;

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

/**
 * SearchPhoneNumbersResponse - Response containing available phone numbers
 *
 * Generated from protobuf message <code>livekit.SearchPhoneNumbersResponse</code>
 */
class SearchPhoneNumbersResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of available phone numbers
     *
     * Generated from protobuf field <code>repeated .livekit.PhoneNumber items = 1;</code>
     */
    private $items;
    /**
     * Token for next page (empty if no more pages)
     *
     * Generated from protobuf field <code>.livekit.TokenPagination next_page_token = 2;</code>
     */
    protected $next_page_token = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\PhoneNumber[] $items
     *           List of available phone numbers
     *     @type \Livekit\TokenPagination $next_page_token
     *           Token for next page (empty if no more pages)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitPhoneNumber::initOnce();
        parent::__construct($data);
    }

    /**
     * List of available phone numbers
     *
     * Generated from protobuf field <code>repeated .livekit.PhoneNumber items = 1;</code>
     * @return RepeatedField<\Livekit\PhoneNumber>
     */
    public function getItems()
    {
        return $this->items;
    }

    /**
     * List of available phone numbers
     *
     * Generated from protobuf field <code>repeated .livekit.PhoneNumber items = 1;</code>
     * @param \Livekit\PhoneNumber[] $var
     * @return $this
     */
    public function setItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\PhoneNumber::class);
        $this->items = $arr;

        return $this;
    }

    /**
     * Token for next page (empty if no more pages)
     *
     * Generated from protobuf field <code>.livekit.TokenPagination next_page_token = 2;</code>
     * @return \Livekit\TokenPagination|null
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    public function hasNextPageToken()
    {
        return isset($this->next_page_token);
    }

    public function clearNextPageToken()
    {
        unset($this->next_page_token);
    }

    /**
     * Token for next page (empty if no more pages)
     *
     * Generated from protobuf field <code>.livekit.TokenPagination next_page_token = 2;</code>
     * @param \Livekit\TokenPagination $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkMessage($var, \Livekit\TokenPagination::class);
        $this->next_page_token = $var;

        return $this;
    }

}

