<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_sip.proto

namespace Livekit;

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

/**
 * 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;</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;</code>
     */
    protected $inbound_username = '';
    /**
     * Generated from protobuf field <code>string inbound_password = 7;</code>
     */
    protected $inbound_password = '';
    /**
     * Generated from protobuf field <code>string outbound_username = 8;</code>
     */
    protected $outbound_username = '';
    /**
     * Generated from protobuf field <code>string outbound_password = 9;</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;</code>
     */
    protected $metadata = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sip_trunk_id
     *     @type int $kind
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $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[]|\Google\Protobuf\Internal\RepeatedField $inbound_numbers_regex
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $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;</code>
     * @return string
     */
    public function getSipTrunkId()
    {
        return $this->sip_trunk_id;
    }

    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1;</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 \Google\Protobuf\Internal\RepeatedField
     */
    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[]|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField
     * @deprecated
     */
    public function getInboundNumbersRegex()
    {
        @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[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     * @deprecated
     */
    public function setInboundNumbersRegex($var)
    {
        @trigger_error('inbound_numbers_regex is deprecated.', E_USER_DEPRECATED);
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $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 \Google\Protobuf\Internal\RepeatedField
     */
    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[]|\Google\Protobuf\Internal\RepeatedField $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;</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;</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;</code>
     * @return string
     */
    public function getInboundPassword()
    {
        return $this->inbound_password;
    }

    /**
     * Generated from protobuf field <code>string inbound_password = 7;</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;</code>
     * @return string
     */
    public function getOutboundUsername()
    {
        return $this->outbound_username;
    }

    /**
     * Generated from protobuf field <code>string outbound_username = 8;</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;</code>
     * @return string
     */
    public function getOutboundPassword()
    {
        return $this->outbound_password;
    }

    /**
     * Generated from protobuf field <code>string outbound_password = 9;</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;</code>
     * @return string
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    /**
     * User-defined metadata for the Trunk.
     *
     * Generated from protobuf field <code>string metadata = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkString($var, True);
        $this->metadata = $var;

        return $this;
    }

}

