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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.InstanceGroupManagerStatus</code>
 */
class InstanceGroupManagerStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] The URL of the Autoscaler that targets this instance group manager.
     *
     * Generated from protobuf field <code>string autoscaler = 248823511;</code>
     */
    private $autoscaler = '';
    /**
     * [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
     *
     * Generated from protobuf field <code>bool is_stable = 108410864;</code>
     */
    private $is_stable = false;
    /**
     * [Output Only] Stateful status of the given Instance Group Manager.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusStateful stateful = 244462412;</code>
     */
    private $stateful = null;
    /**
     * [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget version_target = 20950744;</code>
     */
    private $version_target = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $autoscaler
     *           [Output Only] The URL of the Autoscaler that targets this instance group manager.
     *     @type bool $is_stable
     *           [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
     *     @type \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStateful $stateful
     *           [Output Only] Stateful status of the given Instance Group Manager.
     *     @type \Google\Cloud\Compute\V1\InstanceGroupManagerStatusVersionTarget $version_target
     *           [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] The URL of the Autoscaler that targets this instance group manager.
     *
     * Generated from protobuf field <code>string autoscaler = 248823511;</code>
     * @return string
     */
    public function getAutoscaler()
    {
        return $this->autoscaler;
    }

    /**
     * [Output Only] The URL of the Autoscaler that targets this instance group manager.
     *
     * Generated from protobuf field <code>string autoscaler = 248823511;</code>
     * @param string $var
     * @return $this
     */
    public function setAutoscaler($var)
    {
        GPBUtil::checkString($var, True);
        $this->autoscaler = $var;

        return $this;
    }

    /**
     * [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
     *
     * Generated from protobuf field <code>bool is_stable = 108410864;</code>
     * @return bool
     */
    public function getIsStable()
    {
        return $this->is_stable;
    }

    /**
     * [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
     *
     * Generated from protobuf field <code>bool is_stable = 108410864;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsStable($var)
    {
        GPBUtil::checkBool($var);
        $this->is_stable = $var;

        return $this;
    }

    /**
     * [Output Only] Stateful status of the given Instance Group Manager.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusStateful stateful = 244462412;</code>
     * @return \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStateful
     */
    public function getStateful()
    {
        return isset($this->stateful) ? $this->stateful : null;
    }

    public function hasStateful()
    {
        return isset($this->stateful);
    }

    public function clearStateful()
    {
        unset($this->stateful);
    }

    /**
     * [Output Only] Stateful status of the given Instance Group Manager.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusStateful stateful = 244462412;</code>
     * @param \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStateful $var
     * @return $this
     */
    public function setStateful($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStateful::class);
        $this->stateful = $var;

        return $this;
    }

    /**
     * [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget version_target = 20950744;</code>
     * @return \Google\Cloud\Compute\V1\InstanceGroupManagerStatusVersionTarget
     */
    public function getVersionTarget()
    {
        return isset($this->version_target) ? $this->version_target : null;
    }

    public function hasVersionTarget()
    {
        return isset($this->version_target);
    }

    public function clearVersionTarget()
    {
        unset($this->version_target);
    }

    /**
     * [Output Only] A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget version_target = 20950744;</code>
     * @param \Google\Cloud\Compute\V1\InstanceGroupManagerStatusVersionTarget $var
     * @return $this
     */
    public function setVersionTarget($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceGroupManagerStatusVersionTarget::class);
        $this->version_target = $var;

        return $this;
    }

}

