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

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\API_v1_Message_Request\Messages $messages
     *     @type \Rv\Data\API_v1_Message_Request\CreateMessage $create_message
     *     @type \Rv\Data\API_v1_Message_Request\GetMessage $get_message
     *     @type \Rv\Data\API_v1_Message_Request\PutMessage $put_message
     *     @type \Rv\Data\API_v1_Message_Request\DeleteMessage $delete_message
     *     @type \Rv\Data\API_v1_Message_Request\TriggerMessage $trigger_message
     *     @type \Rv\Data\API_v1_Message_Request\ClearMessage $clear_message
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ProApiV1Message::initOnce();
        parent::__construct($data);
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

}

