<?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.DataTrackSubscriptionOptions</code>
 */
class DataTrackSubscriptionOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Rate in frames per second (FPS) the subscriber wants to receive frames at.
     * If omitted, the subscriber defaults to the publisher's fps
     *
     * Generated from protobuf field <code>optional uint32 target_fps = 1;</code>
     */
    protected $target_fps = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $target_fps
     *           Rate in frames per second (FPS) the subscriber wants to receive frames at.
     *           If omitted, the subscriber defaults to the publisher's fps
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * Rate in frames per second (FPS) the subscriber wants to receive frames at.
     * If omitted, the subscriber defaults to the publisher's fps
     *
     * Generated from protobuf field <code>optional uint32 target_fps = 1;</code>
     * @return int
     */
    public function getTargetFps()
    {
        return isset($this->target_fps) ? $this->target_fps : 0;
    }

    public function hasTargetFps()
    {
        return isset($this->target_fps);
    }

    public function clearTargetFps()
    {
        unset($this->target_fps);
    }

    /**
     * Rate in frames per second (FPS) the subscriber wants to receive frames at.
     * If omitted, the subscriber defaults to the publisher's fps
     *
     * Generated from protobuf field <code>optional uint32 target_fps = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setTargetFps($var)
    {
        GPBUtil::checkUint32($var);
        $this->target_fps = $var;

        return $this;
    }

}

