<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_metrics.proto

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.MetricsRecordingHeader</code>
 */
class MetricsRecordingHeader extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string room_id = 1;</code>
     */
    protected $room_id = '';
    /**
     * milliseconds
     *
     * Generated from protobuf field <code>uint64 duration = 3;</code>
     */
    protected $duration = 0;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 4;</code>
     */
    protected $start_time = null;
    /**
     * Generated from protobuf field <code>map<string, string> room_tags = 5;</code>
     */
    private $room_tags;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room_id
     *     @type int|string $duration
     *           milliseconds
     *     @type \Google\Protobuf\Timestamp $start_time
     *     @type array|\Google\Protobuf\Internal\MapField $room_tags
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitMetrics::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * milliseconds
     *
     * Generated from protobuf field <code>uint64 duration = 3;</code>
     * @return int|string
     */
    public function getDuration()
    {
        return $this->duration;
    }

    /**
     * milliseconds
     *
     * Generated from protobuf field <code>uint64 duration = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDuration($var)
    {
        GPBUtil::checkUint64($var);
        $this->duration = $var;

        return $this;
    }

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

    public function hasStartTime()
    {
        return isset($this->start_time);
    }

    public function clearStartTime()
    {
        unset($this->start_time);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> room_tags = 5;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getRoomTags()
    {
        return $this->room_tags;
    }

    /**
     * Generated from protobuf field <code>map<string, string> room_tags = 5;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setRoomTags($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->room_tags = $arr;

        return $this;
    }

}

