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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * You can create multiple versions of your agent and publish them to separate
 * environments.
 * When you edit an agent, you are editing the draft agent. At any point, you
 * can save the draft agent as an agent version, which is an immutable snapshot
 * of your agent.
 * When you save the draft agent, it is published to the default environment.
 * When you create agent versions, you can publish them to custom environments.
 * You can create a variety of custom environments for:
 * - testing
 * - development
 * - production
 * - etc.
 * For more information, see the [versions and environments
 * guide](https://cloud.google.com/dialogflow/docs/agents-versions).
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Version</code>
 */
class Version extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The unique identifier of this agent version.
     * Supported formats:
     * - `projects/<Project ID>/agent/versions/<Version ID>`
     * - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
     *   ID>`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = '';
    /**
     * Optional. The developer-provided description of this version.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Output only. The sequential number of this version. This field is read-only
     * which means it cannot be set by create and update methods.
     *
     * Generated from protobuf field <code>int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $version_number = 0;
    /**
     * Output only. The creation time of this version. This field is read-only,
     * i.e., it cannot be set by create and update methods.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The status of this version. This field is read-only and cannot
     * be set by create and update methods.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The unique identifier of this agent version.
     *           Supported formats:
     *           - `projects/<Project ID>/agent/versions/<Version ID>`
     *           - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
     *             ID>`
     *     @type string $description
     *           Optional. The developer-provided description of this version.
     *     @type int $version_number
     *           Output only. The sequential number of this version. This field is read-only
     *           which means it cannot be set by create and update methods.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The creation time of this version. This field is read-only,
     *           i.e., it cannot be set by create and update methods.
     *     @type int $status
     *           Output only. The status of this version. This field is read-only and cannot
     *           be set by create and update methods.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Version::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The unique identifier of this agent version.
     * Supported formats:
     * - `projects/<Project ID>/agent/versions/<Version ID>`
     * - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
     *   ID>`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The unique identifier of this agent version.
     * Supported formats:
     * - `projects/<Project ID>/agent/versions/<Version ID>`
     * - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
     *   ID>`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. The developer-provided description of this version.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. The developer-provided description of this version.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. The sequential number of this version. This field is read-only
     * which means it cannot be set by create and update methods.
     *
     * Generated from protobuf field <code>int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getVersionNumber()
    {
        return $this->version_number;
    }

    /**
     * Output only. The sequential number of this version. This field is read-only
     * which means it cannot be set by create and update methods.
     *
     * Generated from protobuf field <code>int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setVersionNumber($var)
    {
        GPBUtil::checkInt32($var);
        $this->version_number = $var;

        return $this;
    }

    /**
     * Output only. The creation time of this version. This field is read-only,
     * i.e., it cannot be set by create and update methods.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The creation time of this version. This field is read-only,
     * i.e., it cannot be set by create and update methods.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The status of this version. This field is read-only and cannot
     * be set by create and update methods.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Output only. The status of this version. This field is read-only and cannot
     * be set by create and update methods.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Version\VersionStatus::class);
        $this->status = $var;

        return $this;
    }

}

