<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Ephemeral metadata content describing the state of a deployment operation.
 *
 * Generated from protobuf message <code>google.cloud.config.v1.DeploymentOperationMetadata</code>
 */
class DeploymentOperationMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The current step the deployment operation is running.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1;</code>
     */
    protected $step = 0;
    /**
     * Outputs and artifacts from applying a deployment.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.ApplyResults apply_results = 2;</code>
     */
    protected $apply_results = null;
    /**
     * Output only. Cloud Build instance UUID associated with this operation.
     *
     * Generated from protobuf field <code>string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $build = '';
    /**
     * Output only. Location of Deployment operations logs in
     * `gs://{bucket}/{object}` format.
     *
     * Generated from protobuf field <code>string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $logs = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $step
     *           The current step the deployment operation is running.
     *     @type \Google\Cloud\Config\V1\ApplyResults $apply_results
     *           Outputs and artifacts from applying a deployment.
     *     @type string $build
     *           Output only. Cloud Build instance UUID associated with this operation.
     *     @type string $logs
     *           Output only. Location of Deployment operations logs in
     *           `gs://{bucket}/{object}` format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce();
        parent::__construct($data);
    }

    /**
     * The current step the deployment operation is running.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1;</code>
     * @return int
     */
    public function getStep()
    {
        return $this->step;
    }

    /**
     * The current step the deployment operation is running.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setStep($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\DeploymentOperationMetadata\DeploymentStep::class);
        $this->step = $var;

        return $this;
    }

    /**
     * Outputs and artifacts from applying a deployment.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.ApplyResults apply_results = 2;</code>
     * @return \Google\Cloud\Config\V1\ApplyResults|null
     */
    public function getApplyResults()
    {
        return $this->apply_results;
    }

    public function hasApplyResults()
    {
        return isset($this->apply_results);
    }

    public function clearApplyResults()
    {
        unset($this->apply_results);
    }

    /**
     * Outputs and artifacts from applying a deployment.
     *
     * Generated from protobuf field <code>.google.cloud.config.v1.ApplyResults apply_results = 2;</code>
     * @param \Google\Cloud\Config\V1\ApplyResults $var
     * @return $this
     */
    public function setApplyResults($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\ApplyResults::class);
        $this->apply_results = $var;

        return $this;
    }

    /**
     * Output only. Cloud Build instance UUID associated with this operation.
     *
     * Generated from protobuf field <code>string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBuild()
    {
        return $this->build;
    }

    /**
     * Output only. Cloud Build instance UUID associated with this operation.
     *
     * Generated from protobuf field <code>string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBuild($var)
    {
        GPBUtil::checkString($var, True);
        $this->build = $var;

        return $this;
    }

    /**
     * Output only. Location of Deployment operations logs in
     * `gs://{bucket}/{object}` format.
     *
     * Generated from protobuf field <code>string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLogs()
    {
        return $this->logs;
    }

    /**
     * Output only. Location of Deployment operations logs in
     * `gs://{bucket}/{object}` format.
     *
     * Generated from protobuf field <code>string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLogs($var)
    {
        GPBUtil::checkString($var, True);
        $this->logs = $var;

        return $this;
    }

}

