<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: apache/rocketmq/v2/service.proto

namespace Apache\Rocketmq\V2;

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

/**
 * Generated from protobuf message <code>apache.rocketmq.v2.ReceiveMessageResponse</code>
 */
class ReceiveMessageResponse extends \Google\Protobuf\Internal\Message
{
    protected $content;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Apache\Rocketmq\V2\Status $status
     *     @type \Apache\Rocketmq\V2\Message $message
     *     @type \Google\Protobuf\Timestamp $delivery_timestamp
     *           The timestamp that brokers start to deliver status line or message.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Apache\Rocketmq\V2\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.apache.rocketmq.v2.Status status = 1;</code>
     * @return \Apache\Rocketmq\V2\Status|null
     */
    public function getStatus()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.apache.rocketmq.v2.Status status = 1;</code>
     * @param \Apache\Rocketmq\V2\Status $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkMessage($var, \Apache\Rocketmq\V2\Status::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.apache.rocketmq.v2.Message message = 2;</code>
     * @return \Apache\Rocketmq\V2\Message|null
     */
    public function getMessage()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Generated from protobuf field <code>.apache.rocketmq.v2.Message message = 2;</code>
     * @param \Apache\Rocketmq\V2\Message $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkMessage($var, \Apache\Rocketmq\V2\Message::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The timestamp that brokers start to deliver status line or message.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delivery_timestamp = 3;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDeliveryTimestamp()
    {
        return $this->readOneof(3);
    }

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

    /**
     * The timestamp that brokers start to deliver status line or message.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delivery_timestamp = 3;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDeliveryTimestamp($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

