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

namespace Rv\Data\Slide\Element\DataLink;

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

/**
 * Generated from protobuf message <code>rv.data.Slide.Element.DataLink.Ticker</code>
 */
class Ticker extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>double play_rate = 4;</code>
     */
    protected $play_rate = 0.0;
    /**
     * Generated from protobuf field <code>bool should_loop = 5;</code>
     */
    protected $should_loop = false;
    /**
     * Generated from protobuf field <code>double loop_delay = 6;</code>
     */
    protected $loop_delay = 0.0;
    /**
     * Generated from protobuf field <code>string text_delimiter = 7;</code>
     */
    protected $text_delimiter = '';
    protected $SourceType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $play_rate
     *     @type bool $should_loop
     *     @type float $loop_delay
     *     @type string $text_delimiter
     *     @type \Rv\Data\Slide\Element\DataLink\Ticker\TextType $text_type
     *     @type \Rv\Data\Slide\Element\DataLink\Ticker\RSSType $rss_type
     *     @type \Rv\Data\Slide\Element\DataLink\Ticker\FileType $file_type
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Slide::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool should_loop = 5;</code>
     * @return bool
     */
    public function getShouldLoop()
    {
        return $this->should_loop;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string text_delimiter = 7;</code>
     * @return string
     */
    public function getTextDelimiter()
    {
        return $this->text_delimiter;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Slide.Element.DataLink.Ticker.TextType text_type = 1;</code>
     * @return \Rv\Data\Slide\Element\DataLink\Ticker\TextType|null
     */
    public function getTextType()
    {
        return $this->readOneof(1);
    }

    public function hasTextType()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Slide.Element.DataLink.Ticker.TextType text_type = 1;</code>
     * @param \Rv\Data\Slide\Element\DataLink\Ticker\TextType $var
     * @return $this
     */
    public function setTextType($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Slide\Element\DataLink\Ticker\TextType::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Slide.Element.DataLink.Ticker.RSSType rss_type = 2;</code>
     * @return \Rv\Data\Slide\Element\DataLink\Ticker\RSSType|null
     */
    public function getRssType()
    {
        return $this->readOneof(2);
    }

    public function hasRssType()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Slide.Element.DataLink.Ticker.RSSType rss_type = 2;</code>
     * @param \Rv\Data\Slide\Element\DataLink\Ticker\RSSType $var
     * @return $this
     */
    public function setRssType($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Slide\Element\DataLink\Ticker\RSSType::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Slide.Element.DataLink.Ticker.FileType file_type = 3;</code>
     * @return \Rv\Data\Slide\Element\DataLink\Ticker\FileType|null
     */
    public function getFileType()
    {
        return $this->readOneof(3);
    }

    public function hasFileType()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Slide.Element.DataLink.Ticker.FileType file_type = 3;</code>
     * @param \Rv\Data\Slide\Element\DataLink\Ticker\FileType $var
     * @return $this
     */
    public function setFileType($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Slide\Element\DataLink\Ticker\FileType::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getSourceType()
    {
        return $this->whichOneof("SourceType");
    }

}

