<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/configdelivery/v1beta/config_delivery.proto

namespace Google\Cloud\ConfigDelivery\V1beta;

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

/**
 * `Release` represents a versioned release containing kubernetes manifests.
 *
 * Generated from protobuf message <code>google.cloud.configdelivery.v1beta.Release</code>
 */
class Release extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Name of the Release. Format is
     * `projects/{project}/locations/location}/resourceBundles/{resource_bundle}/release/[a-z][a-z0-9\-]{0,62}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. Time `Release` was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Time `Release` was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. Labels as key value pairs.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * Optional. lifecycle of the `Release`.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.Release.Lifecycle lifecycle = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $lifecycle = 0;
    /**
     * Required. version of the `Release`. This must be v<major>.<minor>.<patch>.
     *
     * Generated from protobuf field <code>string version = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $version = '';
    /**
     * Output only. Time the `Release` was published.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp publish_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $publish_time = null;
    /**
     * Output only. `ResourceBundle` Release extra information e.g., artifact
     * registry image path.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.ReleaseInfo info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Name of the Release. Format is
     *           `projects/{project}/locations/location}/resourceBundles/{resource_bundle}/release/[a-z][a-z0-9\-]{0,62}`.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time `Release` was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Time `Release` was last updated.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. Labels as key value pairs.
     *     @type int $lifecycle
     *           Optional. lifecycle of the `Release`.
     *     @type string $version
     *           Required. version of the `Release`. This must be v<major>.<minor>.<patch>.
     *     @type \Google\Protobuf\Timestamp $publish_time
     *           Output only. Time the `Release` was published.
     *     @type \Google\Cloud\ConfigDelivery\V1beta\ReleaseInfo $info
     *           Output only. `ResourceBundle` Release extra information e.g., artifact
     *           registry image path.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Configdelivery\V1Beta\ConfigDelivery::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Name of the Release. Format is
     * `projects/{project}/locations/location}/resourceBundles/{resource_bundle}/release/[a-z][a-z0-9\-]{0,62}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Name of the Release. Format is
     * `projects/{project}/locations/location}/resourceBundles/{resource_bundle}/release/[a-z][a-z0-9\-]{0,62}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Time `Release` was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.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. Time `Release` was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.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. Time `Release` was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.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. Time `Release` was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.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;
    }

    /**
     * Optional. Labels as key value pairs.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. Labels as key value pairs.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</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;
    }

    /**
     * Optional. lifecycle of the `Release`.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.Release.Lifecycle lifecycle = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getLifecycle()
    {
        return $this->lifecycle;
    }

    /**
     * Optional. lifecycle of the `Release`.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.Release.Lifecycle lifecycle = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setLifecycle($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ConfigDelivery\V1beta\Release\Lifecycle::class);
        $this->lifecycle = $var;

        return $this;
    }

    /**
     * Required. version of the `Release`. This must be v<major>.<minor>.<patch>.
     *
     * Generated from protobuf field <code>string version = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Required. version of the `Release`. This must be v<major>.<minor>.<patch>.
     *
     * Generated from protobuf field <code>string version = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Output only. Time the `Release` was published.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp publish_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getPublishTime()
    {
        return $this->publish_time;
    }

    public function hasPublishTime()
    {
        return isset($this->publish_time);
    }

    public function clearPublishTime()
    {
        unset($this->publish_time);
    }

    /**
     * Output only. Time the `Release` was published.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp publish_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setPublishTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->publish_time = $var;

        return $this;
    }

    /**
     * Output only. `ResourceBundle` Release extra information e.g., artifact
     * registry image path.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.ReleaseInfo info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\ConfigDelivery\V1beta\ReleaseInfo|null
     */
    public function getInfo()
    {
        return $this->info;
    }

    public function hasInfo()
    {
        return isset($this->info);
    }

    public function clearInfo()
    {
        unset($this->info);
    }

    /**
     * Output only. `ResourceBundle` Release extra information e.g., artifact
     * registry image path.
     *
     * Generated from protobuf field <code>.google.cloud.configdelivery.v1beta.ReleaseInfo info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\ConfigDelivery\V1beta\ReleaseInfo $var
     * @return $this
     */
    public function setInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ConfigDelivery\V1beta\ReleaseInfo::class);
        $this->info = $var;

        return $this;
    }

}

