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

namespace Google\Cloud\BaremetalSolution\V2;

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

/**
 * A Network.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.Network</code>
 */
class Network extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * This field will contain the same value as field "network", which will soon
     * be deprecated. Please use this field to reference the name of the network
     * resource.
     *
     * Generated from protobuf field <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Name of the network.
     *
     * Generated from protobuf field <code>string network = 1;</code>
     */
    private $network = '';
    /**
     * The type of this network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     */
    private $type = 0;
    /**
     * IP address configured.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     */
    private $ip_address = '';
    /**
     * List of physical interfaces.
     *
     * Generated from protobuf field <code>repeated string mac_address = 4;</code>
     */
    private $mac_address;
    /**
     * The Network state.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     */
    private $state = 0;
    /**
     * The vlan id of the Network.
     *
     * Generated from protobuf field <code>string vlan_id = 7;</code>
     */
    private $vlan_id = '';
    /**
     * The cidr of the Network.
     *
     * Generated from protobuf field <code>string cidr = 8;</code>
     */
    private $cidr = '';
    /**
     * The vrf for the Network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    private $vrf = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The resource name of this `Network`.
     *           Resource names are schemeless URIs that follow the conventions in
     *           https://cloud.google.com/apis/design/resource_names.
     *           Format:
     *           `projects/{project}/locations/{location}/networks/{network}`
     *           This field will contain the same value as field "network", which will soon
     *           be deprecated. Please use this field to reference the name of the network
     *           resource.
     *     @type string $network
     *           Name of the network.
     *     @type int $type
     *           The type of this network.
     *     @type string $ip_address
     *           IP address configured.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $mac_address
     *           List of physical interfaces.
     *     @type int $state
     *           The Network state.
     *     @type string $vlan_id
     *           The vlan id of the Network.
     *     @type string $cidr
     *           The cidr of the Network.
     *     @type \Google\Cloud\BaremetalSolution\V2\VRF $vrf
     *           The vrf for the Network.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * This field will contain the same value as field "network", which will soon
     * be deprecated. Please use this field to reference the name of the network
     * resource.
     *
     * Generated from protobuf field <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * This field will contain the same value as field "network", which will soon
     * be deprecated. Please use this field to reference the name of the network
     * resource.
     *
     * Generated from protobuf field <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Name of the network.
     *
     * Generated from protobuf field <code>string network = 1;</code>
     * @return string
     */
    public function getNetwork()
    {
        return $this->network;
    }

    /**
     * Name of the network.
     *
     * Generated from protobuf field <code>string network = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->network = $var;

        return $this;
    }

    /**
     * The type of this network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of this network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BaremetalSolution\V2\Network\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * IP address configured.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * IP address configured.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

    /**
     * List of physical interfaces.
     *
     * Generated from protobuf field <code>repeated string mac_address = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMacAddress()
    {
        return $this->mac_address;
    }

    /**
     * List of physical interfaces.
     *
     * Generated from protobuf field <code>repeated string mac_address = 4;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMacAddress($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->mac_address = $arr;

        return $this;
    }

    /**
     * The Network state.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * The Network state.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BaremetalSolution\V2\Network\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * The vlan id of the Network.
     *
     * Generated from protobuf field <code>string vlan_id = 7;</code>
     * @return string
     */
    public function getVlanId()
    {
        return $this->vlan_id;
    }

    /**
     * The vlan id of the Network.
     *
     * Generated from protobuf field <code>string vlan_id = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setVlanId($var)
    {
        GPBUtil::checkString($var, True);
        $this->vlan_id = $var;

        return $this;
    }

    /**
     * The cidr of the Network.
     *
     * Generated from protobuf field <code>string cidr = 8;</code>
     * @return string
     */
    public function getCidr()
    {
        return $this->cidr;
    }

    /**
     * The cidr of the Network.
     *
     * Generated from protobuf field <code>string cidr = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setCidr($var)
    {
        GPBUtil::checkString($var, True);
        $this->cidr = $var;

        return $this;
    }

    /**
     * The vrf for the Network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     * @return \Google\Cloud\BaremetalSolution\V2\VRF|null
     */
    public function getVrf()
    {
        return $this->vrf;
    }

    public function hasVrf()
    {
        return isset($this->vrf);
    }

    public function clearVrf()
    {
        unset($this->vrf);
    }

    /**
     * The vrf for the Network.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     * @param \Google\Cloud\BaremetalSolution\V2\VRF $var
     * @return $this
     */
    public function setVrf($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BaremetalSolution\V2\VRF::class);
        $this->vrf = $var;

        return $this;
    }

}

