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

namespace Rv\Analytics;

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

/**
 * Generated from protobuf message <code>rv.analytics.TriggerMediaInformation</code>
 */
class TriggerMediaInformation extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.SourceType source_type = 1;</code>
     */
    protected $source_type = 0;
    protected $MediaType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $source_type
     *     @type \Rv\Analytics\TriggerMediaInformation\Video $video
     *     @type \Rv\Analytics\TriggerMediaInformation\Image $image
     *     @type \Rv\Analytics\TriggerMediaInformation\Audio $audio
     *     @type \Rv\Analytics\TriggerMediaInformation\LiveVideo $live_video
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\AnalyticsTriggerMedia::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.SourceType source_type = 1;</code>
     * @return int
     */
    public function getSourceType()
    {
        return $this->source_type;
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.SourceType source_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSourceType($var)
    {
        GPBUtil::checkEnum($var, \Rv\Analytics\TriggerMediaInformation\SourceType::class);
        $this->source_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.Video video = 2;</code>
     * @return \Rv\Analytics\TriggerMediaInformation\Video|null
     */
    public function getVideo()
    {
        return $this->readOneof(2);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.Image image = 3;</code>
     * @return \Rv\Analytics\TriggerMediaInformation\Image|null
     */
    public function getImage()
    {
        return $this->readOneof(3);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.Audio audio = 4;</code>
     * @return \Rv\Analytics\TriggerMediaInformation\Audio|null
     */
    public function getAudio()
    {
        return $this->readOneof(4);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.TriggerMediaInformation.LiveVideo live_video = 5;</code>
     * @return \Rv\Analytics\TriggerMediaInformation\LiveVideo|null
     */
    public function getLiveVideo()
    {
        return $this->readOneof(5);
    }

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

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

        return $this;
    }

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

}

