<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/apigeeregistry/v1/registry_models.proto

namespace Google\Cloud\ApigeeRegistry\V1;

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

/**
 * Describes a particular version of an API.
 * ApiVersions are what consumers actually use.
 *
 * Generated from protobuf message <code>google.cloud.apigeeregistry.v1.ApiVersion</code>
 */
class ApiVersion extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Human-meaningful name.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     */
    private $display_name = '';
    /**
     * A detailed description.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     */
    private $description = '';
    /**
     * Output only. Creation timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. Last update timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * A user-definable description of the lifecycle phase of this API version.
     * Format: free-form, but we expect single words that describe API maturity,
     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
     * "DEPRECATED", "RETIRED".
     *
     * Generated from protobuf field <code>string state = 6;</code>
     */
    private $state = '';
    /**
     * Labels attach identifying metadata to resources. Identifying metadata can
     * be used to filter list operations.
     * Label keys and values can be no longer than 64 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * No more than 64 user labels can be associated with one resource (System
     * labels are excluded).
     * See https://goo.gl/xmQnxf for more information and examples of labels.
     * System reserved label keys are prefixed with
     * `apigeeregistry.googleapis.com/` and cannot be changed.
     *
     * Generated from protobuf field <code>map<string, string> labels = 7;</code>
     */
    private $labels;
    /**
     * Annotations attach non-identifying metadata to resources.
     * Annotation keys and values are less restricted than those of labels, but
     * should be generally used for small values of broad interest. Larger, topic-
     * specific metadata should be stored in Artifacts.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 8;</code>
     */
    private $annotations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Resource name.
     *     @type string $display_name
     *           Human-meaningful name.
     *     @type string $description
     *           A detailed description.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Creation timestamp.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Last update timestamp.
     *     @type string $state
     *           A user-definable description of the lifecycle phase of this API version.
     *           Format: free-form, but we expect single words that describe API maturity,
     *           e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
     *           "DEPRECATED", "RETIRED".
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Labels attach identifying metadata to resources. Identifying metadata can
     *           be used to filter list operations.
     *           Label keys and values can be no longer than 64 characters
     *           (Unicode codepoints), can only contain lowercase letters, numeric
     *           characters, underscores and dashes. International characters are allowed.
     *           No more than 64 user labels can be associated with one resource (System
     *           labels are excluded).
     *           See https://goo.gl/xmQnxf for more information and examples of labels.
     *           System reserved label keys are prefixed with
     *           `apigeeregistry.googleapis.com/` and cannot be changed.
     *     @type array|\Google\Protobuf\Internal\MapField $annotations
     *           Annotations attach non-identifying metadata to resources.
     *           Annotation keys and values are less restricted than those of labels, but
     *           should be generally used for small values of broad interest. Larger, topic-
     *           specific metadata should be stored in Artifacts.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apigeeregistry\V1\RegistryModels::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Human-meaningful name.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Human-meaningful name.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * A detailed description.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * A detailed description.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. Creation timestamp.
     *
     * 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. Creation timestamp.
     *
     * 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. Last update timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Last update timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * A user-definable description of the lifecycle phase of this API version.
     * Format: free-form, but we expect single words that describe API maturity,
     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
     * "DEPRECATED", "RETIRED".
     *
     * Generated from protobuf field <code>string state = 6;</code>
     * @return string
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * A user-definable description of the lifecycle phase of this API version.
     * Format: free-form, but we expect single words that describe API maturity,
     * e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
     * "DEPRECATED", "RETIRED".
     *
     * Generated from protobuf field <code>string state = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkString($var, True);
        $this->state = $var;

        return $this;
    }

    /**
     * Labels attach identifying metadata to resources. Identifying metadata can
     * be used to filter list operations.
     * Label keys and values can be no longer than 64 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * No more than 64 user labels can be associated with one resource (System
     * labels are excluded).
     * See https://goo.gl/xmQnxf for more information and examples of labels.
     * System reserved label keys are prefixed with
     * `apigeeregistry.googleapis.com/` and cannot be changed.
     *
     * Generated from protobuf field <code>map<string, string> labels = 7;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Labels attach identifying metadata to resources. Identifying metadata can
     * be used to filter list operations.
     * Label keys and values can be no longer than 64 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * No more than 64 user labels can be associated with one resource (System
     * labels are excluded).
     * See https://goo.gl/xmQnxf for more information and examples of labels.
     * System reserved label keys are prefixed with
     * `apigeeregistry.googleapis.com/` and cannot be changed.
     *
     * Generated from protobuf field <code>map<string, string> labels = 7;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Annotations attach non-identifying metadata to resources.
     * Annotation keys and values are less restricted than those of labels, but
     * should be generally used for small values of broad interest. Larger, topic-
     * specific metadata should be stored in Artifacts.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 8;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAnnotations()
    {
        return $this->annotations;
    }

    /**
     * Annotations attach non-identifying metadata to resources.
     * Annotation keys and values are less restricted than those of labels, but
     * should be generally used for small values of broad interest. Larger, topic-
     * specific metadata should be stored in Artifacts.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 8;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAnnotations($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->annotations = $arr;

        return $this;
    }

}

