<?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;

/**
 * A top-level description of an API.
 * Produced by producers and are commitments to provide services.
 *
 * Generated from protobuf message <code>google.cloud.apigeeregistry.v1.Api</code>
 */
class Api extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Human-meaningful name.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     */
    protected $display_name = '';
    /**
     * A detailed description.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     */
    protected $description = '';
    /**
     * Output only. Creation timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $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>
     */
    protected $update_time = null;
    /**
     * A user-definable description of the availability of this service.
     * Format: free-form, but we expect single words that describe availability,
     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
     *
     * Generated from protobuf field <code>string availability = 6;</code>
     */
    protected $availability = '';
    /**
     * The recommended version of the API.
     * Format: `apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>string recommended_version = 7 [(.google.api.resource_reference) = {</code>
     */
    protected $recommended_version = '';
    /**
     * The recommended deployment of the API.
     * Format: `apis/{api}/deployments/{deployment}`
     *
     * Generated from protobuf field <code>string recommended_deployment = 8 [(.google.api.resource_reference) = {</code>
     */
    protected $recommended_deployment = '';
    /**
     * 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 = 9;</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 = 10;</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 $availability
     *           A user-definable description of the availability of this service.
     *           Format: free-form, but we expect single words that describe availability,
     *           e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
     *     @type string $recommended_version
     *           The recommended version of the API.
     *           Format: `apis/{api}/versions/{version}`
     *     @type string $recommended_deployment
     *           The recommended deployment of the API.
     *           Format: `apis/{api}/deployments/{deployment}`
     *     @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 availability of this service.
     * Format: free-form, but we expect single words that describe availability,
     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
     *
     * Generated from protobuf field <code>string availability = 6;</code>
     * @return string
     */
    public function getAvailability()
    {
        return $this->availability;
    }

    /**
     * A user-definable description of the availability of this service.
     * Format: free-form, but we expect single words that describe availability,
     * e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
     *
     * Generated from protobuf field <code>string availability = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setAvailability($var)
    {
        GPBUtil::checkString($var, True);
        $this->availability = $var;

        return $this;
    }

    /**
     * The recommended version of the API.
     * Format: `apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>string recommended_version = 7 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getRecommendedVersion()
    {
        return $this->recommended_version;
    }

    /**
     * The recommended version of the API.
     * Format: `apis/{api}/versions/{version}`
     *
     * Generated from protobuf field <code>string recommended_version = 7 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setRecommendedVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->recommended_version = $var;

        return $this;
    }

    /**
     * The recommended deployment of the API.
     * Format: `apis/{api}/deployments/{deployment}`
     *
     * Generated from protobuf field <code>string recommended_deployment = 8 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getRecommendedDeployment()
    {
        return $this->recommended_deployment;
    }

    /**
     * The recommended deployment of the API.
     * Format: `apis/{api}/deployments/{deployment}`
     *
     * Generated from protobuf field <code>string recommended_deployment = 8 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setRecommendedDeployment($var)
    {
        GPBUtil::checkString($var, True);
        $this->recommended_deployment = $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 = 9;</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 = 9;</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 = 10;</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 = 10;</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;
    }

}

