<?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_Response</code>
 */
class API_v1_Preroll_Response extends \Google\Protobuf\Internal\Message
{
    protected $Response;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\API_v1_Preroll_Response\PrerollReady $preroll_ready
     *     @type \Rv\Data\API_v1_Preroll_Response\ActivatePrerollItem $activate_preroll_item
     *     @type \Rv\Data\API_v1_Preroll_Response\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_Response.PrerollReady preroll_ready = 1;</code>
     * @return \Rv\Data\API_v1_Preroll_Response\PrerollReady|null
     */
    public function getPrerollReady()
    {
        return $this->readOneof(1);
    }

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

}

