<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/intent.proto

namespace Google\Cloud\Dialogflow\V2\Intent\Message;

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

/**
 * The text response message.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Intent.Message.Text</code>
 */
class Text extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The collection of the agent's responses.
     *
     * Generated from protobuf field <code>repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $text;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $text
     *           Optional. The collection of the agent's responses.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The collection of the agent's responses.
     *
     * Generated from protobuf field <code>repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Optional. The collection of the agent's responses.
     *
     * Generated from protobuf field <code>repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setText($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->text = $arr;

        return $this;
    }

}


