<?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.SIPOutboundConfig</code>
 */
class SIPOutboundConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * SIP server address
     *
     * Generated from protobuf field <code>string hostname = 1;</code>
     */
    protected $hostname = '';
    /**
     * 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 = 7;</code>
     */
    protected $destination_country = '';
    /**
     * SIP Transport used for outbound call.
     *
     * Generated from protobuf field <code>.livekit.SIPTransport transport = 2;</code>
     */
    protected $transport = 0;
    /**
     * Username and password used to authenticate with SIP server.
     * May be empty to have no authentication.
     *
     * Generated from protobuf field <code>string auth_username = 3 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $auth_username = '';
    /**
     * Generated from protobuf field <code>string auth_password = 4 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $auth_password = '';
    /**
     * 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 = 5;</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 = 6;</code>
     */
    private $attributes_to_headers;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $hostname
     *           SIP server address
     *     @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 $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_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.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * SIP server address
     *
     * Generated from protobuf field <code>string hostname = 1;</code>
     * @return string
     */
    public function getHostname()
    {
        return $this->hostname;
    }

    /**
     * SIP server address
     *
     * Generated from protobuf field <code>string hostname = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setHostname($var)
    {
        GPBUtil::checkString($var, True);
        $this->hostname = $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 = 7;</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 = 7;</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 = 2;</code>
     * @return int
     */
    public function getTransport()
    {
        return $this->transport;
    }

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

        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 = 3 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</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 = 3 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</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 = 4 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getAuthPassword()
    {
        return $this->auth_password;
    }

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

        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 = 5;</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 = 5;</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 = 6;</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 = 6;</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;
    }

}

