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

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Analytics\Trigger\Cue $cue
     *     @type \Rv\Analytics\Trigger\Action $action
     *     @type \Rv\Analytics\Trigger\MediaBin $media_bin
     *     @type \Rv\Analytics\Trigger\AudioBin $audio_bin
     *     @type \Rv\Analytics\Trigger\TestPattern $test_pattern
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\AnalyticsTrigger::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.analytics.Trigger.Cue cue = 1;</code>
     * @return \Rv\Analytics\Trigger\Cue|null
     */
    public function getCue()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.rv.analytics.Trigger.Cue cue = 1;</code>
     * @param \Rv\Analytics\Trigger\Cue $var
     * @return $this
     */
    public function setCue($var)
    {
        GPBUtil::checkMessage($var, \Rv\Analytics\Trigger\Cue::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

}

