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

/**
 * ListPhoneNumbersRequest - Request to list phone numbers
 *
 * Generated from protobuf message <code>livekit.ListPhoneNumbersRequest</code>
 */
class ListPhoneNumbersRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Maximum number of results (default: 50)
     *
     * Generated from protobuf field <code>optional int32 limit = 1;</code>
     */
    protected $limit = null;
    /**
     * Filter by statuses (active, pending, released)
     *
     * Generated from protobuf field <code>repeated .livekit.PhoneNumberStatus statuses = 2;</code>
     */
    private $statuses;
    /**
     * Token for pagination (empty for first page)
     *
     * Generated from protobuf field <code>optional .livekit.TokenPagination page_token = 3;</code>
     */
    protected $page_token = null;
    /**
     * Filter by SIP dispatch rule ID
     *
     * Generated from protobuf field <code>optional string sip_dispatch_rule_id = 4 [(.logger.name) = "sipDispatchRuleID"];</code>
     */
    protected $sip_dispatch_rule_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $limit
     *           Maximum number of results (default: 50)
     *     @type int[] $statuses
     *           Filter by statuses (active, pending, released)
     *     @type \Livekit\TokenPagination $page_token
     *           Token for pagination (empty for first page)
     *     @type string $sip_dispatch_rule_id
     *           Filter by SIP dispatch rule ID
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitPhoneNumber::initOnce();
        parent::__construct($data);
    }

    /**
     * Maximum number of results (default: 50)
     *
     * Generated from protobuf field <code>optional int32 limit = 1;</code>
     * @return int
     */
    public function getLimit()
    {
        return isset($this->limit) ? $this->limit : 0;
    }

    public function hasLimit()
    {
        return isset($this->limit);
    }

    public function clearLimit()
    {
        unset($this->limit);
    }

    /**
     * Maximum number of results (default: 50)
     *
     * Generated from protobuf field <code>optional int32 limit = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setLimit($var)
    {
        GPBUtil::checkInt32($var);
        $this->limit = $var;

        return $this;
    }

    /**
     * Filter by statuses (active, pending, released)
     *
     * Generated from protobuf field <code>repeated .livekit.PhoneNumberStatus statuses = 2;</code>
     * @return RepeatedField<int>
     */
    public function getStatuses()
    {
        return $this->statuses;
    }

    /**
     * Filter by statuses (active, pending, released)
     *
     * Generated from protobuf field <code>repeated .livekit.PhoneNumberStatus statuses = 2;</code>
     * @param int[] $var
     * @return $this
     */
    public function setStatuses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Livekit\PhoneNumberStatus::class);
        $this->statuses = $arr;

        return $this;
    }

    /**
     * Token for pagination (empty for first page)
     *
     * Generated from protobuf field <code>optional .livekit.TokenPagination page_token = 3;</code>
     * @return \Livekit\TokenPagination|null
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    public function hasPageToken()
    {
        return isset($this->page_token);
    }

    public function clearPageToken()
    {
        unset($this->page_token);
    }

    /**
     * Token for pagination (empty for first page)
     *
     * Generated from protobuf field <code>optional .livekit.TokenPagination page_token = 3;</code>
     * @param \Livekit\TokenPagination $var
     * @return $this
     */
    public function setPageToken($var)
    {
        GPBUtil::checkMessage($var, \Livekit\TokenPagination::class);
        $this->page_token = $var;

        return $this;
    }

    /**
     * Filter by SIP dispatch rule ID
     *
     * Generated from protobuf field <code>optional string sip_dispatch_rule_id = 4 [(.logger.name) = "sipDispatchRuleID"];</code>
     * @return string
     */
    public function getSipDispatchRuleId()
    {
        return isset($this->sip_dispatch_rule_id) ? $this->sip_dispatch_rule_id : '';
    }

    public function hasSipDispatchRuleId()
    {
        return isset($this->sip_dispatch_rule_id);
    }

    public function clearSipDispatchRuleId()
    {
        unset($this->sip_dispatch_rule_id);
    }

    /**
     * Filter by SIP dispatch rule ID
     *
     * Generated from protobuf field <code>optional string sip_dispatch_rule_id = 4 [(.logger.name) = "sipDispatchRuleID"];</code>
     * @param string $var
     * @return $this
     */
    public function setSipDispatchRuleId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_dispatch_rule_id = $var;

        return $this;
    }

}

