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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.RTPDrift</code>
 */
class RTPDrift extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    protected $start_time = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 2;</code>
     */
    protected $end_time = null;
    /**
     * Generated from protobuf field <code>double duration = 3;</code>
     */
    protected $duration = 0.0;
    /**
     * Generated from protobuf field <code>uint64 start_timestamp = 4;</code>
     */
    protected $start_timestamp = 0;
    /**
     * Generated from protobuf field <code>uint64 end_timestamp = 5;</code>
     */
    protected $end_timestamp = 0;
    /**
     * Generated from protobuf field <code>uint64 rtp_clock_ticks = 6;</code>
     */
    protected $rtp_clock_ticks = 0;
    /**
     * Generated from protobuf field <code>int64 drift_samples = 7;</code>
     */
    protected $drift_samples = 0;
    /**
     * Generated from protobuf field <code>double drift_ms = 8;</code>
     */
    protected $drift_ms = 0.0;
    /**
     * Generated from protobuf field <code>double clock_rate = 9;</code>
     */
    protected $clock_rate = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $start_time
     *     @type \Google\Protobuf\Timestamp $end_time
     *     @type float $duration
     *     @type int|string $start_timestamp
     *     @type int|string $end_timestamp
     *     @type int|string $rtp_clock_ticks
     *     @type int|string $drift_samples
     *     @type float $drift_ms
     *     @type float $clock_rate
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 1;</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 = 1;</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>.google.protobuf.Timestamp end_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEndTime()
    {
        return $this->end_time;
    }

    public function hasEndTime()
    {
        return isset($this->end_time);
    }

    public function clearEndTime()
    {
        unset($this->end_time);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>double duration = 3;</code>
     * @return float
     */
    public function getDuration()
    {
        return $this->duration;
    }

    /**
     * Generated from protobuf field <code>double duration = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setDuration($var)
    {
        GPBUtil::checkDouble($var);
        $this->duration = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 start_timestamp = 4;</code>
     * @return int|string
     */
    public function getStartTimestamp()
    {
        return $this->start_timestamp;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 end_timestamp = 5;</code>
     * @return int|string
     */
    public function getEndTimestamp()
    {
        return $this->end_timestamp;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 rtp_clock_ticks = 6;</code>
     * @return int|string
     */
    public function getRtpClockTicks()
    {
        return $this->rtp_clock_ticks;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>double drift_ms = 8;</code>
     * @return float
     */
    public function getDriftMs()
    {
        return $this->drift_ms;
    }

    /**
     * Generated from protobuf field <code>double drift_ms = 8;</code>
     * @param float $var
     * @return $this
     */
    public function setDriftMs($var)
    {
        GPBUtil::checkDouble($var);
        $this->drift_ms = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>double clock_rate = 9;</code>
     * @return float
     */
    public function getClockRate()
    {
        return $this->clock_rate;
    }

    /**
     * Generated from protobuf field <code>double clock_rate = 9;</code>
     * @param float $var
     * @return $this
     */
    public function setClockRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->clock_rate = $var;

        return $this;
    }

}

