<?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 service running at particular address that
 * provides a particular version of an API. ApiDeployments have revisions which
 * correspond to different configurations of a single deployment in time.
 * Revision identifiers should be updated whenever the served API spec or
 * endpoint address changes.
 *
 * Generated from protobuf message <code>google.cloud.apigeeregistry.v1.ApiDeployment</code>
 */
class ApiDeployment 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. Immutable. The revision ID of the deployment.
     * A new revision is committed whenever the deployment contents are changed.
     * The format is an 8-character hexadecimal string.
     *
     * Generated from protobuf field <code>string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $revision_id = '';
    /**
     * Output only. Creation timestamp; when the deployment resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. Revision creation timestamp; when the represented revision was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $revision_create_time = null;
    /**
     * Output only. Last update timestamp: when the represented revision was last modified.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $revision_update_time = null;
    /**
     * The full resource name (including revision ID) of the spec of the API being
     * served by the deployment. Changes to this value will update the revision.
     * Format: `apis/{api}/deployments/{deployment}`
     *
     * Generated from protobuf field <code>string api_spec_revision = 8 [(.google.api.resource_reference) = {</code>
     */
    private $api_spec_revision = '';
    /**
     * The address where the deployment is serving. Changes to this value will
     * update the revision.
     *
     * Generated from protobuf field <code>string endpoint_uri = 9;</code>
     */
    private $endpoint_uri = '';
    /**
     * The address of the external channel of the API (e.g., the Developer
     * Portal). Changes to this value will not affect the revision.
     *
     * Generated from protobuf field <code>string external_channel_uri = 10;</code>
     */
    private $external_channel_uri = '';
    /**
     * Text briefly identifying the intended audience of the API. Changes to this
     * value will not affect the revision.
     *
     * Generated from protobuf field <code>string intended_audience = 11;</code>
     */
    private $intended_audience = '';
    /**
     * Text briefly describing how to access the endpoint. Changes to this value
     * will not affect the revision.
     *
     * Generated from protobuf field <code>string access_guidance = 12;</code>
     */
    private $access_guidance = '';
    /**
     * 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 = 14;</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 = 15;</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 string $revision_id
     *           Output only. Immutable. The revision ID of the deployment.
     *           A new revision is committed whenever the deployment contents are changed.
     *           The format is an 8-character hexadecimal string.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Creation timestamp; when the deployment resource was created.
     *     @type \Google\Protobuf\Timestamp $revision_create_time
     *           Output only. Revision creation timestamp; when the represented revision was created.
     *     @type \Google\Protobuf\Timestamp $revision_update_time
     *           Output only. Last update timestamp: when the represented revision was last modified.
     *     @type string $api_spec_revision
     *           The full resource name (including revision ID) of the spec of the API being
     *           served by the deployment. Changes to this value will update the revision.
     *           Format: `apis/{api}/deployments/{deployment}`
     *     @type string $endpoint_uri
     *           The address where the deployment is serving. Changes to this value will
     *           update the revision.
     *     @type string $external_channel_uri
     *           The address of the external channel of the API (e.g., the Developer
     *           Portal). Changes to this value will not affect the revision.
     *     @type string $intended_audience
     *           Text briefly identifying the intended audience of the API. Changes to this
     *           value will not affect the revision.
     *     @type string $access_guidance
     *           Text briefly describing how to access the endpoint. Changes to this value
     *           will not affect the revision.
     *     @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. Immutable. The revision ID of the deployment.
     * A new revision is committed whenever the deployment contents are changed.
     * The format is an 8-character hexadecimal string.
     *
     * Generated from protobuf field <code>string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getRevisionId()
    {
        return $this->revision_id;
    }

    /**
     * Output only. Immutable. The revision ID of the deployment.
     * A new revision is committed whenever the deployment contents are changed.
     * The format is an 8-character hexadecimal string.
     *
     * Generated from protobuf field <code>string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setRevisionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->revision_id = $var;

        return $this;
    }

    /**
     * Output only. Creation timestamp; when the deployment resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.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; when the deployment resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.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. Revision creation timestamp; when the represented revision was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getRevisionCreateTime()
    {
        return $this->revision_create_time;
    }

    public function hasRevisionCreateTime()
    {
        return isset($this->revision_create_time);
    }

    public function clearRevisionCreateTime()
    {
        unset($this->revision_create_time);
    }

    /**
     * Output only. Revision creation timestamp; when the represented revision was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setRevisionCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->revision_create_time = $var;

        return $this;
    }

    /**
     * Output only. Last update timestamp: when the represented revision was last modified.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getRevisionUpdateTime()
    {
        return $this->revision_update_time;
    }

    public function hasRevisionUpdateTime()
    {
        return isset($this->revision_update_time);
    }

    public function clearRevisionUpdateTime()
    {
        unset($this->revision_update_time);
    }

    /**
     * Output only. Last update timestamp: when the represented revision was last modified.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp revision_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setRevisionUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->revision_update_time = $var;

        return $this;
    }

    /**
     * The full resource name (including revision ID) of the spec of the API being
     * served by the deployment. Changes to this value will update the revision.
     * Format: `apis/{api}/deployments/{deployment}`
     *
     * Generated from protobuf field <code>string api_spec_revision = 8 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getApiSpecRevision()
    {
        return $this->api_spec_revision;
    }

    /**
     * The full resource name (including revision ID) of the spec of the API being
     * served by the deployment. Changes to this value will update the revision.
     * Format: `apis/{api}/deployments/{deployment}`
     *
     * Generated from protobuf field <code>string api_spec_revision = 8 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setApiSpecRevision($var)
    {
        GPBUtil::checkString($var, True);
        $this->api_spec_revision = $var;

        return $this;
    }

    /**
     * The address where the deployment is serving. Changes to this value will
     * update the revision.
     *
     * Generated from protobuf field <code>string endpoint_uri = 9;</code>
     * @return string
     */
    public function getEndpointUri()
    {
        return $this->endpoint_uri;
    }

    /**
     * The address where the deployment is serving. Changes to this value will
     * update the revision.
     *
     * Generated from protobuf field <code>string endpoint_uri = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setEndpointUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->endpoint_uri = $var;

        return $this;
    }

    /**
     * The address of the external channel of the API (e.g., the Developer
     * Portal). Changes to this value will not affect the revision.
     *
     * Generated from protobuf field <code>string external_channel_uri = 10;</code>
     * @return string
     */
    public function getExternalChannelUri()
    {
        return $this->external_channel_uri;
    }

    /**
     * The address of the external channel of the API (e.g., the Developer
     * Portal). Changes to this value will not affect the revision.
     *
     * Generated from protobuf field <code>string external_channel_uri = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setExternalChannelUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->external_channel_uri = $var;

        return $this;
    }

    /**
     * Text briefly identifying the intended audience of the API. Changes to this
     * value will not affect the revision.
     *
     * Generated from protobuf field <code>string intended_audience = 11;</code>
     * @return string
     */
    public function getIntendedAudience()
    {
        return $this->intended_audience;
    }

    /**
     * Text briefly identifying the intended audience of the API. Changes to this
     * value will not affect the revision.
     *
     * Generated from protobuf field <code>string intended_audience = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setIntendedAudience($var)
    {
        GPBUtil::checkString($var, True);
        $this->intended_audience = $var;

        return $this;
    }

    /**
     * Text briefly describing how to access the endpoint. Changes to this value
     * will not affect the revision.
     *
     * Generated from protobuf field <code>string access_guidance = 12;</code>
     * @return string
     */
    public function getAccessGuidance()
    {
        return $this->access_guidance;
    }

    /**
     * Text briefly describing how to access the endpoint. Changes to this value
     * will not affect the revision.
     *
     * Generated from protobuf field <code>string access_guidance = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessGuidance($var)
    {
        GPBUtil::checkString($var, True);
        $this->access_guidance = $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 = 14;</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 = 14;</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 = 15;</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 = 15;</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;
    }

}

