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

namespace Google\Cloud\AlloyDb\V1;

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

/**
 * UpgradeClusterResponse contains the response for upgrade cluster operation.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.UpgradeClusterResponse</code>
 */
class UpgradeClusterResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Status of upgrade operation.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Status status = 1;</code>
     */
    protected $status = 0;
    /**
     * A user friendly message summarising the upgrade operation details and the
     * next steps for the user if there is any.
     *
     * Generated from protobuf field <code>string message = 2;</code>
     */
    protected $message = '';
    /**
     * Array of upgrade details for the current cluster and all the secondary
     * clusters associated with this cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.alloydb.v1.UpgradeClusterResponse.ClusterUpgradeDetails cluster_upgrade_details = 3;</code>
     */
    private $cluster_upgrade_details;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $status
     *           Status of upgrade operation.
     *     @type string $message
     *           A user friendly message summarising the upgrade operation details and the
     *           next steps for the user if there is any.
     *     @type array<\Google\Cloud\AlloyDb\V1\UpgradeClusterResponse\ClusterUpgradeDetails>|\Google\Protobuf\Internal\RepeatedField $cluster_upgrade_details
     *           Array of upgrade details for the current cluster and all the secondary
     *           clusters associated with this cluster.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Service::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Status of upgrade operation.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterResponse.Status status = 1;</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;
    }

    /**
     * A user friendly message summarising the upgrade operation details and the
     * next steps for the user if there is any.
     *
     * Generated from protobuf field <code>string message = 2;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * A user friendly message summarising the upgrade operation details and the
     * next steps for the user if there is any.
     *
     * Generated from protobuf field <code>string message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

    /**
     * Array of upgrade details for the current cluster and all the secondary
     * clusters associated with this cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.alloydb.v1.UpgradeClusterResponse.ClusterUpgradeDetails cluster_upgrade_details = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getClusterUpgradeDetails()
    {
        return $this->cluster_upgrade_details;
    }

    /**
     * Array of upgrade details for the current cluster and all the secondary
     * clusters associated with this cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.alloydb.v1.UpgradeClusterResponse.ClusterUpgradeDetails cluster_upgrade_details = 3;</code>
     * @param array<\Google\Cloud\AlloyDb\V1\UpgradeClusterResponse\ClusterUpgradeDetails>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setClusterUpgradeDetails($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AlloyDb\V1\UpgradeClusterResponse\ClusterUpgradeDetails::class);
        $this->cluster_upgrade_details = $arr;

        return $this;
    }

}

