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

namespace Livekit;

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

/**
 * @deprecated
 * Generated from protobuf message <code>livekit.SIPTrunkInfo</code>
 */
class SIPTrunkInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1 [(.logger.name) = "sipTrunkID"];</code>
     */
    protected $sip_trunk_id = '';
    /**
     * Generated from protobuf field <code>.livekit.SIPTrunkInfo.TrunkKind kind = 14;</code>
     */
    protected $kind = 0;
    /**
     * CIDR or IPs that traffic is accepted from
     * An empty list means all inbound traffic is accepted.
     *
     * Generated from protobuf field <code>repeated string inbound_addresses = 2;</code>
     */
    private $inbound_addresses;
    /**
     * IP that SIP INVITE is sent too
     *
     * Generated from protobuf field <code>string outbound_address = 3;</code>
     */
    protected $outbound_address = '';
    /**
     * Number used to make outbound calls
     *
     * Generated from protobuf field <code>string outbound_number = 4;</code>
     */
    protected $outbound_number = '';
    /**
     * Transport used for inbound and outbound calls.
     *
     * Generated from protobuf field <code>.livekit.SIPTransport transport = 13;</code>
     */
    protected $transport = 0;
    /**
     * Generated from protobuf field <code>repeated string inbound_numbers_regex = 5 [deprecated = true];</code>
     * @deprecated
     */
    private $inbound_numbers_regex;
    /**
     * Accepted `To` values. This Trunk will only accept a call made to
     * these numbers. This allows you to have distinct Trunks for different phone
     * numbers at the same provider.
     *
     * Generated from protobuf field <code>repeated string inbound_numbers = 10;</code>
     */
    private $inbound_numbers;
    /**
     * Username and password used to authenticate inbound and outbound SIP invites
     * May be empty to have no Authentication
     *
     * Generated from protobuf field <code>string inbound_username = 6 [(.logger.sensitivity) = SENSITIVITY_PII];</code>
     */
    protected $inbound_username = '';
    /**
     * Generated from protobuf field <code>string inbound_password = 7 [(.logger.sensitivity) = SENSITIVITY_SECRET];</code>
     */
    protected $inbound_password = '';
    /**
     * Generated from protobuf field <code>string outbound_username = 8 [(.logger.sensitivity) = SENSITIVITY_PII];</code>
     */
    protected $outbound_username = '';
    /**
     * Generated from protobuf field <code>string outbound_password = 9 [(.logger.sensitivity) = SENSITIVITY_SECRET];</code>
     */
    protected $outbound_password = '';
    /**
     * Human-readable name for the Trunk.
     *
     * Generated from protobuf field <code>string name = 11;</code>
     */
    protected $name = '';
    /**
     * User-defined metadata for the Trunk.
     *
     * Generated from protobuf field <code>string metadata = 12 [(.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     */
    protected $metadata = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sip_trunk_id
     *     @type int $kind
     *     @type string[] $inbound_addresses
     *           CIDR or IPs that traffic is accepted from
     *           An empty list means all inbound traffic is accepted.
     *     @type string $outbound_address
     *           IP that SIP INVITE is sent too
     *     @type string $outbound_number
     *           Number used to make outbound calls
     *     @type int $transport
     *           Transport used for inbound and outbound calls.
     *     @type string[] $inbound_numbers_regex
     *     @type string[] $inbound_numbers
     *           Accepted `To` values. This Trunk will only accept a call made to
     *           these numbers. This allows you to have distinct Trunks for different phone
     *           numbers at the same provider.
     *     @type string $inbound_username
     *           Username and password used to authenticate inbound and outbound SIP invites
     *           May be empty to have no Authentication
     *     @type string $inbound_password
     *     @type string $outbound_username
     *     @type string $outbound_password
     *     @type string $name
     *           Human-readable name for the Trunk.
     *     @type string $metadata
     *           User-defined metadata for the Trunk.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1 [(.logger.name) = "sipTrunkID"];</code>
     * @return string
     */
    public function getSipTrunkId()
    {
        return $this->sip_trunk_id;
    }

    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1 [(.logger.name) = "sipTrunkID"];</code>
     * @param string $var
     * @return $this
     */
    public function setSipTrunkId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_trunk_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPTrunkInfo.TrunkKind kind = 14;</code>
     * @return int
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPTrunkInfo.TrunkKind kind = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkEnum($var, \Livekit\SIPTrunkInfo\TrunkKind::class);
        $this->kind = $var;

        return $this;
    }

    /**
     * CIDR or IPs that traffic is accepted from
     * An empty list means all inbound traffic is accepted.
     *
     * Generated from protobuf field <code>repeated string inbound_addresses = 2;</code>
     * @return RepeatedField<string>
     */
    public function getInboundAddresses()
    {
        return $this->inbound_addresses;
    }

    /**
     * CIDR or IPs that traffic is accepted from
     * An empty list means all inbound traffic is accepted.
     *
     * Generated from protobuf field <code>repeated string inbound_addresses = 2;</code>
     * @param string[] $var
     * @return $this
     */
    public function setInboundAddresses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->inbound_addresses = $arr;

        return $this;
    }

    /**
     * IP that SIP INVITE is sent too
     *
     * Generated from protobuf field <code>string outbound_address = 3;</code>
     * @return string
     */
    public function getOutboundAddress()
    {
        return $this->outbound_address;
    }

    /**
     * IP that SIP INVITE is sent too
     *
     * Generated from protobuf field <code>string outbound_address = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setOutboundAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->outbound_address = $var;

        return $this;
    }

    /**
     * Number used to make outbound calls
     *
     * Generated from protobuf field <code>string outbound_number = 4;</code>
     * @return string
     */
    public function getOutboundNumber()
    {
        return $this->outbound_number;
    }

    /**
     * Number used to make outbound calls
     *
     * Generated from protobuf field <code>string outbound_number = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setOutboundNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->outbound_number = $var;

        return $this;
    }

    /**
     * Transport used for inbound and outbound calls.
     *
     * Generated from protobuf field <code>.livekit.SIPTransport transport = 13;</code>
     * @return int
     */
    public function getTransport()
    {
        return $this->transport;
    }

    /**
     * Transport used for inbound and outbound calls.
     *
     * Generated from protobuf field <code>.livekit.SIPTransport transport = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setTransport($var)
    {
        GPBUtil::checkEnum($var, \Livekit\SIPTransport::class);
        $this->transport = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated string inbound_numbers_regex = 5 [deprecated = true];</code>
     * @return RepeatedField<string>
     * @deprecated
     */
    public function getInboundNumbersRegex()
    {
        if (count($this->inbound_numbers_regex) !== 0) {
            @trigger_error('inbound_numbers_regex is deprecated.', E_USER_DEPRECATED);
        }
        return $this->inbound_numbers_regex;
    }

    /**
     * Generated from protobuf field <code>repeated string inbound_numbers_regex = 5 [deprecated = true];</code>
     * @param string[] $var
     * @return $this
     * @deprecated
     */
    public function setInboundNumbersRegex($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        if (count($arr) !== 0) {
            @trigger_error('inbound_numbers_regex is deprecated.', E_USER_DEPRECATED);
        }
        $this->inbound_numbers_regex = $arr;

        return $this;
    }

    /**
     * Accepted `To` values. This Trunk will only accept a call made to
     * these numbers. This allows you to have distinct Trunks for different phone
     * numbers at the same provider.
     *
     * Generated from protobuf field <code>repeated string inbound_numbers = 10;</code>
     * @return RepeatedField<string>
     */
    public function getInboundNumbers()
    {
        return $this->inbound_numbers;
    }

    /**
     * Accepted `To` values. This Trunk will only accept a call made to
     * these numbers. This allows you to have distinct Trunks for different phone
     * numbers at the same provider.
     *
     * Generated from protobuf field <code>repeated string inbound_numbers = 10;</code>
     * @param string[] $var
     * @return $this
     */
    public function setInboundNumbers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->inbound_numbers = $arr;

        return $this;
    }

    /**
     * Username and password used to authenticate inbound and outbound SIP invites
     * May be empty to have no Authentication
     *
     * Generated from protobuf field <code>string inbound_username = 6 [(.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @return string
     */
    public function getInboundUsername()
    {
        return $this->inbound_username;
    }

    /**
     * Username and password used to authenticate inbound and outbound SIP invites
     * May be empty to have no Authentication
     *
     * Generated from protobuf field <code>string inbound_username = 6 [(.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @param string $var
     * @return $this
     */
    public function setInboundUsername($var)
    {
        GPBUtil::checkString($var, True);
        $this->inbound_username = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string inbound_password = 7 [(.logger.sensitivity) = SENSITIVITY_SECRET];</code>
     * @return string
     */
    public function getInboundPassword()
    {
        return $this->inbound_password;
    }

    /**
     * Generated from protobuf field <code>string inbound_password = 7 [(.logger.sensitivity) = SENSITIVITY_SECRET];</code>
     * @param string $var
     * @return $this
     */
    public function setInboundPassword($var)
    {
        GPBUtil::checkString($var, True);
        $this->inbound_password = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string outbound_username = 8 [(.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @return string
     */
    public function getOutboundUsername()
    {
        return $this->outbound_username;
    }

    /**
     * Generated from protobuf field <code>string outbound_username = 8 [(.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @param string $var
     * @return $this
     */
    public function setOutboundUsername($var)
    {
        GPBUtil::checkString($var, True);
        $this->outbound_username = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string outbound_password = 9 [(.logger.sensitivity) = SENSITIVITY_SECRET];</code>
     * @return string
     */
    public function getOutboundPassword()
    {
        return $this->outbound_password;
    }

    /**
     * Generated from protobuf field <code>string outbound_password = 9 [(.logger.sensitivity) = SENSITIVITY_SECRET];</code>
     * @param string $var
     * @return $this
     */
    public function setOutboundPassword($var)
    {
        GPBUtil::checkString($var, True);
        $this->outbound_password = $var;

        return $this;
    }

    /**
     * Human-readable name for the Trunk.
     *
     * Generated from protobuf field <code>string name = 11;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Human-readable name for the Trunk.
     *
     * Generated from protobuf field <code>string name = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * User-defined metadata for the Trunk.
     *
     * Generated from protobuf field <code>string metadata = 12 [(.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @return string
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    /**
     * User-defined metadata for the Trunk.
     *
     * Generated from protobuf field <code>string metadata = 12 [(.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @param string $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkString($var, True);
        $this->metadata = $var;

        return $this;
    }

}

