<?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.ManagedInstanceInstanceHealth</code>
 */
class ManagedInstanceInstanceHealth extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] The current detailed instance health state.
     * Check the DetailedHealthState enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string detailed_health_state = 510470173;</code>
     */
    private $detailed_health_state = null;
    /**
     * [Output Only] The URL for the health check that verifies whether the instance is healthy.
     *
     * Generated from protobuf field <code>optional string health_check = 308876645;</code>
     */
    private $health_check = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $detailed_health_state
     *           [Output Only] The current detailed instance health state.
     *           Check the DetailedHealthState enum for the list of possible values.
     *     @type string $health_check
     *           [Output Only] The URL for the health check that verifies whether the instance is healthy.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] The current detailed instance health state.
     * Check the DetailedHealthState enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string detailed_health_state = 510470173;</code>
     * @return string
     */
    public function getDetailedHealthState()
    {
        return isset($this->detailed_health_state) ? $this->detailed_health_state : '';
    }

    public function hasDetailedHealthState()
    {
        return isset($this->detailed_health_state);
    }

    public function clearDetailedHealthState()
    {
        unset($this->detailed_health_state);
    }

    /**
     * [Output Only] The current detailed instance health state.
     * Check the DetailedHealthState enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string detailed_health_state = 510470173;</code>
     * @param string $var
     * @return $this
     */
    public function setDetailedHealthState($var)
    {
        GPBUtil::checkString($var, True);
        $this->detailed_health_state = $var;

        return $this;
    }

    /**
     * [Output Only] The URL for the health check that verifies whether the instance is healthy.
     *
     * Generated from protobuf field <code>optional string health_check = 308876645;</code>
     * @return string
     */
    public function getHealthCheck()
    {
        return isset($this->health_check) ? $this->health_check : '';
    }

    public function hasHealthCheck()
    {
        return isset($this->health_check);
    }

    public function clearHealthCheck()
    {
        unset($this->health_check);
    }

    /**
     * [Output Only] The URL for the health check that verifies whether the instance is healthy.
     *
     * Generated from protobuf field <code>optional string health_check = 308876645;</code>
     * @param string $var
     * @return $this
     */
    public function setHealthCheck($var)
    {
        GPBUtil::checkString($var, True);
        $this->health_check = $var;

        return $this;
    }

}

