
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
class bad_lsp_log(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module brocade-isis-operational - based on the path /counts-state/bad-lsp-log. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LSP Name
  """
  __slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__type_index','__time_stamp','__l1_count','__l2_count',)

  _yang_name = 'bad-lsp-log'
  _rest_name = 'bad-lsp-log'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    path_helper_ = kwargs.pop("path_helper", None)
    if path_helper_ is False:
      self._path_helper = False
    elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper):
      self._path_helper = path_helper_
    elif hasattr(self, "_parent"):
      path_helper_ = getattr(self._parent, "_path_helper", False)
      self._path_helper = path_helper_
    else:
      self._path_helper = False

    extmethods = kwargs.pop("extmethods", None)
    if extmethods is False:
      self._extmethods = False
    elif extmethods is not None and isinstance(extmethods, dict):
      self._extmethods = extmethods
    elif hasattr(self, "_parent"):
      extmethods = getattr(self._parent, "_extmethods", None)
      self._extmethods = extmethods
    else:
      self._extmethods = False
    self.__time_stamp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    self.__l2_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    self.__type_index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)
    self.__l1_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return [u'counts-state', u'bad-lsp-log']

  def _rest_path(self):
    if hasattr(self, "_parent"):
      if self._rest_name:
        return self._parent._rest_path()+[self._rest_name]
      else:
        return self._parent._rest_path()
    else:
      return [u'counts-state', u'bad-lsp-log']

  def _get_type_index(self):
    """
    Getter method for type_index, mapped from YANG variable /counts_state/bad_lsp_log/type_index (uint8)

    YANG Description: Type Index
    """
    return self.__type_index
      
  def _set_type_index(self, v, load=False):
    """
    Setter method for type_index, mapped from YANG variable /counts_state/bad_lsp_log/type_index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_index() directly.

    YANG Description: Type Index
    """
    parent = getattr(self, "_parent", None)
    if parent is not None and load is False:
      raise AttributeError("Cannot set keys directly when" +
                             " within an instantiated list")

    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_index must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)""",
        })

    self.__type_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_index(self):
    self.__type_index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)


  def _get_time_stamp(self):
    """
    Getter method for time_stamp, mapped from YANG variable /counts_state/bad_lsp_log/time_stamp (uint32)

    YANG Description: Time Stamp
    """
    return self.__time_stamp
      
  def _set_time_stamp(self, v, load=False):
    """
    Setter method for time_stamp, mapped from YANG variable /counts_state/bad_lsp_log/time_stamp (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_time_stamp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_time_stamp() directly.

    YANG Description: Time Stamp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """time_stamp must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)""",
        })

    self.__time_stamp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_time_stamp(self):
    self.__time_stamp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)


  def _get_l1_count(self):
    """
    Getter method for l1_count, mapped from YANG variable /counts_state/bad_lsp_log/l1_count (uint32)

    YANG Description: L1 count
    """
    return self.__l1_count
      
  def _set_l1_count(self, v, load=False):
    """
    Setter method for l1_count, mapped from YANG variable /counts_state/bad_lsp_log/l1_count (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l1_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l1_count() directly.

    YANG Description: L1 count
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l1_count must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)""",
        })

    self.__l1_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l1_count(self):
    self.__l1_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)


  def _get_l2_count(self):
    """
    Getter method for l2_count, mapped from YANG variable /counts_state/bad_lsp_log/l2_count (uint32)

    YANG Description: L2 count
    """
    return self.__l2_count
      
  def _set_l2_count(self, v, load=False):
    """
    Setter method for l2_count, mapped from YANG variable /counts_state/bad_lsp_log/l2_count (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2_count() directly.

    YANG Description: L2 count
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2_count must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)""",
        })

    self.__l2_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2_count(self):
    self.__l2_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)

  type_index = __builtin__.property(_get_type_index)
  time_stamp = __builtin__.property(_get_time_stamp)
  l1_count = __builtin__.property(_get_l1_count)
  l2_count = __builtin__.property(_get_l2_count)


  _pyangbind_elements = {'type_index': type_index, 'time_stamp': time_stamp, 'l1_count': l1_count, 'l2_count': l2_count, }




from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
class bad_lsp_log(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module brocade-isis-operational - based on the path /counts-state/bad-lsp-log. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LSP Name
  """
  __slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__type_index','__time_stamp','__l1_count','__l2_count',)

  _yang_name = 'bad-lsp-log'
  _rest_name = 'bad-lsp-log'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    path_helper_ = kwargs.pop("path_helper", None)
    if path_helper_ is False:
      self._path_helper = False
    elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper):
      self._path_helper = path_helper_
    elif hasattr(self, "_parent"):
      path_helper_ = getattr(self._parent, "_path_helper", False)
      self._path_helper = path_helper_
    else:
      self._path_helper = False

    extmethods = kwargs.pop("extmethods", None)
    if extmethods is False:
      self._extmethods = False
    elif extmethods is not None and isinstance(extmethods, dict):
      self._extmethods = extmethods
    elif hasattr(self, "_parent"):
      extmethods = getattr(self._parent, "_extmethods", None)
      self._extmethods = extmethods
    else:
      self._extmethods = False
    self.__time_stamp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    self.__l2_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    self.__type_index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)
    self.__l1_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return [u'counts-state', u'bad-lsp-log']

  def _rest_path(self):
    if hasattr(self, "_parent"):
      if self._rest_name:
        return self._parent._rest_path()+[self._rest_name]
      else:
        return self._parent._rest_path()
    else:
      return [u'counts-state', u'bad-lsp-log']

  def _get_type_index(self):
    """
    Getter method for type_index, mapped from YANG variable /counts_state/bad_lsp_log/type_index (uint8)

    YANG Description: Type Index
    """
    return self.__type_index
      
  def _set_type_index(self, v, load=False):
    """
    Setter method for type_index, mapped from YANG variable /counts_state/bad_lsp_log/type_index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_index() directly.

    YANG Description: Type Index
    """
    parent = getattr(self, "_parent", None)
    if parent is not None and load is False:
      raise AttributeError("Cannot set keys directly when" +
                             " within an instantiated list")

    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_index must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)""",
        })

    self.__type_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_index(self):
    self.__type_index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False)


  def _get_time_stamp(self):
    """
    Getter method for time_stamp, mapped from YANG variable /counts_state/bad_lsp_log/time_stamp (uint32)

    YANG Description: Time Stamp
    """
    return self.__time_stamp
      
  def _set_time_stamp(self, v, load=False):
    """
    Setter method for time_stamp, mapped from YANG variable /counts_state/bad_lsp_log/time_stamp (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_time_stamp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_time_stamp() directly.

    YANG Description: Time Stamp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """time_stamp must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)""",
        })

    self.__time_stamp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_time_stamp(self):
    self.__time_stamp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)


  def _get_l1_count(self):
    """
    Getter method for l1_count, mapped from YANG variable /counts_state/bad_lsp_log/l1_count (uint32)

    YANG Description: L1 count
    """
    return self.__l1_count
      
  def _set_l1_count(self, v, load=False):
    """
    Setter method for l1_count, mapped from YANG variable /counts_state/bad_lsp_log/l1_count (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l1_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l1_count() directly.

    YANG Description: L1 count
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l1_count must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)""",
        })

    self.__l1_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l1_count(self):
    self.__l1_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)


  def _get_l2_count(self):
    """
    Getter method for l2_count, mapped from YANG variable /counts_state/bad_lsp_log/l2_count (uint32)

    YANG Description: L2 count
    """
    return self.__l2_count
      
  def _set_l2_count(self, v, load=False):
    """
    Setter method for l2_count, mapped from YANG variable /counts_state/bad_lsp_log/l2_count (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2_count() directly.

    YANG Description: L2 count
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2_count must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)""",
        })

    self.__l2_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2_count(self):
    self.__l2_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)

  type_index = __builtin__.property(_get_type_index)
  time_stamp = __builtin__.property(_get_time_stamp)
  l1_count = __builtin__.property(_get_l1_count)
  l2_count = __builtin__.property(_get_l2_count)


  _pyangbind_elements = {'type_index': type_index, 'time_stamp': time_stamp, 'l1_count': l1_count, 'l2_count': l2_count, }



