<?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.InstanceGroupManagerStatusStateful</code>
 */
class InstanceGroupManagerStatusStateful extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
     *
     * Generated from protobuf field <code>optional bool has_stateful_config = 110474224;</code>
     */
    private $has_stateful_config = null;
    /**
     * [Output Only] Status of per-instance configurations on the instance.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 526265001;</code>
     */
    private $per_instance_configs = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $has_stateful_config
     *           [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
     *     @type \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs $per_instance_configs
     *           [Output Only] Status of per-instance configurations on the instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
     *
     * Generated from protobuf field <code>optional bool has_stateful_config = 110474224;</code>
     * @return bool
     */
    public function getHasStatefulConfig()
    {
        return isset($this->has_stateful_config) ? $this->has_stateful_config : false;
    }

    public function hasHasStatefulConfig()
    {
        return isset($this->has_stateful_config);
    }

    public function clearHasStatefulConfig()
    {
        unset($this->has_stateful_config);
    }

    /**
     * [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
     *
     * Generated from protobuf field <code>optional bool has_stateful_config = 110474224;</code>
     * @param bool $var
     * @return $this
     */
    public function setHasStatefulConfig($var)
    {
        GPBUtil::checkBool($var);
        $this->has_stateful_config = $var;

        return $this;
    }

    /**
     * [Output Only] Status of per-instance configurations on the instance.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 526265001;</code>
     * @return \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs|null
     */
    public function getPerInstanceConfigs()
    {
        return $this->per_instance_configs;
    }

    public function hasPerInstanceConfigs()
    {
        return isset($this->per_instance_configs);
    }

    public function clearPerInstanceConfigs()
    {
        unset($this->per_instance_configs);
    }

    /**
     * [Output Only] Status of per-instance configurations on the instance.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 526265001;</code>
     * @param \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs $var
     * @return $this
     */
    public function setPerInstanceConfigs($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs::class);
        $this->per_instance_configs = $var;

        return $this;
    }

}

