<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: apache/rocketmq/v2/definition.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.SubscriptionEntry</code>
 */
class SubscriptionEntry extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.apache.rocketmq.v2.Resource topic = 1;</code>
     */
    protected $topic = null;
    /**
     * Generated from protobuf field <code>.apache.rocketmq.v2.FilterExpression expression = 2;</code>
     */
    protected $expression = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Apache\Rocketmq\V2\Resource $topic
     *     @type \Apache\Rocketmq\V2\FilterExpression $expression
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Apache\Rocketmq\V2\Definition::initOnce();
        parent::__construct($data);
    }

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

    public function hasTopic()
    {
        return isset($this->topic);
    }

    public function clearTopic()
    {
        unset($this->topic);
    }

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

        return $this;
    }

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

    public function hasExpression()
    {
        return isset($this->expression);
    }

    public function clearExpression()
    {
        unset($this->expression);
    }

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

        return $this;
    }

}

