<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * GeneveHeader related configurations.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.InterconnectAttachmentL2ForwardingGeneveHeader</code>
 */
class InterconnectAttachmentL2ForwardingGeneveHeader extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. VNI is a 24-bit unique virtual network identifier, from 0 to
     * 16,777,215.
     *
     * Generated from protobuf field <code>optional uint32 vni = 116913;</code>
     */
    protected $vni = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $vni
     *           Optional. VNI is a 24-bit unique virtual network identifier, from 0 to
     *           16,777,215.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. VNI is a 24-bit unique virtual network identifier, from 0 to
     * 16,777,215.
     *
     * Generated from protobuf field <code>optional uint32 vni = 116913;</code>
     * @return int
     */
    public function getVni()
    {
        return isset($this->vni) ? $this->vni : 0;
    }

    public function hasVni()
    {
        return isset($this->vni);
    }

    public function clearVni()
    {
        unset($this->vni);
    }

    /**
     * Optional. VNI is a 24-bit unique virtual network identifier, from 0 to
     * 16,777,215.
     *
     * Generated from protobuf field <code>optional uint32 vni = 116913;</code>
     * @param int $var
     * @return $this
     */
    public function setVni($var)
    {
        GPBUtil::checkUint32($var);
        $this->vni = $var;

        return $this;
    }

}

