<?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.SIPCallInfo</code>
 */
class SIPCallInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string call_id = 1;</code>
     */
    protected $call_id = '';
    /**
     * Generated from protobuf field <code>string trunk_id = 2;</code>
     */
    protected $trunk_id = '';
    /**
     * 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;</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>string participant_identity = 5;</code>
     */
    protected $participant_identity = '';
    /**
     * 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>.livekit.SIPCallStatus call_status = 8;</code>
     */
    protected $call_status = 0;
    /**
     * Generated from protobuf field <code>int64 created_at = 9;</code>
     */
    protected $created_at = 0;
    /**
     * Generated from protobuf field <code>int64 started_at = 10;</code>
     */
    protected $started_at = 0;
    /**
     * Generated from protobuf field <code>int64 ended_at = 11;</code>
     */
    protected $ended_at = 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 = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $call_id
     *     @type string $trunk_id
     *     @type string $room_name
     *     @type string $room_id
     *           ID of the current/previous room published to
     *     @type string $participant_identity
     *     @type \Livekit\SIPUri $from_uri
     *     @type \Livekit\SIPUri $to_uri
     *     @type int $call_status
     *     @type int|string $created_at
     *     @type int|string $started_at
     *     @type int|string $ended_at
     *     @type int $disconnect_reason
     *     @type string $error
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string call_id = 1;</code>
     * @return string
     */
    public function getCallId()
    {
        return $this->call_id;
    }

    /**
     * Generated from protobuf field <code>string call_id = 1;</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;</code>
     * @return string
     */
    public function getTrunkId()
    {
        return $this->trunk_id;
    }

    /**
     * Generated from protobuf field <code>string trunk_id = 2;</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 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;</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;</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>.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>.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 = 9;</code>
     * @return int|string
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>int64 ended_at = 11;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndedAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->ended_at = $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;
    }

}

