<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: livekit_analytics.proto

namespace Livekit;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>livekit.APICallInfo</code>
 */
class APICallInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string project_id = 1 [(.logger.name) = "projectID"];</code>
     */
    protected $project_id = '';
    /**
     * Generated from protobuf field <code>.livekit.APICallRequest request = 2;</code>
     */
    protected $request = null;
    /**
     * Generated from protobuf field <code>string service = 3;</code>
     */
    protected $service = '';
    /**
     * Generated from protobuf field <code>string method = 4;</code>
     */
    protected $method = '';
    /**
     * Generated from protobuf field <code>string node_id = 5 [(.logger.name) = "nodeID"];</code>
     */
    protected $node_id = '';
    /**
     * Generated from protobuf field <code>int32 status = 6;</code>
     */
    protected $status = 0;
    /**
     * Generated from protobuf field <code>string twirp_error_code = 7;</code>
     */
    protected $twirp_error_code = '';
    /**
     * Generated from protobuf field <code>string twirp_error_message = 8;</code>
     */
    protected $twirp_error_message = '';
    /**
     * Generated from protobuf field <code>string room_name = 9;</code>
     */
    protected $room_name = '';
    /**
     * Generated from protobuf field <code>string room_id = 10 [(.logger.name) = "roomID"];</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>string participant_identity = 11;</code>
     */
    protected $participant_identity = '';
    /**
     * Generated from protobuf field <code>string participant_id = 12 [(.logger.name) = "participantID"];</code>
     */
    protected $participant_id = '';
    /**
     * Generated from protobuf field <code>string track_id = 13 [(.logger.name) = "trackID"];</code>
     */
    protected $track_id = '';
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp started_at = 14;</code>
     */
    protected $started_at = null;
    /**
     * Generated from protobuf field <code>int64 duration_ns = 15;</code>
     */
    protected $duration_ns = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $project_id
     *     @type \Livekit\APICallRequest $request
     *     @type string $service
     *     @type string $method
     *     @type string $node_id
     *     @type int $status
     *     @type string $twirp_error_code
     *     @type string $twirp_error_message
     *     @type string $room_name
     *     @type string $room_id
     *     @type string $participant_identity
     *     @type string $participant_id
     *     @type string $track_id
     *     @type \Google\Protobuf\Timestamp $started_at
     *     @type int|string $duration_ns
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAnalytics::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    public function hasRequest()
    {
        return isset($this->request);
    }

    public function clearRequest()
    {
        unset($this->request);
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string method = 4;</code>
     * @return string
     */
    public function getMethod()
    {
        return $this->method;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string node_id = 5 [(.logger.name) = "nodeID"];</code>
     * @return string
     */
    public function getNodeId()
    {
        return $this->node_id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 status = 6;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Generated from protobuf field <code>int32 status = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkInt32($var);
        $this->status = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string twirp_error_code = 7;</code>
     * @return string
     */
    public function getTwirpErrorCode()
    {
        return $this->twirp_error_code;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string twirp_error_message = 8;</code>
     * @return string
     */
    public function getTwirpErrorMessage()
    {
        return $this->twirp_error_message;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string room_id = 10 [(.logger.name) = "roomID"];</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

    /**
     * Generated from protobuf field <code>string room_id = 10 [(.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 = 11;</code>
     * @return string
     */
    public function getParticipantIdentity()
    {
        return $this->participant_identity;
    }

    /**
     * Generated from protobuf field <code>string participant_identity = 11;</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>string participant_id = 12 [(.logger.name) = "participantID"];</code>
     * @return string
     */
    public function getParticipantId()
    {
        return $this->participant_id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string track_id = 13 [(.logger.name) = "trackID"];</code>
     * @return string
     */
    public function getTrackId()
    {
        return $this->track_id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp started_at = 14;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getStartedAt()
    {
        return $this->started_at;
    }

    public function hasStartedAt()
    {
        return isset($this->started_at);
    }

    public function clearStartedAt()
    {
        unset($this->started_at);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp started_at = 14;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setStartedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->started_at = $var;

        return $this;
    }

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

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

        return $this;
    }

}

