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

namespace Rv\Data\Action;

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

/**
 * Generated from protobuf message <code>rv.data.Action.MediaType</code>
 */
class MediaType extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>double transition_duration = 1;</code>
     */
    protected $transition_duration = 0.0;
    /**
     * Generated from protobuf field <code>.rv.data.UUID selected_effect_preset_uuid = 2;</code>
     */
    protected $selected_effect_preset_uuid = null;
    /**
     * Generated from protobuf field <code>.rv.data.Transition transition = 3;</code>
     */
    protected $transition = null;
    /**
     * Generated from protobuf field <code>repeated .rv.data.Effect effects = 4;</code>
     */
    private $effects;
    /**
     * Generated from protobuf field <code>.rv.data.Media element = 5;</code>
     */
    protected $element = null;
    /**
     * Generated from protobuf field <code>.rv.data.Action.LayerType layer_type = 10;</code>
     */
    protected $layer_type = 0;
    /**
     * Generated from protobuf field <code>bool always_retrigger = 11;</code>
     */
    protected $always_retrigger = false;
    /**
     * Generated from protobuf field <code>repeated .rv.data.Action.MediaType.PlaybackMarker markers = 12;</code>
     */
    private $markers;
    protected $MediaType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $transition_duration
     *     @type \Rv\Data\UUID $selected_effect_preset_uuid
     *     @type \Rv\Data\Transition $transition
     *     @type array<\Rv\Data\Effect>|\Google\Protobuf\Internal\RepeatedField $effects
     *     @type \Rv\Data\Media $element
     *     @type int $layer_type
     *     @type bool $always_retrigger
     *     @type array<\Rv\Data\Action\MediaType\PlaybackMarker>|\Google\Protobuf\Internal\RepeatedField $markers
     *     @type \Rv\Data\Action\MediaType\Image $image
     *     @type \Rv\Data\Action\MediaType\Video $video
     *     @type \Rv\Data\Action\MediaType\Audio $audio
     *     @type \Rv\Data\Action\MediaType\LiveVideo $live_video
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Action::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    public function hasSelectedEffectPresetUuid()
    {
        return isset($this->selected_effect_preset_uuid);
    }

    public function clearSelectedEffectPresetUuid()
    {
        unset($this->selected_effect_preset_uuid);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Transition transition = 3;</code>
     * @return \Rv\Data\Transition|null
     */
    public function getTransition()
    {
        return $this->transition;
    }

    public function hasTransition()
    {
        return isset($this->transition);
    }

    public function clearTransition()
    {
        unset($this->transition);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Effect effects = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEffects()
    {
        return $this->effects;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Media element = 5;</code>
     * @return \Rv\Data\Media|null
     */
    public function getElement()
    {
        return $this->element;
    }

    public function hasElement()
    {
        return isset($this->element);
    }

    public function clearElement()
    {
        unset($this->element);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.LayerType layer_type = 10;</code>
     * @return int
     */
    public function getLayerType()
    {
        return $this->layer_type;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.LayerType layer_type = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setLayerType($var)
    {
        GPBUtil::checkEnum($var, \Rv\Data\Action\LayerType::class);
        $this->layer_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool always_retrigger = 11;</code>
     * @return bool
     */
    public function getAlwaysRetrigger()
    {
        return $this->always_retrigger;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Action.MediaType.PlaybackMarker markers = 12;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMarkers()
    {
        return $this->markers;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.MediaType.Image image = 6;</code>
     * @return \Rv\Data\Action\MediaType\Image|null
     */
    public function getImage()
    {
        return $this->readOneof(6);
    }

    public function hasImage()
    {
        return $this->hasOneof(6);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.MediaType.Image image = 6;</code>
     * @param \Rv\Data\Action\MediaType\Image $var
     * @return $this
     */
    public function setImage($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\MediaType\Image::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.MediaType.Video video = 7;</code>
     * @return \Rv\Data\Action\MediaType\Video|null
     */
    public function getVideo()
    {
        return $this->readOneof(7);
    }

    public function hasVideo()
    {
        return $this->hasOneof(7);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.MediaType.Video video = 7;</code>
     * @param \Rv\Data\Action\MediaType\Video $var
     * @return $this
     */
    public function setVideo($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\MediaType\Video::class);
        $this->writeOneof(7, $var);

        return $this;
    }

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

    public function hasAudio()
    {
        return $this->hasOneof(8);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.MediaType.LiveVideo live_video = 9;</code>
     * @return \Rv\Data\Action\MediaType\LiveVideo|null
     */
    public function getLiveVideo()
    {
        return $this->readOneof(9);
    }

    public function hasLiveVideo()
    {
        return $this->hasOneof(9);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action.MediaType.LiveVideo live_video = 9;</code>
     * @param \Rv\Data\Action\MediaType\LiveVideo $var
     * @return $this
     */
    public function setLiveVideo($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action\MediaType\LiveVideo::class);
        $this->writeOneof(9, $var);

        return $this;
    }

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

}

