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

namespace Google\Cloud\AlloyDb\V1\UpgradeClusterStatus;

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

/**
 * Read pool instances upgrade specific status.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus</code>
 */
class ReadPoolInstancesUpgradeStageStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Read pool instances upgrade statistics.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus.Stats upgrade_stats = 1;</code>
     */
    protected $upgrade_stats = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AlloyDb\V1\UpgradeClusterStatus\ReadPoolInstancesUpgradeStageStatus\Stats $upgrade_stats
     *           Read pool instances upgrade statistics.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Read pool instances upgrade statistics.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus.Stats upgrade_stats = 1;</code>
     * @return \Google\Cloud\AlloyDb\V1\UpgradeClusterStatus\ReadPoolInstancesUpgradeStageStatus\Stats|null
     */
    public function getUpgradeStats()
    {
        return $this->upgrade_stats;
    }

    public function hasUpgradeStats()
    {
        return isset($this->upgrade_stats);
    }

    public function clearUpgradeStats()
    {
        unset($this->upgrade_stats);
    }

    /**
     * Read pool instances upgrade statistics.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus.Stats upgrade_stats = 1;</code>
     * @param \Google\Cloud\AlloyDb\V1\UpgradeClusterStatus\ReadPoolInstancesUpgradeStageStatus\Stats $var
     * @return $this
     */
    public function setUpgradeStats($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AlloyDb\V1\UpgradeClusterStatus\ReadPoolInstancesUpgradeStageStatus\Stats::class);
        $this->upgrade_stats = $var;

        return $this;
    }

}


