<?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.SIPInboundTrunkUpdate</code>
 */
class SIPInboundTrunkUpdate extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.livekit.ListUpdate numbers = 1;</code>
     */
    protected $numbers = null;
    /**
     * Generated from protobuf field <code>.livekit.ListUpdate allowed_addresses = 2;</code>
     */
    protected $allowed_addresses = null;
    /**
     * Generated from protobuf field <code>.livekit.ListUpdate allowed_numbers = 3;</code>
     */
    protected $allowed_numbers = null;
    /**
     * Generated from protobuf field <code>optional string auth_username = 4 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $auth_username = null;
    /**
     * Generated from protobuf field <code>optional string auth_password = 5 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $auth_password = null;
    /**
     * Generated from protobuf field <code>optional string name = 6;</code>
     */
    protected $name = null;
    /**
     * Generated from protobuf field <code>optional string metadata = 7 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $metadata = null;
    /**
     * Generated from protobuf field <code>optional .livekit.SIPMediaEncryption media_encryption = 8;</code>
     */
    protected $media_encryption = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\ListUpdate $numbers
     *     @type \Livekit\ListUpdate $allowed_addresses
     *     @type \Livekit\ListUpdate $allowed_numbers
     *     @type string $auth_username
     *     @type string $auth_password
     *     @type string $name
     *     @type string $metadata
     *     @type int $media_encryption
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.livekit.ListUpdate numbers = 1;</code>
     * @return \Livekit\ListUpdate|null
     */
    public function getNumbers()
    {
        return $this->numbers;
    }

    public function hasNumbers()
    {
        return isset($this->numbers);
    }

    public function clearNumbers()
    {
        unset($this->numbers);
    }

    /**
     * Generated from protobuf field <code>.livekit.ListUpdate numbers = 1;</code>
     * @param \Livekit\ListUpdate $var
     * @return $this
     */
    public function setNumbers($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ListUpdate::class);
        $this->numbers = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ListUpdate allowed_addresses = 2;</code>
     * @return \Livekit\ListUpdate|null
     */
    public function getAllowedAddresses()
    {
        return $this->allowed_addresses;
    }

    public function hasAllowedAddresses()
    {
        return isset($this->allowed_addresses);
    }

    public function clearAllowedAddresses()
    {
        unset($this->allowed_addresses);
    }

    /**
     * Generated from protobuf field <code>.livekit.ListUpdate allowed_addresses = 2;</code>
     * @param \Livekit\ListUpdate $var
     * @return $this
     */
    public function setAllowedAddresses($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ListUpdate::class);
        $this->allowed_addresses = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ListUpdate allowed_numbers = 3;</code>
     * @return \Livekit\ListUpdate|null
     */
    public function getAllowedNumbers()
    {
        return $this->allowed_numbers;
    }

    public function hasAllowedNumbers()
    {
        return isset($this->allowed_numbers);
    }

    public function clearAllowedNumbers()
    {
        unset($this->allowed_numbers);
    }

    /**
     * Generated from protobuf field <code>.livekit.ListUpdate allowed_numbers = 3;</code>
     * @param \Livekit\ListUpdate $var
     * @return $this
     */
    public function setAllowedNumbers($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ListUpdate::class);
        $this->allowed_numbers = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string auth_username = 4 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getAuthUsername()
    {
        return isset($this->auth_username) ? $this->auth_username : '';
    }

    public function hasAuthUsername()
    {
        return isset($this->auth_username);
    }

    public function clearAuthUsername()
    {
        unset($this->auth_username);
    }

    /**
     * Generated from protobuf field <code>optional string auth_username = 4 [(.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>optional string auth_password = 5 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getAuthPassword()
    {
        return isset($this->auth_password) ? $this->auth_password : '';
    }

    public function hasAuthPassword()
    {
        return isset($this->auth_password);
    }

    public function clearAuthPassword()
    {
        unset($this->auth_password);
    }

    /**
     * Generated from protobuf field <code>optional string auth_password = 5 [(.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;
    }

    /**
     * Generated from protobuf field <code>optional string name = 6;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * Generated from protobuf field <code>optional string name = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string metadata = 7 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getMetadata()
    {
        return isset($this->metadata) ? $this->metadata : '';
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

    /**
     * Generated from protobuf field <code>optional string metadata = 7 [(.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;
    }

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

    public function hasMediaEncryption()
    {
        return isset($this->media_encryption);
    }

    public function clearMediaEncryption()
    {
        unset($this->media_encryption);
    }

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

        return $this;
    }

}

