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

namespace Google\Cloud\AlloyDb\V1\UpgradeClusterResponse;

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

/**
 * Stage information for different stages in the upgrade process.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.UpgradeClusterResponse.StageInfo</code>
 */
class StageInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The stage.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Stage stage = 1;</code>
     */
    protected $stage = 0;
    /**
     * Status of the stage.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Status status = 2;</code>
     */
    protected $status = 0;
    /**
     * logs_url is the URL for the logs associated with a stage if that stage
     * has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK,
     * PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.
     *
     * Generated from protobuf field <code>string logs_url = 3;</code>
     */
    protected $logs_url = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $stage
     *           The stage.
     *     @type int $status
     *           Status of the stage.
     *     @type string $logs_url
     *           logs_url is the URL for the logs associated with a stage if that stage
     *           has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK,
     *           PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The stage.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Stage stage = 1;</code>
     * @return int
     */
    public function getStage()
    {
        return $this->stage;
    }

    /**
     * The stage.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Stage stage = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setStage($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AlloyDb\V1\UpgradeClusterResponse\Stage::class);
        $this->stage = $var;

        return $this;
    }

    /**
     * Status of the stage.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Status status = 2;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Status of the stage.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Status status = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AlloyDb\V1\UpgradeClusterResponse\Status::class);
        $this->status = $var;

        return $this;
    }

    /**
     * logs_url is the URL for the logs associated with a stage if that stage
     * has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK,
     * PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.
     *
     * Generated from protobuf field <code>string logs_url = 3;</code>
     * @return string
     */
    public function getLogsUrl()
    {
        return $this->logs_url;
    }

    /**
     * logs_url is the URL for the logs associated with a stage if that stage
     * has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK,
     * PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.
     *
     * Generated from protobuf field <code>string logs_url = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setLogsUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->logs_url = $var;

        return $this;
    }

}

