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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Context of the conversation, including transcripts.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.ConversationContext</code>
 */
class ConversationContext extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. List of message transcripts in the conversation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.MessageEntry message_entries = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $message_entries;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dialogflow\V2\MessageEntry>|\Google\Protobuf\Internal\RepeatedField $message_entries
     *           Optional. List of message transcripts in the conversation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. List of message transcripts in the conversation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.MessageEntry message_entries = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMessageEntries()
    {
        return $this->message_entries;
    }

    /**
     * Optional. List of message transcripts in the conversation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.MessageEntry message_entries = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Dialogflow\V2\MessageEntry>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMessageEntries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\MessageEntry::class);
        $this->message_entries = $arr;

        return $this;
    }

}

