<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: proApiV1Preroll.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.API_v1_Preroll_Request</code>
 */
class API_v1_Preroll_Request extends \Google\Protobuf\Internal\Message
{
    protected $Request;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollCue $preroll_cue
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollPlaylistItem $preroll_playlist_item
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollMediaItem $preroll_media_item
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollAudioItem $preroll_audio_item
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollVideoInput $preroll_video_input
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollLibraryItem $preroll_library_item
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollNext $preroll_next
     *     @type \Rv\Data\API_v1_Preroll_Request\PrerollPrevious $preroll_previous
     *     @type \Rv\Data\API_v1_Preroll_Request\ActivatePrerollItem $activate_preroll_item
     *     @type \Rv\Data\API_v1_Preroll_Request\CancelPrerollItem $cancel_preroll_item
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ProApiV1Preroll::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollCue preroll_cue = 1;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollCue|null
     */
    public function getPrerollCue()
    {
        return $this->readOneof(1);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollPlaylistItem preroll_playlist_item = 2;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollPlaylistItem|null
     */
    public function getPrerollPlaylistItem()
    {
        return $this->readOneof(2);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollMediaItem preroll_media_item = 3;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollMediaItem|null
     */
    public function getPrerollMediaItem()
    {
        return $this->readOneof(3);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollAudioItem preroll_audio_item = 4;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollAudioItem|null
     */
    public function getPrerollAudioItem()
    {
        return $this->readOneof(4);
    }

    public function hasPrerollAudioItem()
    {
        return $this->hasOneof(4);
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollAudioItem preroll_audio_item = 4;</code>
     * @param \Rv\Data\API_v1_Preroll_Request\PrerollAudioItem $var
     * @return $this
     */
    public function setPrerollAudioItem($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_Preroll_Request\PrerollAudioItem::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollVideoInput preroll_video_input = 5;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollVideoInput|null
     */
    public function getPrerollVideoInput()
    {
        return $this->readOneof(5);
    }

    public function hasPrerollVideoInput()
    {
        return $this->hasOneof(5);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollLibraryItem preroll_library_item = 6;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollLibraryItem|null
     */
    public function getPrerollLibraryItem()
    {
        return $this->readOneof(6);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollNext preroll_next = 7;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollNext|null
     */
    public function getPrerollNext()
    {
        return $this->readOneof(7);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.PrerollPrevious preroll_previous = 8;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\PrerollPrevious|null
     */
    public function getPrerollPrevious()
    {
        return $this->readOneof(8);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.ActivatePrerollItem activate_preroll_item = 9;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\ActivatePrerollItem|null
     */
    public function getActivatePrerollItem()
    {
        return $this->readOneof(9);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.CancelPrerollItem cancel_preroll_item = 10;</code>
     * @return \Rv\Data\API_v1_Preroll_Request\CancelPrerollItem|null
     */
    public function getCancelPrerollItem()
    {
        return $this->readOneof(10);
    }

    public function hasCancelPrerollItem()
    {
        return $this->hasOneof(10);
    }

    /**
     * Generated from protobuf field <code>.rv.data.API_v1_Preroll_Request.CancelPrerollItem cancel_preroll_item = 10;</code>
     * @param \Rv\Data\API_v1_Preroll_Request\CancelPrerollItem $var
     * @return $this
     */
    public function setCancelPrerollItem($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\API_v1_Preroll_Request\CancelPrerollItem::class);
        $this->writeOneof(10, $var);

        return $this;
    }

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

}

