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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.StreamInfo</code>
 */
class StreamInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string url = 1;</code>
     */
    protected $url = '';
    /**
     * Generated from protobuf field <code>int64 started_at = 2;</code>
     */
    protected $started_at = 0;
    /**
     * Generated from protobuf field <code>int64 ended_at = 3;</code>
     */
    protected $ended_at = 0;
    /**
     * Generated from protobuf field <code>int64 duration = 4;</code>
     */
    protected $duration = 0;
    /**
     * Generated from protobuf field <code>.livekit.StreamInfo.Status status = 5;</code>
     */
    protected $status = 0;
    /**
     * Generated from protobuf field <code>string error = 6;</code>
     */
    protected $error = '';
    /**
     * Generated from protobuf field <code>int64 last_retry_at = 7;</code>
     */
    protected $last_retry_at = 0;
    /**
     * Generated from protobuf field <code>uint32 retries = 8;</code>
     */
    protected $retries = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $url
     *     @type int|string $started_at
     *     @type int|string $ended_at
     *     @type int|string $duration
     *     @type int $status
     *     @type string $error
     *     @type int|string $last_retry_at
     *     @type int $retries
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>int64 started_at = 2;</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 = 3;</code>
     * @return int|string
     */
    public function getEndedAt()
    {
        return $this->ended_at;
    }

    /**
     * Generated from protobuf field <code>int64 ended_at = 3;</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>int64 duration = 4;</code>
     * @return int|string
     */
    public function getDuration()
    {
        return $this->duration;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.StreamInfo.Status status = 5;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Generated from protobuf field <code>.livekit.StreamInfo.Status status = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Livekit\StreamInfo\Status::class);
        $this->status = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 retries = 8;</code>
     * @return int
     */
    public function getRetries()
    {
        return $this->retries;
    }

    /**
     * Generated from protobuf field <code>uint32 retries = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setRetries($var)
    {
        GPBUtil::checkUint32($var);
        $this->retries = $var;

        return $this;
    }

}

