<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/pubsub/v1/pubsub.proto

namespace Google\Cloud\PubSub\V1\StreamingPullResponse;

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

/**
 * Subscription properties sent as part of the response.
 *
 * Generated from protobuf message <code>google.pubsub.v1.StreamingPullResponse.SubscriptionProperties</code>
 */
class SubscriptionProperties extends \Google\Protobuf\Internal\Message
{
    /**
     * True iff message ordering is enabled for this subscription.
     *
     * Generated from protobuf field <code>bool message_ordering_enabled = 2;</code>
     */
    private $message_ordering_enabled = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $message_ordering_enabled
     *           True iff message ordering is enabled for this subscription.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
        parent::__construct($data);
    }

    /**
     * True iff message ordering is enabled for this subscription.
     *
     * Generated from protobuf field <code>bool message_ordering_enabled = 2;</code>
     * @return bool
     */
    public function getMessageOrderingEnabled()
    {
        return $this->message_ordering_enabled;
    }

    /**
     * True iff message ordering is enabled for this subscription.
     *
     * Generated from protobuf field <code>bool message_ordering_enabled = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setMessageOrderingEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->message_ordering_enabled = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SubscriptionProperties::class, \Google\Cloud\PubSub\V1\StreamingPullResponse_SubscriptionProperties::class);

