<?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 config 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>bool has_stateful_config = 110474224;</code>
     */
    private $has_stateful_config = false;
    /**
     * [Output Only] Status of per-instance configs on the instance.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 257829545;</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 config 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 configs 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 config 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>bool has_stateful_config = 110474224;</code>
     * @return bool
     */
    public function getHasStatefulConfig()
    {
        return $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 config 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>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 configs on the instance.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 257829545;</code>
     * @return \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs
     */
    public function getPerInstanceConfigs()
    {
        return isset($this->per_instance_configs) ? $this->per_instance_configs : null;
    }

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

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

    /**
     * [Output Only] Status of per-instance configs on the instance.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 257829545;</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;
    }

}

