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

namespace Rv\Data\Presentation;

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

/**
 * Generated from protobuf message <code>rv.data.Presentation.Timeline</code>
 */
class Timeline extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .rv.data.Presentation.Timeline.Cue cues = 1;</code>
     */
    private $cues;
    /**
     * Generated from protobuf field <code>double duration = 5;</code>
     */
    protected $duration = 0.0;
    /**
     * Generated from protobuf field <code>bool loop = 6;</code>
     */
    protected $loop = false;
    /**
     * Generated from protobuf field <code>.rv.data.Action audio_action = 8;</code>
     */
    protected $audio_action = null;
    /**
     * Generated from protobuf field <code>bool timecode_enable = 9;</code>
     */
    protected $timecode_enable = false;
    /**
     * Generated from protobuf field <code>double timecode_offset = 10;</code>
     */
    protected $timecode_offset = 0.0;
    /**
     * Generated from protobuf field <code>repeated .rv.data.Presentation.Timeline.Cue cues_v2 = 11;</code>
     */
    private $cues_v2;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Rv\Data\Presentation\Timeline\Cue>|\Google\Protobuf\Internal\RepeatedField $cues
     *     @type float $duration
     *     @type bool $loop
     *     @type \Rv\Data\Action $audio_action
     *     @type bool $timecode_enable
     *     @type float $timecode_offset
     *     @type array<\Rv\Data\Presentation\Timeline\Cue>|\Google\Protobuf\Internal\RepeatedField $cues_v2
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Presentation::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Presentation.Timeline.Cue cues = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCues()
    {
        return $this->cues;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool loop = 6;</code>
     * @return bool
     */
    public function getLoop()
    {
        return $this->loop;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action audio_action = 8;</code>
     * @return \Rv\Data\Action|null
     */
    public function getAudioAction()
    {
        return $this->audio_action;
    }

    public function hasAudioAction()
    {
        return isset($this->audio_action);
    }

    public function clearAudioAction()
    {
        unset($this->audio_action);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool timecode_enable = 9;</code>
     * @return bool
     */
    public function getTimecodeEnable()
    {
        return $this->timecode_enable;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Presentation.Timeline.Cue cues_v2 = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCuesV2()
    {
        return $this->cues_v2;
    }

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

        return $this;
    }

}

