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

namespace Google\Cloud\PubSub\V1\PushConfig;

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

/**
 * Sets the `data` field as the HTTP body for delivery.
 *
 * Generated from protobuf message <code>google.pubsub.v1.PushConfig.NoWrapper</code>
 */
class NoWrapper extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. When true, writes the Pub/Sub message metadata to
     * `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
     * Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
     *
     * Generated from protobuf field <code>bool write_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $write_metadata = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $write_metadata
     *           Optional. When true, writes the Pub/Sub message metadata to
     *           `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
     *           Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. When true, writes the Pub/Sub message metadata to
     * `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
     * Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
     *
     * Generated from protobuf field <code>bool write_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getWriteMetadata()
    {
        return $this->write_metadata;
    }

    /**
     * Optional. When true, writes the Pub/Sub message metadata to
     * `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
     * Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
     *
     * Generated from protobuf field <code>bool write_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setWriteMetadata($var)
    {
        GPBUtil::checkBool($var);
        $this->write_metadata = $var;

        return $this;
    }

}

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

