<?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.NetworkEndpointWithHealthStatus</code>
 */
class NetworkEndpointWithHealthStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output only] The health status of network endpoint;
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HealthStatusForNetworkEndpoint healths = 258689431;</code>
     */
    private $healths;
    /**
     * [Output only] The network endpoint;
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.NetworkEndpoint network_endpoint = 56789126;</code>
     */
    private $network_endpoint = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\HealthStatusForNetworkEndpoint[]|\Google\Protobuf\Internal\RepeatedField $healths
     *           [Output only] The health status of network endpoint;
     *     @type \Google\Cloud\Compute\V1\NetworkEndpoint $network_endpoint
     *           [Output only] The network endpoint;
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output only] The health status of network endpoint;
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HealthStatusForNetworkEndpoint healths = 258689431;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getHealths()
    {
        return $this->healths;
    }

    /**
     * [Output only] The health status of network endpoint;
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HealthStatusForNetworkEndpoint healths = 258689431;</code>
     * @param \Google\Cloud\Compute\V1\HealthStatusForNetworkEndpoint[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setHealths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\HealthStatusForNetworkEndpoint::class);
        $this->healths = $arr;

        return $this;
    }

    /**
     * [Output only] The network endpoint;
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.NetworkEndpoint network_endpoint = 56789126;</code>
     * @return \Google\Cloud\Compute\V1\NetworkEndpoint|null
     */
    public function getNetworkEndpoint()
    {
        return isset($this->network_endpoint) ? $this->network_endpoint : null;
    }

    public function hasNetworkEndpoint()
    {
        return isset($this->network_endpoint);
    }

    public function clearNetworkEndpoint()
    {
        unset($this->network_endpoint);
    }

    /**
     * [Output only] The network endpoint;
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.NetworkEndpoint network_endpoint = 56789126;</code>
     * @param \Google\Cloud\Compute\V1\NetworkEndpoint $var
     * @return $this
     */
    public function setNetworkEndpoint($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\NetworkEndpoint::class);
        $this->network_endpoint = $var;

        return $this;
    }

}

