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

namespace Mynaparrot\PlugnmeetProto;

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

/**
 * Generated from protobuf message <code>plugnmeet.ExternalMediaPlayerReq</code>
 */
class ExternalMediaPlayerReq extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.plugnmeet.ExternalMediaPlayerTask task = 1;</code>
     */
    protected $task = 0;
    /**
     * Generated from protobuf field <code>optional string url = 2;</code>
     */
    protected $url = null;
    /**
     * Generated from protobuf field <code>optional double seek_to = 3;</code>
     */
    protected $seek_to = null;
    /**
     * Generated from protobuf field <code>string room_id = 4;</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>string user_id = 5;</code>
     */
    protected $user_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $task
     *     @type string $url
     *     @type float $seek_to
     *     @type string $room_id
     *     @type string $user_id
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetCommonApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.ExternalMediaPlayerTask task = 1;</code>
     * @return int
     */
    public function getTask()
    {
        return $this->task;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.ExternalMediaPlayerTask task = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setTask($var)
    {
        GPBUtil::checkEnum($var, \Mynaparrot\PlugnmeetProto\ExternalMediaPlayerTask::class);
        $this->task = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string url = 2;</code>
     * @return string
     */
    public function getUrl()
    {
        return isset($this->url) ? $this->url : '';
    }

    public function hasUrl()
    {
        return isset($this->url);
    }

    public function clearUrl()
    {
        unset($this->url);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional double seek_to = 3;</code>
     * @return float
     */
    public function getSeekTo()
    {
        return isset($this->seek_to) ? $this->seek_to : 0.0;
    }

    public function hasSeekTo()
    {
        return isset($this->seek_to);
    }

    public function clearSeekTo()
    {
        unset($this->seek_to);
    }

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

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>string room_id = 4;</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 user_id = 5;</code>
     * @return string
     */
    public function getUserId()
    {
        return $this->user_id;
    }

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

        return $this;
    }

}