This class was auto-generated by the PythonClass plugin for PYANG   from YANG module brocade-isis-operational - based on the path /counts-state/bad-lsp-log. Each member element of   the container is represented as a class variable - with a specific   YANG type.    YANG Description: LSP Name Getter method for type_index, mapped from YANG variable /counts_state/bad_lsp_log/type_index (uint8)      YANG Description: Type Index Setter method for type_index, mapped from YANG variable /counts_state/bad_lsp_log/type_index (uint8)     If this variable is read-only (config: false) in the     source YANG file, then _set_type_index is considered as a private     method. Backends looking to populate this variable should     do so via calling thisObj._set_type_index() directly.      YANG Description: Type Index type_index must be of a type compatible with uint8 YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type-index", rest_name="type-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint8', is_config=False) Getter method for time_stamp, mapped from YANG variable /counts_state/bad_lsp_log/time_stamp (uint32)      YANG Description: Time Stamp Setter method for time_stamp, mapped from YANG variable /counts_state/bad_lsp_log/time_stamp (uint32)     If this variable is read-only (config: false) in the     source YANG file, then _set_time_stamp is considered as a private     method. Backends looking to populate this variable should     do so via calling thisObj._set_time_stamp() directly.      YANG Description: Time Stamp time_stamp must be of a type compatible with uint32 YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-stamp", rest_name="time-stamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False) Getter method for l1_count, mapped from YANG variable /counts_state/bad_lsp_log/l1_count (uint32)      YANG Description: L1 count Setter method for l1_count, mapped from YANG variable /counts_state/bad_lsp_log/l1_count (uint32)     If this variable is read-only (config: false) in the     source YANG file, then _set_l1_count is considered as a private     method. Backends looking to populate this variable should     do so via calling thisObj._set_l1_count() directly.      YANG Description: L1 count l1_count must be of a type compatible with uint32 YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l1-count", rest_name="l1-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False) Getter method for l2_count, mapped from YANG variable /counts_state/bad_lsp_log/l2_count (uint32)      YANG Description: L2 count Setter method for l2_count, mapped from YANG variable /counts_state/bad_lsp_log/l2_count (uint32)     If this variable is read-only (config: false) in the     source YANG file, then _set_l2_count is considered as a private     method. Backends looking to populate this variable should     do so via calling thisObj._set_l2_count() directly.      YANG Description: L2 count l2_count must be of a type compatible with uint32 YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="l2-count", rest_name="l2-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-isis-operational', defining_module='brocade-isis-operational', yang_type='uint32', is_config=False)