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

/**
 * Generated from protobuf message <code>livekit.SIPOutboundTrunkInfo</code>
 */
class SIPOutboundTrunkInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1 [(.logger.name) = "sipTrunkID"];</code>
     */
    protected $sip_trunk_id = '';
    /**
     * Human-readable name for the Trunk.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     */
    protected $name = '';
    /**
     * User-defined metadata for the Trunk.
     *
     * Generated from protobuf field <code>string metadata = 3 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $metadata = '';
    /**
     * Hostname or IP that SIP INVITE is sent too.
     * Note that this is not a SIP URI and should not contain the 'sip:' protocol prefix.
     *
     * Generated from protobuf field <code>string address = 4;</code>
     */
    protected $address = '';
    /**
     * country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *
     * Generated from protobuf field <code>string destination_country = 14;</code>
     */
    protected $destination_country = '';
    /**
     * SIP Transport used for outbound call.
     *
     * Generated from protobuf field <code>.livekit.SIPTransport transport = 5;</code>
     */
    protected $transport = 0;
    /**
     * Numbers used to make the calls. Random one from this list will be selected.
     *
     * Generated from protobuf field <code>repeated string numbers = 6;</code>
     */
    private $numbers;
    /**
     * Username and password used to authenticate with SIP server.
     * May be empty to have no authentication.
     *
     * Generated from protobuf field <code>string auth_username = 7 [(.logger.redact) = true];</code>
     */
    protected $auth_username = '';
    /**
     * Generated from protobuf field <code>string auth_password = 8 [(.logger.redact) = true];</code>
     */
    protected $auth_password = '';
    /**
     * Include these SIP X-* headers in INVITE request.
     * These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint.
     *
     * Generated from protobuf field <code>map<string, string> headers = 9 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    private $headers;
    /**
     * Map SIP X-* headers from 200 OK to SIP participant attributes.
     * Keys are the names of X-* headers and values are the names of attributes they will be mapped to.
     *
     * Generated from protobuf field <code>map<string, string> headers_to_attributes = 10;</code>
     */
    private $headers_to_attributes;
    /**
     * Map LiveKit attributes to SIP X-* headers when sending BYE or REFER requests.
     * Keys are the names of attributes and values are the names of X-* headers they will be mapped to.
     *
     * Generated from protobuf field <code>map<string, string> attributes_to_headers = 11;</code>
     */
    private $attributes_to_headers;
    /**
     * Map SIP headers from 200 OK to sip.h.* participant attributes automatically.
     * When the names of required headers is known, using headers_to_attributes is strongly recommended.
     * When mapping 200 OK headers to follow-up request headers with attributes_to_headers map,
     * lowercase header names should be used, for example: sip.h.x-custom-header.
     *
     * Generated from protobuf field <code>.livekit.SIPHeaderOptions include_headers = 12;</code>
     */
    protected $include_headers = 0;
    /**
     * Generated from protobuf field <code>.livekit.SIPMediaEncryption media_encryption = 13;</code>
     */
    protected $media_encryption = 0;
    /**
     * Optional custom hostname for the 'From' SIP header in outbound INVITEs.
     * When set, outbound calls from this trunk will use this host instead of the default project SIP domain.
     * Enables originating calls from custom domains.
     *
     * Generated from protobuf field <code>string from_host = 15;</code>
     */
    protected $from_host = '';
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 16;</code>
     */
    protected $created_at = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp updated_at = 17;</code>
     */
    protected $updated_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sip_trunk_id
     *     @type string $name
     *           Human-readable name for the Trunk.
     *     @type string $metadata
     *           User-defined metadata for the Trunk.
     *     @type string $address
     *           Hostname or IP that SIP INVITE is sent too.
     *           Note that this is not a SIP URI and should not contain the 'sip:' protocol prefix.
     *     @type string $destination_country
     *           country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *     @type int $transport
     *           SIP Transport used for outbound call.
     *     @type string[] $numbers
     *           Numbers used to make the calls. Random one from this list will be selected.
     *     @type string $auth_username
     *           Username and password used to authenticate with SIP server.
     *           May be empty to have no authentication.
     *     @type string $auth_password
     *     @type array|\Google\Protobuf\Internal\MapField $headers
     *           Include these SIP X-* headers in INVITE request.
     *           These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint.
     *     @type array|\Google\Protobuf\Internal\MapField $headers_to_attributes
     *           Map SIP X-* headers from 200 OK to SIP participant attributes.
     *           Keys are the names of X-* headers and values are the names of attributes they will be mapped to.
     *     @type array|\Google\Protobuf\Internal\MapField $attributes_to_headers
     *           Map LiveKit attributes to SIP X-* headers when sending BYE or REFER requests.
     *           Keys are the names of attributes and values are the names of X-* headers they will be mapped to.
     *     @type int $include_headers
     *           Map SIP headers from 200 OK to sip.h.* participant attributes automatically.
     *           When the names of required headers is known, using headers_to_attributes is strongly recommended.
     *           When mapping 200 OK headers to follow-up request headers with attributes_to_headers map,
     *           lowercase header names should be used, for example: sip.h.x-custom-header.
     *     @type int $media_encryption
     *     @type string $from_host
     *           Optional custom hostname for the 'From' SIP header in outbound INVITEs.
     *           When set, outbound calls from this trunk will use this host instead of the default project SIP domain.
     *           Enables originating calls from custom domains.
     *     @type \Google\Protobuf\Timestamp $created_at
     *     @type \Google\Protobuf\Timestamp $updated_at
     * }
     */
    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;
    }

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

    /**
     * Human-readable name for the Trunk.
     *
     * Generated from protobuf field <code>string name = 2;</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 = 3 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

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

        return $this;
    }

    /**
     * Hostname or IP that SIP INVITE is sent too.
     * Note that this is not a SIP URI and should not contain the 'sip:' protocol prefix.
     *
     * Generated from protobuf field <code>string address = 4;</code>
     * @return string
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Hostname or IP that SIP INVITE is sent too.
     * Note that this is not a SIP URI and should not contain the 'sip:' protocol prefix.
     *
     * Generated from protobuf field <code>string address = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->address = $var;

        return $this;
    }

    /**
     * country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *
     * Generated from protobuf field <code>string destination_country = 14;</code>
     * @return string
     */
    public function getDestinationCountry()
    {
        return $this->destination_country;
    }

    /**
     * country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *
     * Generated from protobuf field <code>string destination_country = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setDestinationCountry($var)
    {
        GPBUtil::checkString($var, True);
        $this->destination_country = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Numbers used to make the calls. Random one from this list will be selected.
     *
     * Generated from protobuf field <code>repeated string numbers = 6;</code>
     * @return RepeatedField<string>
     */
    public function getNumbers()
    {
        return $this->numbers;
    }

    /**
     * Numbers used to make the calls. Random one from this list will be selected.
     *
     * Generated from protobuf field <code>repeated string numbers = 6;</code>
     * @param string[] $var
     * @return $this
     */
    public function setNumbers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->numbers = $arr;

        return $this;
    }

    /**
     * Username and password used to authenticate with SIP server.
     * May be empty to have no authentication.
     *
     * Generated from protobuf field <code>string auth_username = 7 [(.logger.redact) = true];</code>
     * @return string
     */
    public function getAuthUsername()
    {
        return $this->auth_username;
    }

    /**
     * Username and password used to authenticate with SIP server.
     * May be empty to have no authentication.
     *
     * Generated from protobuf field <code>string auth_username = 7 [(.logger.redact) = true];</code>
     * @param string $var
     * @return $this
     */
    public function setAuthUsername($var)
    {
        GPBUtil::checkString($var, True);
        $this->auth_username = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string auth_password = 8 [(.logger.redact) = true];</code>
     * @return string
     */
    public function getAuthPassword()
    {
        return $this->auth_password;
    }

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

        return $this;
    }

    /**
     * Include these SIP X-* headers in INVITE request.
     * These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint.
     *
     * Generated from protobuf field <code>map<string, string> headers = 9 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getHeaders()
    {
        return $this->headers;
    }

    /**
     * Include these SIP X-* headers in INVITE request.
     * These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint.
     *
     * Generated from protobuf field <code>map<string, string> headers = 9 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setHeaders($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->headers = $arr;

        return $this;
    }

    /**
     * Map SIP X-* headers from 200 OK to SIP participant attributes.
     * Keys are the names of X-* headers and values are the names of attributes they will be mapped to.
     *
     * Generated from protobuf field <code>map<string, string> headers_to_attributes = 10;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getHeadersToAttributes()
    {
        return $this->headers_to_attributes;
    }

    /**
     * Map SIP X-* headers from 200 OK to SIP participant attributes.
     * Keys are the names of X-* headers and values are the names of attributes they will be mapped to.
     *
     * Generated from protobuf field <code>map<string, string> headers_to_attributes = 10;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setHeadersToAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->headers_to_attributes = $arr;

        return $this;
    }

    /**
     * Map LiveKit attributes to SIP X-* headers when sending BYE or REFER requests.
     * Keys are the names of attributes and values are the names of X-* headers they will be mapped to.
     *
     * Generated from protobuf field <code>map<string, string> attributes_to_headers = 11;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAttributesToHeaders()
    {
        return $this->attributes_to_headers;
    }

    /**
     * Map LiveKit attributes to SIP X-* headers when sending BYE or REFER requests.
     * Keys are the names of attributes and values are the names of X-* headers they will be mapped to.
     *
     * Generated from protobuf field <code>map<string, string> attributes_to_headers = 11;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAttributesToHeaders($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->attributes_to_headers = $arr;

        return $this;
    }

    /**
     * Map SIP headers from 200 OK to sip.h.* participant attributes automatically.
     * When the names of required headers is known, using headers_to_attributes is strongly recommended.
     * When mapping 200 OK headers to follow-up request headers with attributes_to_headers map,
     * lowercase header names should be used, for example: sip.h.x-custom-header.
     *
     * Generated from protobuf field <code>.livekit.SIPHeaderOptions include_headers = 12;</code>
     * @return int
     */
    public function getIncludeHeaders()
    {
        return $this->include_headers;
    }

    /**
     * Map SIP headers from 200 OK to sip.h.* participant attributes automatically.
     * When the names of required headers is known, using headers_to_attributes is strongly recommended.
     * When mapping 200 OK headers to follow-up request headers with attributes_to_headers map,
     * lowercase header names should be used, for example: sip.h.x-custom-header.
     *
     * Generated from protobuf field <code>.livekit.SIPHeaderOptions include_headers = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setIncludeHeaders($var)
    {
        GPBUtil::checkEnum($var, \Livekit\SIPHeaderOptions::class);
        $this->include_headers = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPMediaEncryption media_encryption = 13;</code>
     * @return int
     */
    public function getMediaEncryption()
    {
        return $this->media_encryption;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPMediaEncryption media_encryption = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setMediaEncryption($var)
    {
        GPBUtil::checkEnum($var, \Livekit\SIPMediaEncryption::class);
        $this->media_encryption = $var;

        return $this;
    }

    /**
     * Optional custom hostname for the 'From' SIP header in outbound INVITEs.
     * When set, outbound calls from this trunk will use this host instead of the default project SIP domain.
     * Enables originating calls from custom domains.
     *
     * Generated from protobuf field <code>string from_host = 15;</code>
     * @return string
     */
    public function getFromHost()
    {
        return $this->from_host;
    }

    /**
     * Optional custom hostname for the 'From' SIP header in outbound INVITEs.
     * When set, outbound calls from this trunk will use this host instead of the default project SIP domain.
     * Enables originating calls from custom domains.
     *
     * Generated from protobuf field <code>string from_host = 15;</code>
     * @param string $var
     * @return $this
     */
    public function setFromHost($var)
    {
        GPBUtil::checkString($var, True);
        $this->from_host = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 16;</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);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 16;</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;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp updated_at = 17;</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);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp updated_at = 17;</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;
    }

}

