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

/**
 * PhoneNumber - Unified phone number type for inventory and purchased numbers
 *
 * Generated from protobuf message <code>livekit.PhoneNumber</code>
 */
class PhoneNumber extends \Google\Protobuf\Internal\Message
{
    /**
     * Unique identifier
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Phone number in E.164 format (e.g., "+14155552671")
     *
     * Generated from protobuf field <code>string e164_format = 2;</code>
     */
    protected $e164_format = '';
    /**
     * Country code (e.g., "US")
     *
     * Generated from protobuf field <code>string country_code = 3;</code>
     */
    protected $country_code = '';
    /**
     * Area code (e.g., "415")
     *
     * Generated from protobuf field <code>string area_code = 4;</code>
     */
    protected $area_code = '';
    /**
     * Number type (mobile, local, toll-free, unknown)
     *
     * Generated from protobuf field <code>.livekit.PhoneNumberType number_type = 5;</code>
     */
    protected $number_type = 0;
    /**
     * City/locality (e.g., "San Francisco")
     *
     * Generated from protobuf field <code>string locality = 6;</code>
     */
    protected $locality = '';
    /**
     * State/region (e.g., "CA")
     *
     * Generated from protobuf field <code>string region = 7;</code>
     */
    protected $region = '';
    /**
     * Spam score for fraud detection
     *
     * Generated from protobuf field <code>double spam_score = 8;</code>
     */
    protected $spam_score = 0.0;
    /**
     * Creation timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 9;</code>
     */
    protected $created_at = null;
    /**
     * Last update timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp updated_at = 10;</code>
     */
    protected $updated_at = null;
    /**
     * Available capabilities (e.g., "voice", "sms")
     *
     * Generated from protobuf field <code>repeated string capabilities = 11;</code>
     */
    private $capabilities;
    /**
     * Current status
     *
     * Generated from protobuf field <code>.livekit.PhoneNumberStatus status = 12;</code>
     */
    protected $status = 0;
    /**
     * Assignment timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp assigned_at = 13;</code>
     */
    protected $assigned_at = null;
    /**
     * Release timestamp (if applicable)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp released_at = 14;</code>
     */
    protected $released_at = null;
    /**
     * Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
     *
     * Generated from protobuf field <code>string sip_dispatch_rule_id = 15 [deprecated = true];</code>
     * @deprecated
     */
    protected $sip_dispatch_rule_id = '';
    /**
     * Associated SIP dispatch rule IDs
     *
     * Generated from protobuf field <code>repeated string sip_dispatch_rule_ids = 16;</code>
     */
    private $sip_dispatch_rule_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Unique identifier
     *     @type string $e164_format
     *           Phone number in E.164 format (e.g., "+14155552671")
     *     @type string $country_code
     *           Country code (e.g., "US")
     *     @type string $area_code
     *           Area code (e.g., "415")
     *     @type int $number_type
     *           Number type (mobile, local, toll-free, unknown)
     *     @type string $locality
     *           City/locality (e.g., "San Francisco")
     *     @type string $region
     *           State/region (e.g., "CA")
     *     @type float $spam_score
     *           Spam score for fraud detection
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Creation timestamp
     *     @type \Google\Protobuf\Timestamp $updated_at
     *           Last update timestamp
     *     @type string[] $capabilities
     *           Available capabilities (e.g., "voice", "sms")
     *     @type int $status
     *           Current status
     *     @type \Google\Protobuf\Timestamp $assigned_at
     *           Assignment timestamp
     *     @type \Google\Protobuf\Timestamp $released_at
     *           Release timestamp (if applicable)
     *     @type string $sip_dispatch_rule_id
     *           Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
     *     @type string[] $sip_dispatch_rule_ids
     *           Associated SIP dispatch rule IDs
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitPhoneNumber::initOnce();
        parent::__construct($data);
    }

    /**
     * Unique identifier
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Unique identifier
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Phone number in E.164 format (e.g., "+14155552671")
     *
     * Generated from protobuf field <code>string e164_format = 2;</code>
     * @return string
     */
    public function getE164Format()
    {
        return $this->e164_format;
    }

    /**
     * Phone number in E.164 format (e.g., "+14155552671")
     *
     * Generated from protobuf field <code>string e164_format = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setE164Format($var)
    {
        GPBUtil::checkString($var, True);
        $this->e164_format = $var;

        return $this;
    }

    /**
     * Country code (e.g., "US")
     *
     * Generated from protobuf field <code>string country_code = 3;</code>
     * @return string
     */
    public function getCountryCode()
    {
        return $this->country_code;
    }

    /**
     * Country code (e.g., "US")
     *
     * Generated from protobuf field <code>string country_code = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->country_code = $var;

        return $this;
    }

    /**
     * Area code (e.g., "415")
     *
     * Generated from protobuf field <code>string area_code = 4;</code>
     * @return string
     */
    public function getAreaCode()
    {
        return $this->area_code;
    }

    /**
     * Area code (e.g., "415")
     *
     * Generated from protobuf field <code>string area_code = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAreaCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->area_code = $var;

        return $this;
    }

    /**
     * Number type (mobile, local, toll-free, unknown)
     *
     * Generated from protobuf field <code>.livekit.PhoneNumberType number_type = 5;</code>
     * @return int
     */
    public function getNumberType()
    {
        return $this->number_type;
    }

    /**
     * Number type (mobile, local, toll-free, unknown)
     *
     * Generated from protobuf field <code>.livekit.PhoneNumberType number_type = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setNumberType($var)
    {
        GPBUtil::checkEnum($var, \Livekit\PhoneNumberType::class);
        $this->number_type = $var;

        return $this;
    }

    /**
     * City/locality (e.g., "San Francisco")
     *
     * Generated from protobuf field <code>string locality = 6;</code>
     * @return string
     */
    public function getLocality()
    {
        return $this->locality;
    }

    /**
     * City/locality (e.g., "San Francisco")
     *
     * Generated from protobuf field <code>string locality = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setLocality($var)
    {
        GPBUtil::checkString($var, True);
        $this->locality = $var;

        return $this;
    }

    /**
     * State/region (e.g., "CA")
     *
     * Generated from protobuf field <code>string region = 7;</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * State/region (e.g., "CA")
     *
     * Generated from protobuf field <code>string region = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->region = $var;

        return $this;
    }

    /**
     * Spam score for fraud detection
     *
     * Generated from protobuf field <code>double spam_score = 8;</code>
     * @return float
     */
    public function getSpamScore()
    {
        return $this->spam_score;
    }

    /**
     * Spam score for fraud detection
     *
     * Generated from protobuf field <code>double spam_score = 8;</code>
     * @param float $var
     * @return $this
     */
    public function setSpamScore($var)
    {
        GPBUtil::checkDouble($var);
        $this->spam_score = $var;

        return $this;
    }

    /**
     * Creation timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 9;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function hasCreatedAt()
    {
        return isset($this->created_at);
    }

    public function clearCreatedAt()
    {
        unset($this->created_at);
    }

    /**
     * Creation timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 9;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Last update timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp updated_at = 10;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    public function hasUpdatedAt()
    {
        return isset($this->updated_at);
    }

    public function clearUpdatedAt()
    {
        unset($this->updated_at);
    }

    /**
     * Last update timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp updated_at = 10;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdatedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->updated_at = $var;

        return $this;
    }

    /**
     * Available capabilities (e.g., "voice", "sms")
     *
     * Generated from protobuf field <code>repeated string capabilities = 11;</code>
     * @return RepeatedField<string>
     */
    public function getCapabilities()
    {
        return $this->capabilities;
    }

    /**
     * Available capabilities (e.g., "voice", "sms")
     *
     * Generated from protobuf field <code>repeated string capabilities = 11;</code>
     * @param string[] $var
     * @return $this
     */
    public function setCapabilities($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->capabilities = $arr;

        return $this;
    }

    /**
     * Current status
     *
     * Generated from protobuf field <code>.livekit.PhoneNumberStatus status = 12;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Current status
     *
     * Generated from protobuf field <code>.livekit.PhoneNumberStatus status = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Livekit\PhoneNumberStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Assignment timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp assigned_at = 13;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getAssignedAt()
    {
        return $this->assigned_at;
    }

    public function hasAssignedAt()
    {
        return isset($this->assigned_at);
    }

    public function clearAssignedAt()
    {
        unset($this->assigned_at);
    }

    /**
     * Assignment timestamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp assigned_at = 13;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setAssignedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->assigned_at = $var;

        return $this;
    }

    /**
     * Release timestamp (if applicable)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp released_at = 14;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getReleasedAt()
    {
        return $this->released_at;
    }

    public function hasReleasedAt()
    {
        return isset($this->released_at);
    }

    public function clearReleasedAt()
    {
        unset($this->released_at);
    }

    /**
     * Release timestamp (if applicable)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp released_at = 14;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setReleasedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->released_at = $var;

        return $this;
    }

    /**
     * Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
     *
     * Generated from protobuf field <code>string sip_dispatch_rule_id = 15 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getSipDispatchRuleId()
    {
        if ($this->sip_dispatch_rule_id !== '') {
            @trigger_error('sip_dispatch_rule_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->sip_dispatch_rule_id;
    }

    /**
     * Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
     *
     * Generated from protobuf field <code>string sip_dispatch_rule_id = 15 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setSipDispatchRuleId($var)
    {
        @trigger_error('sip_dispatch_rule_id is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->sip_dispatch_rule_id = $var;

        return $this;
    }

    /**
     * Associated SIP dispatch rule IDs
     *
     * Generated from protobuf field <code>repeated string sip_dispatch_rule_ids = 16;</code>
     * @return RepeatedField<string>
     */
    public function getSipDispatchRuleIds()
    {
        return $this->sip_dispatch_rule_ids;
    }

    /**
     * Associated SIP dispatch rule IDs
     *
     * Generated from protobuf field <code>repeated string sip_dispatch_rule_ids = 16;</code>
     * @param string[] $var
     * @return $this
     */
    public function setSipDispatchRuleIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->sip_dispatch_rule_ids = $arr;

        return $this;
    }

}

