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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * The response message for
 * [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.EnvironmentHistory</code>
 */
class EnvironmentHistory extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of the environment this history is for.
     * Supported formats:
     * - `projects/<Project ID>/agent/environments/<Environment ID>`
     * - `projects/<Project ID>/locations/<Location
     *    ID>/agent/environments/<Environment ID>`
     * The environment ID for the default environment is `-`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $parent = '';
    /**
     * Output only. The list of agent environments. There will be a maximum number
     * of items returned based on the page_size field in the request.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $entries;
    /**
     * Output only. Token to retrieve the next page of results, or empty if there
     * are no more results in the list.
     *
     * Generated from protobuf field <code>string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Output only. The name of the environment this history is for.
     *           Supported formats:
     *           - `projects/<Project ID>/agent/environments/<Environment ID>`
     *           - `projects/<Project ID>/locations/<Location
     *              ID>/agent/environments/<Environment ID>`
     *           The environment ID for the default environment is `-`.
     *     @type array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $entries
     *           Output only. The list of agent environments. There will be a maximum number
     *           of items returned based on the page_size field in the request.
     *     @type string $next_page_token
     *           Output only. Token to retrieve the next page of results, or empty if there
     *           are no more results in the list.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Environment::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The name of the environment this history is for.
     * Supported formats:
     * - `projects/<Project ID>/agent/environments/<Environment ID>`
     * - `projects/<Project ID>/locations/<Location
     *    ID>/agent/environments/<Environment ID>`
     * The environment ID for the default environment is `-`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Output only. The name of the environment this history is for.
     * Supported formats:
     * - `projects/<Project ID>/agent/environments/<Environment ID>`
     * - `projects/<Project ID>/locations/<Location
     *    ID>/agent/environments/<Environment ID>`
     * The environment ID for the default environment is `-`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Output only. The list of agent environments. There will be a maximum number
     * of items returned based on the page_size field in the request.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEntries()
    {
        return $this->entries;
    }

    /**
     * Output only. The list of agent environments. There will be a maximum number
     * of items returned based on the page_size field in the request.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.EnvironmentHistory.Entry entries = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEntries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EnvironmentHistory\Entry::class);
        $this->entries = $arr;

        return $this;
    }

    /**
     * Output only. Token to retrieve the next page of results, or empty if there
     * are no more results in the list.
     *
     * Generated from protobuf field <code>string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * Output only. Token to retrieve the next page of results, or empty if there
     * are no more results in the list.
     *
     * Generated from protobuf field <code>string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}

