<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/baremetalsolution/v2/network.proto

namespace Google\Cloud\BareMetalSolution\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Network with all used IP addresses.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.NetworkUsage</code>
 */
class NetworkUsage extends \Google\Protobuf\Internal\Message
{
    /**
     * Network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network network = 1;</code>
     */
    private $network = null;
    /**
     * All used IP addresses in this network.
     *
     * Generated from protobuf field <code>repeated string used_ips = 2;</code>
     */
    private $used_ips;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\BareMetalSolution\V2\Network $network
     *           Network.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $used_ips
     *           All used IP addresses in this network.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce();
        parent::__construct($data);
    }

    /**
     * Network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network network = 1;</code>
     * @return \Google\Cloud\BareMetalSolution\V2\Network|null
     */
    public function getNetwork()
    {
        return $this->network;
    }

    public function hasNetwork()
    {
        return isset($this->network);
    }

    public function clearNetwork()
    {
        unset($this->network);
    }

    /**
     * Network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network network = 1;</code>
     * @param \Google\Cloud\BareMetalSolution\V2\Network $var
     * @return $this
     */
    public function setNetwork($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\Network::class);
        $this->network = $var;

        return $this;
    }

    /**
     * All used IP addresses in this network.
     *
     * Generated from protobuf field <code>repeated string used_ips = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUsedIps()
    {
        return $this->used_ips;
    }

    /**
     * All used IP addresses in this network.
     *
     * Generated from protobuf field <code>repeated string used_ips = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUsedIps($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->used_ips = $arr;

        return $this;
    }

}

