<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\Message\InteractiveResponseMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.InteractiveResponseMessage.Body</code>
 */
class Body extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string text = 1;</code>
     */
    protected $text = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.InteractiveResponseMessage.Body.Format format = 2;</code>
     */
    protected $format = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $text
     *     @type int $format
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string text = 1;</code>
     * @return string
     */
    public function getText()
    {
        return isset($this->text) ? $this->text : '';
    }

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

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

    /**
     * Generated from protobuf field <code>optional string text = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.InteractiveResponseMessage.Body.Format format = 2;</code>
     * @return int
     */
    public function getFormat()
    {
        return isset($this->format) ? $this->format : 0;
    }

    public function hasFormat()
    {
        return isset($this->format);
    }

    public function clearFormat()
    {
        unset($this->format);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.InteractiveResponseMessage.Body.Format format = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setFormat($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\InteractiveResponseMessage\Body\Format::class);
        $this->format = $var;

        return $this;
    }

}

