<?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.SIPCallInfo</code>
 */
class SIPCallInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string call_id = 1 [(.logger.name) = "callID"];</code>
     */
    protected $call_id = '';
    /**
     * Generated from protobuf field <code>string trunk_id = 2 [(.logger.name) = "trunkID"];</code>
     */
    protected $trunk_id = '';
    /**
     * Generated from protobuf field <code>string dispatch_rule_id = 16 [(.logger.name) = "dispatchRuleID"];</code>
     */
    protected $dispatch_rule_id = '';
    /**
     * Generated from protobuf field <code>string region = 17;</code>
     */
    protected $region = '';
    /**
     * Generated from protobuf field <code>string room_name = 3;</code>
     */
    protected $room_name = '';
    /**
     * ID of the current/previous room published to
     *
     * Generated from protobuf field <code>string room_id = 4 [(.logger.name) = "roomID"];</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>string participant_identity = 5;</code>
     */
    protected $participant_identity = '';
    /**
     * Generated from protobuf field <code>map<string, string> participant_attributes = 18 [(.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     */
    private $participant_attributes;
    /**
     * Generated from protobuf field <code>.livekit.SIPUri from_uri = 6;</code>
     */
    protected $from_uri = null;
    /**
     * Generated from protobuf field <code>.livekit.SIPUri to_uri = 7;</code>
     */
    protected $to_uri = null;
    /**
     * Generated from protobuf field <code>int64 created_at = 9 [deprecated = true];</code>
     * @deprecated
     */
    protected $created_at = 0;
    /**
     * Generated from protobuf field <code>int64 started_at = 10 [deprecated = true];</code>
     * @deprecated
     */
    protected $started_at = 0;
    /**
     * Generated from protobuf field <code>int64 ended_at = 11 [deprecated = true];</code>
     * @deprecated
     */
    protected $ended_at = 0;
    /**
     * Generated from protobuf field <code>repeated .livekit.SIPFeature enabled_features = 14;</code>
     */
    private $enabled_features;
    /**
     * Generated from protobuf field <code>.livekit.SIPCallDirection call_direction = 15;</code>
     */
    protected $call_direction = 0;
    /**
     * Generated from protobuf field <code>.livekit.SIPCallStatus call_status = 8;</code>
     */
    protected $call_status = 0;
    /**
     * Generated from protobuf field <code>int64 created_at_ns = 22;</code>
     */
    protected $created_at_ns = 0;
    /**
     * Generated from protobuf field <code>int64 started_at_ns = 23;</code>
     */
    protected $started_at_ns = 0;
    /**
     * Generated from protobuf field <code>int64 ended_at_ns = 24;</code>
     */
    protected $ended_at_ns = 0;
    /**
     * Generated from protobuf field <code>.livekit.DisconnectReason disconnect_reason = 12;</code>
     */
    protected $disconnect_reason = 0;
    /**
     * Generated from protobuf field <code>string error = 13;</code>
     */
    protected $error = '';
    /**
     * Generated from protobuf field <code>.livekit.SIPStatus call_status_code = 19;</code>
     */
    protected $call_status_code = null;
    /**
     * Generated from protobuf field <code>string audio_codec = 20;</code>
     */
    protected $audio_codec = '';
    /**
     * Generated from protobuf field <code>string media_encryption = 21;</code>
     */
    protected $media_encryption = '';
    /**
     * Generated from protobuf field <code>string pcap_file_link = 25;</code>
     */
    protected $pcap_file_link = '';
    /**
     * Generated from protobuf field <code>repeated .google.protobuf.Any call_context = 26;</code>
     */
    private $call_context;
    /**
     * Generated from protobuf field <code>.livekit.ProviderInfo provider_info = 27;</code>
     */
    protected $provider_info = null;
    /**
     * Generated from protobuf field <code>string sip_call_id = 28 [(.logger.name) = "sipCallID"];</code>
     */
    protected $sip_call_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $call_id
     *     @type string $trunk_id
     *     @type string $dispatch_rule_id
     *     @type string $region
     *     @type string $room_name
     *     @type string $room_id
     *           ID of the current/previous room published to
     *     @type string $participant_identity
     *     @type array|\Google\Protobuf\Internal\MapField $participant_attributes
     *     @type \Livekit\SIPUri $from_uri
     *     @type \Livekit\SIPUri $to_uri
     *     @type int|string $created_at
     *     @type int|string $started_at
     *     @type int|string $ended_at
     *     @type int[] $enabled_features
     *     @type int $call_direction
     *     @type int $call_status
     *     @type int|string $created_at_ns
     *     @type int|string $started_at_ns
     *     @type int|string $ended_at_ns
     *     @type int $disconnect_reason
     *     @type string $error
     *     @type \Livekit\SIPStatus $call_status_code
     *     @type string $audio_codec
     *     @type string $media_encryption
     *     @type string $pcap_file_link
     *     @type \Google\Protobuf\Any[] $call_context
     *     @type \Livekit\ProviderInfo $provider_info
     *     @type string $sip_call_id
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string call_id = 1 [(.logger.name) = "callID"];</code>
     * @return string
     */
    public function getCallId()
    {
        return $this->call_id;
    }

    /**
     * Generated from protobuf field <code>string call_id = 1 [(.logger.name) = "callID"];</code>
     * @param string $var
     * @return $this
     */
    public function setCallId($var)
    {
        GPBUtil::checkString($var, True);
        $this->call_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string trunk_id = 2 [(.logger.name) = "trunkID"];</code>
     * @return string
     */
    public function getTrunkId()
    {
        return $this->trunk_id;
    }

    /**
     * Generated from protobuf field <code>string trunk_id = 2 [(.logger.name) = "trunkID"];</code>
     * @param string $var
     * @return $this
     */
    public function setTrunkId($var)
    {
        GPBUtil::checkString($var, True);
        $this->trunk_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string dispatch_rule_id = 16 [(.logger.name) = "dispatchRuleID"];</code>
     * @return string
     */
    public function getDispatchRuleId()
    {
        return $this->dispatch_rule_id;
    }

    /**
     * Generated from protobuf field <code>string dispatch_rule_id = 16 [(.logger.name) = "dispatchRuleID"];</code>
     * @param string $var
     * @return $this
     */
    public function setDispatchRuleId($var)
    {
        GPBUtil::checkString($var, True);
        $this->dispatch_rule_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string region = 17;</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string room_name = 3;</code>
     * @return string
     */
    public function getRoomName()
    {
        return $this->room_name;
    }

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

        return $this;
    }

    /**
     * ID of the current/previous room published to
     *
     * Generated from protobuf field <code>string room_id = 4 [(.logger.name) = "roomID"];</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

    /**
     * ID of the current/previous room published to
     *
     * Generated from protobuf field <code>string room_id = 4 [(.logger.name) = "roomID"];</code>
     * @param string $var
     * @return $this
     */
    public function setRoomId($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string participant_identity = 5;</code>
     * @return string
     */
    public function getParticipantIdentity()
    {
        return $this->participant_identity;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> participant_attributes = 18 [(.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getParticipantAttributes()
    {
        return $this->participant_attributes;
    }

    /**
     * Generated from protobuf field <code>map<string, string> participant_attributes = 18 [(.logger.redact_format) = "<redacted ({{ .Size }} bytes)>", (.logger.sensitivity) = SENSITIVITY_PII];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setParticipantAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->participant_attributes = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPUri from_uri = 6;</code>
     * @return \Livekit\SIPUri|null
     */
    public function getFromUri()
    {
        return $this->from_uri;
    }

    public function hasFromUri()
    {
        return isset($this->from_uri);
    }

    public function clearFromUri()
    {
        unset($this->from_uri);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPUri to_uri = 7;</code>
     * @return \Livekit\SIPUri|null
     */
    public function getToUri()
    {
        return $this->to_uri;
    }

    public function hasToUri()
    {
        return isset($this->to_uri);
    }

    public function clearToUri()
    {
        unset($this->to_uri);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 created_at = 9 [deprecated = true];</code>
     * @return int|string
     * @deprecated
     */
    public function getCreatedAt()
    {
        if ($this->created_at !== 0) {
            @trigger_error('created_at is deprecated.', E_USER_DEPRECATED);
        }
        return $this->created_at;
    }

    /**
     * Generated from protobuf field <code>int64 created_at = 9 [deprecated = true];</code>
     * @param int|string $var
     * @return $this
     * @deprecated
     */
    public function setCreatedAt($var)
    {
        @trigger_error('created_at is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkInt64($var);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 started_at = 10 [deprecated = true];</code>
     * @return int|string
     * @deprecated
     */
    public function getStartedAt()
    {
        if ($this->started_at !== 0) {
            @trigger_error('started_at is deprecated.', E_USER_DEPRECATED);
        }
        return $this->started_at;
    }

    /**
     * Generated from protobuf field <code>int64 started_at = 10 [deprecated = true];</code>
     * @param int|string $var
     * @return $this
     * @deprecated
     */
    public function setStartedAt($var)
    {
        @trigger_error('started_at is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkInt64($var);
        $this->started_at = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 ended_at = 11 [deprecated = true];</code>
     * @return int|string
     * @deprecated
     */
    public function getEndedAt()
    {
        if ($this->ended_at !== 0) {
            @trigger_error('ended_at is deprecated.', E_USER_DEPRECATED);
        }
        return $this->ended_at;
    }

    /**
     * Generated from protobuf field <code>int64 ended_at = 11 [deprecated = true];</code>
     * @param int|string $var
     * @return $this
     * @deprecated
     */
    public function setEndedAt($var)
    {
        @trigger_error('ended_at is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkInt64($var);
        $this->ended_at = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SIPFeature enabled_features = 14;</code>
     * @return RepeatedField<int>
     */
    public function getEnabledFeatures()
    {
        return $this->enabled_features;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SIPFeature enabled_features = 14;</code>
     * @param int[] $var
     * @return $this
     */
    public function setEnabledFeatures($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Livekit\SIPFeature::class);
        $this->enabled_features = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPCallDirection call_direction = 15;</code>
     * @return int
     */
    public function getCallDirection()
    {
        return $this->call_direction;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPCallStatus call_status = 8;</code>
     * @return int
     */
    public function getCallStatus()
    {
        return $this->call_status;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 created_at_ns = 22;</code>
     * @return int|string
     */
    public function getCreatedAtNs()
    {
        return $this->created_at_ns;
    }

    /**
     * Generated from protobuf field <code>int64 created_at_ns = 22;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCreatedAtNs($var)
    {
        GPBUtil::checkInt64($var);
        $this->created_at_ns = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 started_at_ns = 23;</code>
     * @return int|string
     */
    public function getStartedAtNs()
    {
        return $this->started_at_ns;
    }

    /**
     * Generated from protobuf field <code>int64 started_at_ns = 23;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartedAtNs($var)
    {
        GPBUtil::checkInt64($var);
        $this->started_at_ns = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 ended_at_ns = 24;</code>
     * @return int|string
     */
    public function getEndedAtNs()
    {
        return $this->ended_at_ns;
    }

    /**
     * Generated from protobuf field <code>int64 ended_at_ns = 24;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndedAtNs($var)
    {
        GPBUtil::checkInt64($var);
        $this->ended_at_ns = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.DisconnectReason disconnect_reason = 12;</code>
     * @return int
     */
    public function getDisconnectReason()
    {
        return $this->disconnect_reason;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string error = 13;</code>
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPStatus call_status_code = 19;</code>
     * @return \Livekit\SIPStatus|null
     */
    public function getCallStatusCode()
    {
        return $this->call_status_code;
    }

    public function hasCallStatusCode()
    {
        return isset($this->call_status_code);
    }

    public function clearCallStatusCode()
    {
        unset($this->call_status_code);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string audio_codec = 20;</code>
     * @return string
     */
    public function getAudioCodec()
    {
        return $this->audio_codec;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string media_encryption = 21;</code>
     * @return string
     */
    public function getMediaEncryption()
    {
        return $this->media_encryption;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string pcap_file_link = 25;</code>
     * @return string
     */
    public function getPcapFileLink()
    {
        return $this->pcap_file_link;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .google.protobuf.Any call_context = 26;</code>
     * @return RepeatedField<\Google\Protobuf\Any>
     */
    public function getCallContext()
    {
        return $this->call_context;
    }

    /**
     * Generated from protobuf field <code>repeated .google.protobuf.Any call_context = 26;</code>
     * @param \Google\Protobuf\Any[] $var
     * @return $this
     */
    public function setCallContext($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
        $this->call_context = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ProviderInfo provider_info = 27;</code>
     * @return \Livekit\ProviderInfo|null
     */
    public function getProviderInfo()
    {
        return $this->provider_info;
    }

    public function hasProviderInfo()
    {
        return isset($this->provider_info);
    }

    public function clearProviderInfo()
    {
        unset($this->provider_info);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string sip_call_id = 28 [(.logger.name) = "sipCallID"];</code>
     * @return string
     */
    public function getSipCallId()
    {
        return $this->sip_call_id;
    }

    /**
     * Generated from protobuf field <code>string sip_call_id = 28 [(.logger.name) = "sipCallID"];</code>
     * @param string $var
     * @return $this
     */
    public function setSipCallId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_call_id = $var;

        return $this;
    }

}

