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

namespace Google\Cloud\Config\V1;

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

/**
 * A DeploymentGroupRevision represents a snapshot of a
 * [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] at a given point in
 * time, created when a DeploymentGroup is provisioned or deprovisioned.
 *
 * Generated from protobuf message <code>google.cloud.config.v1.DeploymentGroupRevision</code>
 */
class DeploymentGroupRevision extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The name of the deployment group revision.
     * Format:
     * 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. The snapshot of the deployment group at this revision.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentGroup snapshot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $snapshot = null;
    /**
     * Output only. Time when the deployment group revision was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The alternative IDs of the deployment group revision.
     *
     * Generated from protobuf field <code>repeated string alternative_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $alternative_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The name of the deployment group revision.
     *           Format:
     *           'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.
     *     @type \Google\Cloud\Config\V1\DeploymentGroup $snapshot
     *           Output only. The snapshot of the deployment group at this revision.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time when the deployment group revision was created.
     *     @type string[] $alternative_ids
     *           Output only. The alternative IDs of the deployment group revision.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The name of the deployment group revision.
     * Format:
     * 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The name of the deployment group revision.
     * Format:
     * 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.
     *
     * 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. The snapshot of the deployment group at this revision.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentGroup snapshot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Config\V1\DeploymentGroup|null
     */
    public function getSnapshot()
    {
        return $this->snapshot;
    }

    public function hasSnapshot()
    {
        return isset($this->snapshot);
    }

    public function clearSnapshot()
    {
        unset($this->snapshot);
    }

    /**
     * Output only. The snapshot of the deployment group at this revision.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentGroup snapshot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Config\V1\DeploymentGroup $var
     * @return $this
     */
    public function setSnapshot($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\DeploymentGroup::class);
        $this->snapshot = $var;

        return $this;
    }

    /**
     * Output only. Time when the deployment group revision was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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 when the deployment group revision was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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 alternative IDs of the deployment group revision.
     *
     * Generated from protobuf field <code>repeated string alternative_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<string>
     */
    public function getAlternativeIds()
    {
        return $this->alternative_ids;
    }

    /**
     * Output only. The alternative IDs of the deployment group revision.
     *
     * Generated from protobuf field <code>repeated string alternative_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string[] $var
     * @return $this
     */
    public function setAlternativeIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->alternative_ids = $arr;

        return $this;
    }

}

