""" openconfig_vlan 

This module defines configuration and state variables for VLANs,
in addition to VLAN parameters associated with interfaces

"""


import re
import collections

from enum import Enum

from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict

from ydk.errors import YPYError, YPYModelError



class VlanModeTypeEnum(Enum):
    """
    VlanModeTypeEnum

    VLAN interface mode (trunk or access)

    .. data:: ACCESS = 0

    	Access mode VLAN interface (No 802.1q header)

    .. data:: TRUNK = 1

    	Trunk mode VLAN interface

    """

    ACCESS = 0

    TRUNK = 1


    @staticmethod
    def _meta_info():
        from ydk.models.openconfig._meta import _openconfig_vlan as meta
        return meta._meta_table['VlanModeTypeEnum']



class Vlans(object):
    """
    Container for VLAN configuration and state
    variables
    
    .. attribute:: vlan
    
    	Configured VLANs keyed by id
    	**type**\: list of  :py:class:`Vlan <ydk.models.openconfig.openconfig_vlan.Vlans.Vlan>`
    
    

    """

    _prefix = 'vlan'
    _revision = '2015-10-09'

    def __init__(self):
        self.vlan = YList()
        self.vlan.parent = self
        self.vlan.name = 'vlan'


    class Vlan(object):
        """
        Configured VLANs keyed by id
        
        .. attribute:: vlan_id  <key>
        
        	references the configured vlan\-id
        	**type**\:  int
        
        	**range:** 1..4094
        
        	**refers to**\: :py:class:`vlan_id <ydk.models.openconfig.openconfig_vlan.Vlans.Vlan.Config>`
        
        .. attribute:: config
        
        	Configuration parameters for VLANs
        	**type**\:  :py:class:`Config <ydk.models.openconfig.openconfig_vlan.Vlans.Vlan.Config>`
        
        .. attribute:: state
        
        	State variables for VLANs
        	**type**\:  :py:class:`State <ydk.models.openconfig.openconfig_vlan.Vlans.Vlan.State>`
        
        

        """

        _prefix = 'vlan'
        _revision = '2015-10-09'

        def __init__(self):
            self.parent = None
            self.vlan_id = None
            self.config = Vlans.Vlan.Config()
            self.config.parent = self
            self.state = Vlans.Vlan.State()
            self.state.parent = self


        class Config(object):
            """
            Configuration parameters for VLANs
            
            .. attribute:: name
            
            	Interface VLAN name
            	**type**\:  str
            
            .. attribute:: status
            
            	Admin state of the VLAN
            	**type**\:  :py:class:`StatusEnum <ydk.models.openconfig.openconfig_vlan.Vlans.Vlan.Config.StatusEnum>`
            
            .. attribute:: vlan_id
            
            	Interface VLAN id
            	**type**\:  int
            
            	**range:** 1..4094
            
            

            """

            _prefix = 'vlan'
            _revision = '2015-10-09'

            def __init__(self):
                self.parent = None