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

namespace Rv\Data;

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

/**
 * Generated from protobuf message <code>rv.data.Message</code>
 */
class Message extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.UUID uuid = 1;</code>
     */
    protected $uuid = null;
    /**
     * Generated from protobuf field <code>string title = 2;</code>
     */
    protected $title = '';
    /**
     * Generated from protobuf field <code>double time_to_remove = 3;</code>
     */
    protected $time_to_remove = 0.0;
    /**
     * Generated from protobuf field <code>bool visible_on_network = 4;</code>
     */
    protected $visible_on_network = false;
    /**
     * Generated from protobuf field <code>.rv.data.TemplateIdentification template = 6;</code>
     */
    protected $template = null;
    /**
     * Generated from protobuf field <code>.rv.data.Message.ClearType clear_type = 9;</code>
     */
    protected $clear_type = 0;
    /**
     * Generated from protobuf field <code>string message_text = 10;</code>
     */
    protected $message_text = '';
    /**
     * Generated from protobuf field <code>repeated .rv.data.Message.Token tokens = 11;</code>
     */
    private $tokens;
    /**
     * Generated from protobuf field <code>repeated .rv.data.Message.TokenValue token_values = 12;</code>
     */
    private $token_values;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\UUID $uuid
     *     @type string $title
     *     @type float $time_to_remove
     *     @type bool $visible_on_network
     *     @type \Rv\Data\TemplateIdentification $template
     *     @type int $clear_type
     *     @type string $message_text
     *     @type array<\Rv\Data\Message\Token>|\Google\Protobuf\Internal\RepeatedField $tokens
     *     @type array<\Rv\Data\Message\TokenValue>|\Google\Protobuf\Internal\RepeatedField $token_values
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Messages::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.UUID uuid = 1;</code>
     * @return \Rv\Data\UUID|null
     */
    public function getUuid()
    {
        return $this->uuid;
    }

    public function hasUuid()
    {
        return isset($this->uuid);
    }

    public function clearUuid()
    {
        unset($this->uuid);
    }

    /**
     * Generated from protobuf field <code>.rv.data.UUID uuid = 1;</code>
     * @param \Rv\Data\UUID $var
     * @return $this
     */
    public function setUuid($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\UUID::class);
        $this->uuid = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string title = 2;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool visible_on_network = 4;</code>
     * @return bool
     */
    public function getVisibleOnNetwork()
    {
        return $this->visible_on_network;
    }

    /**
     * Generated from protobuf field <code>bool visible_on_network = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setVisibleOnNetwork($var)
    {
        GPBUtil::checkBool($var);
        $this->visible_on_network = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.TemplateIdentification template = 6;</code>
     * @return \Rv\Data\TemplateIdentification|null
     */
    public function getTemplate()
    {
        return $this->template;
    }

    public function hasTemplate()
    {
        return isset($this->template);
    }

    public function clearTemplate()
    {
        unset($this->template);
    }

    /**
     * Generated from protobuf field <code>.rv.data.TemplateIdentification template = 6;</code>
     * @param \Rv\Data\TemplateIdentification $var
     * @return $this
     */
    public function setTemplate($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\TemplateIdentification::class);
        $this->template = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Message.ClearType clear_type = 9;</code>
     * @return int
     */
    public function getClearType()
    {
        return $this->clear_type;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Message.ClearType clear_type = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setClearType($var)
    {
        GPBUtil::checkEnum($var, \Rv\Data\Message\ClearType::class);
        $this->clear_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string message_text = 10;</code>
     * @return string
     */
    public function getMessageText()
    {
        return $this->message_text;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Message.Token tokens = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTokens()
    {
        return $this->tokens;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Message.Token tokens = 11;</code>
     * @param array<\Rv\Data\Message\Token>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTokens($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Rv\Data\Message\Token::class);
        $this->tokens = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Message.TokenValue token_values = 12;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTokenValues()
    {
        return $this->token_values;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Message.TokenValue token_values = 12;</code>
     * @param array<\Rv\Data\Message\TokenValue>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTokenValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Rv\Data\Message\TokenValue::class);
        $this->token_values = $arr;

        return $this;
    }

}

