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

namespace Google\Cloud\AdvisoryNotifications\V1\Message;

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

/**
 * A message body containing text.
 *
 * Generated from protobuf message <code>google.cloud.advisorynotifications.v1.Message.Body</code>
 */
class Body extends \Google\Protobuf\Internal\Message
{
    /**
     * The text content of the message body.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.Text text = 1;</code>
     */
    protected $text = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AdvisoryNotifications\V1\Text $text
     *           The text content of the message body.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Advisorynotifications\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The text content of the message body.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.Text text = 1;</code>
     * @return \Google\Cloud\AdvisoryNotifications\V1\Text|null
     */
    public function getText()
    {
        return $this->text;
    }

    public function hasText()
    {
        return isset($this->text);
    }

    public function clearText()
    {
        unset($this->text);
    }

    /**
     * The text content of the message body.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.Text text = 1;</code>
     * @param \Google\Cloud\AdvisoryNotifications\V1\Text $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AdvisoryNotifications\V1\Text::class);
        $this->text = $var;

        return $this;
    }

}


