<?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;

/**
 * The current IP utilization of all subnetwork ranges. Contains the total
 * number of allocated and free IPs in each range.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.SubnetworkUtilizationDetails</code>
 */
class SubnetworkUtilizationDetails extends \Google\Protobuf\Internal\Message
{
    /**
     * Utilizations of external IPV6 IP range.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization external_ipv6_instance_utilization = 419750236;</code>
     */
    protected $external_ipv6_instance_utilization = null;
    /**
     * Utilizations of external IPV6 IP range for NetLB.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization external_ipv6_lb_utilization = 136563645;</code>
     */
    protected $external_ipv6_lb_utilization = null;
    /**
     * Utilizations of internal IPV6 IP range.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization internal_ipv6_utilization = 69707020;</code>
     */
    protected $internal_ipv6_utilization = null;
    /**
     * Utilizations of all IPV4 IP ranges. For primary ranges, the range name
     * will be empty.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV4Utilization ipv4_utilizations = 206180011;</code>
     */
    private $ipv4_utilizations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization $external_ipv6_instance_utilization
     *           Utilizations of external IPV6 IP range.
     *     @type \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization $external_ipv6_lb_utilization
     *           Utilizations of external IPV6 IP range for NetLB.
     *     @type \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization $internal_ipv6_utilization
     *           Utilizations of internal IPV6 IP range.
     *     @type array<\Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV4Utilization>|\Google\Protobuf\Internal\RepeatedField $ipv4_utilizations
     *           Utilizations of all IPV4 IP ranges. For primary ranges, the range name
     *           will be empty.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Utilizations of external IPV6 IP range.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization external_ipv6_instance_utilization = 419750236;</code>
     * @return \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization|null
     */
    public function getExternalIpv6InstanceUtilization()
    {
        return $this->external_ipv6_instance_utilization;
    }

    public function hasExternalIpv6InstanceUtilization()
    {
        return isset($this->external_ipv6_instance_utilization);
    }

    public function clearExternalIpv6InstanceUtilization()
    {
        unset($this->external_ipv6_instance_utilization);
    }

    /**
     * Utilizations of external IPV6 IP range.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization external_ipv6_instance_utilization = 419750236;</code>
     * @param \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization $var
     * @return $this
     */
    public function setExternalIpv6InstanceUtilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization::class);
        $this->external_ipv6_instance_utilization = $var;

        return $this;
    }

    /**
     * Utilizations of external IPV6 IP range for NetLB.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization external_ipv6_lb_utilization = 136563645;</code>
     * @return \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization|null
     */
    public function getExternalIpv6LbUtilization()
    {
        return $this->external_ipv6_lb_utilization;
    }

    public function hasExternalIpv6LbUtilization()
    {
        return isset($this->external_ipv6_lb_utilization);
    }

    public function clearExternalIpv6LbUtilization()
    {
        unset($this->external_ipv6_lb_utilization);
    }

    /**
     * Utilizations of external IPV6 IP range for NetLB.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization external_ipv6_lb_utilization = 136563645;</code>
     * @param \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization $var
     * @return $this
     */
    public function setExternalIpv6LbUtilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization::class);
        $this->external_ipv6_lb_utilization = $var;

        return $this;
    }

    /**
     * Utilizations of internal IPV6 IP range.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization internal_ipv6_utilization = 69707020;</code>
     * @return \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization|null
     */
    public function getInternalIpv6Utilization()
    {
        return $this->internal_ipv6_utilization;
    }

    public function hasInternalIpv6Utilization()
    {
        return isset($this->internal_ipv6_utilization);
    }

    public function clearInternalIpv6Utilization()
    {
        unset($this->internal_ipv6_utilization);
    }

    /**
     * Utilizations of internal IPV6 IP range.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV6Utilization internal_ipv6_utilization = 69707020;</code>
     * @param \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization $var
     * @return $this
     */
    public function setInternalIpv6Utilization($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV6Utilization::class);
        $this->internal_ipv6_utilization = $var;

        return $this;
    }

    /**
     * Utilizations of all IPV4 IP ranges. For primary ranges, the range name
     * will be empty.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV4Utilization ipv4_utilizations = 206180011;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getIpv4Utilizations()
    {
        return $this->ipv4_utilizations;
    }

    /**
     * Utilizations of all IPV4 IP ranges. For primary ranges, the range name
     * will be empty.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.SubnetworkUtilizationDetailsIPV4Utilization ipv4_utilizations = 206180011;</code>
     * @param array<\Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV4Utilization>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setIpv4Utilizations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\SubnetworkUtilizationDetailsIPV4Utilization::class);
        $this->ipv4_utilizations = $arr;

        return $this;
    }

}

