<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/discoveryengine/v1beta/conversation.proto

namespace Google\Cloud\DiscoveryEngine\V1beta;

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

/**
 * Defines a reply message to user.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1beta.Reply</code>
 */
class Reply extends \Google\Protobuf\Internal\Message
{
    /**
     * Text reply.
     *
     * Generated from protobuf field <code>string reply = 1;</code>
     */
    protected $reply = '';
    /**
     * References in the reply.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1beta.Reply.Reference references = 2;</code>
     */
    private $references;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $reply
     *           Text reply.
     *     @type array<\Google\Cloud\DiscoveryEngine\V1beta\Reply\Reference>|\Google\Protobuf\Internal\RepeatedField $references
     *           References in the reply.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Text reply.
     *
     * Generated from protobuf field <code>string reply = 1;</code>
     * @return string
     */
    public function getReply()
    {
        return $this->reply;
    }

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

        return $this;
    }

    /**
     * References in the reply.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1beta.Reply.Reference references = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getReferences()
    {
        return $this->references;
    }

    /**
     * References in the reply.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1beta.Reply.Reference references = 2;</code>
     * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Reply\Reference>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setReferences($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Reply\Reference::class);
        $this->references = $arr;

        return $this;
    }

}

