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

/**
 * The progress of a deployment unit provisioning or deprovisioning.
 *
 * Generated from protobuf message <code>google.cloud.config.v1.DeploymentUnitProgress</code>
 */
class DeploymentUnitProgress extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The unit id of the deployment unit to be provisioned.
     *
     * Generated from protobuf field <code>string unit_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $unit_id = '';
    /**
     * Output only. The name of the deployment to be provisioned.
     * Format:
     * 'projects/{project}/locations/{location}/deployments/{deployment}'.
     *
     * Generated from protobuf field <code>string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $deployment = '';
    /**
     * Output only. The current step of the deployment unit provisioning.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentUnitProgress.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Output only. Additional information regarding the current state.
     *
     * Generated from protobuf field <code>string state_description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state_description = '';
    /**
     * Output only. The summary of the deployment operation.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentOperationSummary deployment_operation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deployment_operation_summary = null;
    /**
     * Output only. Holds the error status of the deployment unit provisioning.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $error = null;
    /**
     * Output only. The intent of the deployment unit.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentUnitProgress.Intent intent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $intent = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $unit_id
     *           Output only. The unit id of the deployment unit to be provisioned.
     *     @type string $deployment
     *           Output only. The name of the deployment to be provisioned.
     *           Format:
     *           'projects/{project}/locations/{location}/deployments/{deployment}'.
     *     @type int $state
     *           Output only. The current step of the deployment unit provisioning.
     *     @type string $state_description
     *           Output only. Additional information regarding the current state.
     *     @type \Google\Cloud\Config\V1\DeploymentOperationSummary $deployment_operation_summary
     *           Output only. The summary of the deployment operation.
     *     @type \Google\Rpc\Status $error
     *           Output only. Holds the error status of the deployment unit provisioning.
     *     @type int $intent
     *           Output only. The intent of the deployment unit.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The unit id of the deployment unit to be provisioned.
     *
     * Generated from protobuf field <code>string unit_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUnitId()
    {
        return $this->unit_id;
    }

    /**
     * Output only. The unit id of the deployment unit to be provisioned.
     *
     * Generated from protobuf field <code>string unit_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUnitId($var)
    {
        GPBUtil::checkString($var, True);
        $this->unit_id = $var;

        return $this;
    }

    /**
     * Output only. The name of the deployment to be provisioned.
     * Format:
     * 'projects/{project}/locations/{location}/deployments/{deployment}'.
     *
     * Generated from protobuf field <code>string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getDeployment()
    {
        return $this->deployment;
    }

    /**
     * Output only. The name of the deployment to be provisioned.
     * Format:
     * 'projects/{project}/locations/{location}/deployments/{deployment}'.
     *
     * Generated from protobuf field <code>string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setDeployment($var)
    {
        GPBUtil::checkString($var, True);
        $this->deployment = $var;

        return $this;
    }

    /**
     * Output only. The current step of the deployment unit provisioning.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentUnitProgress.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The current step of the deployment unit provisioning.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentUnitProgress.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\DeploymentUnitProgress\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. Additional information regarding the current state.
     *
     * Generated from protobuf field <code>string state_description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getStateDescription()
    {
        return $this->state_description;
    }

    /**
     * Output only. Additional information regarding the current state.
     *
     * Generated from protobuf field <code>string state_description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setStateDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->state_description = $var;

        return $this;
    }

    /**
     * Output only. The summary of the deployment operation.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentOperationSummary deployment_operation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Config\V1\DeploymentOperationSummary|null
     */
    public function getDeploymentOperationSummary()
    {
        return $this->deployment_operation_summary;
    }

    public function hasDeploymentOperationSummary()
    {
        return isset($this->deployment_operation_summary);
    }

    public function clearDeploymentOperationSummary()
    {
        unset($this->deployment_operation_summary);
    }

    /**
     * Output only. The summary of the deployment operation.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentOperationSummary deployment_operation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Config\V1\DeploymentOperationSummary $var
     * @return $this
     */
    public function setDeploymentOperationSummary($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\DeploymentOperationSummary::class);
        $this->deployment_operation_summary = $var;

        return $this;
    }

    /**
     * Output only. Holds the error status of the deployment unit provisioning.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Rpc\Status|null
     */
    public function getError()
    {
        return $this->error;
    }

    public function hasError()
    {
        return isset($this->error);
    }

    public function clearError()
    {
        unset($this->error);
    }

    /**
     * Output only. Holds the error status of the deployment unit provisioning.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->error = $var;

        return $this;
    }

    /**
     * Output only. The intent of the deployment unit.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentUnitProgress.Intent intent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getIntent()
    {
        return $this->intent;
    }

    /**
     * Output only. The intent of the deployment unit.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentUnitProgress.Intent intent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setIntent($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\DeploymentUnitProgress\Intent::class);
        $this->intent = $var;

        return $this;
    }

}

