<?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.CreateSIPDispatchRuleRequest</code>
 */
class CreateSIPDispatchRuleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Rule ID is ignored
     *
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleInfo dispatch_rule = 10;</code>
     */
    protected $dispatch_rule = null;
    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRule rule = 1 [deprecated = true];</code>
     * @deprecated
     */
    protected $rule = null;
    /**
     * What trunks are accepted for this dispatch rule
     * If empty all trunks will match this dispatch rule
     *
     * Generated from protobuf field <code>repeated string trunk_ids = 2 [deprecated = true];</code>
     * @deprecated
     */
    private $trunk_ids;
    /**
     * By default the From value (Phone number) is used for participant name/identity and added to attributes.
     * If true, a random value for identity will be used and numbers will be omitted from attributes.
     *
     * Generated from protobuf field <code>bool hide_phone_number = 3 [deprecated = true];</code>
     * @deprecated
     */
    protected $hide_phone_number = false;
    /**
     * Dispatch Rule will only accept a call made to these numbers (if set).
     *
     * Generated from protobuf field <code>repeated string inbound_numbers = 6 [deprecated = true];</code>
     * @deprecated
     */
    private $inbound_numbers;
    /**
     * Optional human-readable name for the Dispatch Rule.
     *
     * Generated from protobuf field <code>string name = 4 [deprecated = true];</code>
     * @deprecated
     */
    protected $name = '';
    /**
     * User-defined metadata for the Dispatch Rule.
     * Participants created by this rule will inherit this metadata.
     *
     * Generated from protobuf field <code>string metadata = 5 [deprecated = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @deprecated
     */
    protected $metadata = '';
    /**
     * User-defined attributes for the Dispatch Rule.
     * Participants created by this rule will inherit these attributes.
     *
     * Generated from protobuf field <code>map<string, string> attributes = 7 [deprecated = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @deprecated
     */
    private $attributes;
    /**
     * Cloud-only, config preset to use
     *
     * Generated from protobuf field <code>string room_preset = 8 [deprecated = true];</code>
     * @deprecated
     */
    protected $room_preset = '';
    /**
     * RoomConfiguration to use if the participant initiates the room
     *
     * Generated from protobuf field <code>.livekit.RoomConfiguration room_config = 9 [deprecated = true];</code>
     * @deprecated
     */
    protected $room_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\SIPDispatchRuleInfo $dispatch_rule
     *           Rule ID is ignored
     *     @type \Livekit\SIPDispatchRule $rule
     *     @type string[] $trunk_ids
     *           What trunks are accepted for this dispatch rule
     *           If empty all trunks will match this dispatch rule
     *     @type bool $hide_phone_number
     *           By default the From value (Phone number) is used for participant name/identity and added to attributes.
     *           If true, a random value for identity will be used and numbers will be omitted from attributes.
     *     @type string[] $inbound_numbers
     *           Dispatch Rule will only accept a call made to these numbers (if set).
     *     @type string $name
     *           Optional human-readable name for the Dispatch Rule.
     *     @type string $metadata
     *           User-defined metadata for the Dispatch Rule.
     *           Participants created by this rule will inherit this metadata.
     *     @type array|\Google\Protobuf\Internal\MapField $attributes
     *           User-defined attributes for the Dispatch Rule.
     *           Participants created by this rule will inherit these attributes.
     *     @type string $room_preset
     *           Cloud-only, config preset to use
     *     @type \Livekit\RoomConfiguration $room_config
     *           RoomConfiguration to use if the participant initiates the room
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * Rule ID is ignored
     *
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleInfo dispatch_rule = 10;</code>
     * @return \Livekit\SIPDispatchRuleInfo|null
     */
    public function getDispatchRule()
    {
        return $this->dispatch_rule;
    }

    public function hasDispatchRule()
    {
        return isset($this->dispatch_rule);
    }

    public function clearDispatchRule()
    {
        unset($this->dispatch_rule);
    }

    /**
     * Rule ID is ignored
     *
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleInfo dispatch_rule = 10;</code>
     * @param \Livekit\SIPDispatchRuleInfo $var
     * @return $this
     */
    public function setDispatchRule($var)
    {
        GPBUtil::checkMessage($var, \Livekit\SIPDispatchRuleInfo::class);
        $this->dispatch_rule = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRule rule = 1 [deprecated = true];</code>
     * @return \Livekit\SIPDispatchRule|null
     * @deprecated
     */
    public function getRule()
    {
        if (isset($this->rule)) {
            @trigger_error('rule is deprecated.', E_USER_DEPRECATED);
        }
        return $this->rule;
    }

    public function hasRule()
    {
        if (isset($this->rule)) {
            @trigger_error('rule is deprecated.', E_USER_DEPRECATED);
        }
        return isset($this->rule);
    }

    public function clearRule()
    {
        @trigger_error('rule is deprecated.', E_USER_DEPRECATED);
        unset($this->rule);
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRule rule = 1 [deprecated = true];</code>
     * @param \Livekit\SIPDispatchRule $var
     * @return $this
     * @deprecated
     */
    public function setRule($var)
    {
        @trigger_error('rule is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Livekit\SIPDispatchRule::class);
        $this->rule = $var;

        return $this;
    }

    /**
     * What trunks are accepted for this dispatch rule
     * If empty all trunks will match this dispatch rule
     *
     * Generated from protobuf field <code>repeated string trunk_ids = 2 [deprecated = true];</code>
     * @return RepeatedField<string>
     * @deprecated
     */
    public function getTrunkIds()
    {
        if (count($this->trunk_ids) !== 0) {
            @trigger_error('trunk_ids is deprecated.', E_USER_DEPRECATED);
        }
        return $this->trunk_ids;
    }

    /**
     * What trunks are accepted for this dispatch rule
     * If empty all trunks will match this dispatch rule
     *
     * Generated from protobuf field <code>repeated string trunk_ids = 2 [deprecated = true];</code>
     * @param string[] $var
     * @return $this
     * @deprecated
     */
    public function setTrunkIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        if (count($arr) !== 0) {
            @trigger_error('trunk_ids is deprecated.', E_USER_DEPRECATED);
        }
        $this->trunk_ids = $arr;

        return $this;
    }

    /**
     * By default the From value (Phone number) is used for participant name/identity and added to attributes.
     * If true, a random value for identity will be used and numbers will be omitted from attributes.
     *
     * Generated from protobuf field <code>bool hide_phone_number = 3 [deprecated = true];</code>
     * @return bool
     * @deprecated
     */
    public function getHidePhoneNumber()
    {
        if ($this->hide_phone_number !== false) {
            @trigger_error('hide_phone_number is deprecated.', E_USER_DEPRECATED);
        }
        return $this->hide_phone_number;
    }

    /**
     * By default the From value (Phone number) is used for participant name/identity and added to attributes.
     * If true, a random value for identity will be used and numbers will be omitted from attributes.
     *
     * Generated from protobuf field <code>bool hide_phone_number = 3 [deprecated = true];</code>
     * @param bool $var
     * @return $this
     * @deprecated
     */
    public function setHidePhoneNumber($var)
    {
        @trigger_error('hide_phone_number is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkBool($var);
        $this->hide_phone_number = $var;

        return $this;
    }

    /**
     * Dispatch Rule will only accept a call made to these numbers (if set).
     *
     * Generated from protobuf field <code>repeated string inbound_numbers = 6 [deprecated = true];</code>
     * @return RepeatedField<string>
     * @deprecated
     */
    public function getInboundNumbers()
    {
        if (count($this->inbound_numbers) !== 0) {
            @trigger_error('inbound_numbers is deprecated.', E_USER_DEPRECATED);
        }
        return $this->inbound_numbers;
    }

    /**
     * Dispatch Rule will only accept a call made to these numbers (if set).
     *
     * Generated from protobuf field <code>repeated string inbound_numbers = 6 [deprecated = true];</code>
     * @param string[] $var
     * @return $this
     * @deprecated
     */
    public function setInboundNumbers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        if (count($arr) !== 0) {
            @trigger_error('inbound_numbers is deprecated.', E_USER_DEPRECATED);
        }
        $this->inbound_numbers = $arr;

        return $this;
    }

    /**
     * Optional human-readable name for the Dispatch Rule.
     *
     * Generated from protobuf field <code>string name = 4 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getName()
    {
        if ($this->name !== '') {
            @trigger_error('name is deprecated.', E_USER_DEPRECATED);
        }
        return $this->name;
    }

    /**
     * Optional human-readable name for the Dispatch Rule.
     *
     * Generated from protobuf field <code>string name = 4 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setName($var)
    {
        @trigger_error('name is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * User-defined metadata for the Dispatch Rule.
     * Participants created by this rule will inherit this metadata.
     *
     * Generated from protobuf field <code>string metadata = 5 [deprecated = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @return string
     * @deprecated
     */
    public function getMetadata()
    {
        if ($this->metadata !== '') {
            @trigger_error('metadata is deprecated.', E_USER_DEPRECATED);
        }
        return $this->metadata;
    }

    /**
     * User-defined metadata for the Dispatch Rule.
     * Participants created by this rule will inherit this metadata.
     *
     * Generated from protobuf field <code>string metadata = 5 [deprecated = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setMetadata($var)
    {
        @trigger_error('metadata is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->metadata = $var;

        return $this;
    }

    /**
     * User-defined attributes for the Dispatch Rule.
     * Participants created by this rule will inherit these attributes.
     *
     * Generated from protobuf field <code>map<string, string> attributes = 7 [deprecated = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @return \Google\Protobuf\Internal\MapField
     * @deprecated
     */
    public function getAttributes()
    {
        if (count($this->attributes) !== 0) {
            @trigger_error('attributes is deprecated.', E_USER_DEPRECATED);
        }
        return $this->attributes;
    }

    /**
     * User-defined attributes for the Dispatch Rule.
     * Participants created by this rule will inherit these attributes.
     *
     * Generated from protobuf field <code>map<string, string> attributes = 7 [deprecated = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     * @deprecated
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        if (count($arr) !== 0) {
            @trigger_error('attributes is deprecated.', E_USER_DEPRECATED);
        }
        $this->attributes = $arr;

        return $this;
    }

    /**
     * Cloud-only, config preset to use
     *
     * Generated from protobuf field <code>string room_preset = 8 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getRoomPreset()
    {
        if ($this->room_preset !== '') {
            @trigger_error('room_preset is deprecated.', E_USER_DEPRECATED);
        }
        return $this->room_preset;
    }

    /**
     * Cloud-only, config preset to use
     *
     * Generated from protobuf field <code>string room_preset = 8 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setRoomPreset($var)
    {
        @trigger_error('room_preset is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->room_preset = $var;

        return $this;
    }

    /**
     * RoomConfiguration to use if the participant initiates the room
     *
     * Generated from protobuf field <code>.livekit.RoomConfiguration room_config = 9 [deprecated = true];</code>
     * @return \Livekit\RoomConfiguration|null
     * @deprecated
     */
    public function getRoomConfig()
    {
        if (isset($this->room_config)) {
            @trigger_error('room_config is deprecated.', E_USER_DEPRECATED);
        }
        return $this->room_config;
    }

    public function hasRoomConfig()
    {
        if (isset($this->room_config)) {
            @trigger_error('room_config is deprecated.', E_USER_DEPRECATED);
        }
        return isset($this->room_config);
    }

    public function clearRoomConfig()
    {
        @trigger_error('room_config is deprecated.', E_USER_DEPRECATED);
        unset($this->room_config);
    }

    /**
     * RoomConfiguration to use if the participant initiates the room
     *
     * Generated from protobuf field <code>.livekit.RoomConfiguration room_config = 9 [deprecated = true];</code>
     * @param \Livekit\RoomConfiguration $var
     * @return $this
     * @deprecated
     */
    public function setRoomConfig($var)
    {
        @trigger_error('room_config is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Livekit\RoomConfiguration::class);
        $this->room_config = $var;

        return $this;
    }

}

